rte_eth_tx_burst() always returns 0 in tight loop

Gábor LENCSE lencse at hit.bme.hu
Wed Jul 6 17:03:34 CEST 2022


Dear Antonio,

I have not met your problem during the implementation of siitperf, 
because I always had to send the frames at a given frame rate, that is, 
I used the appropriate timing.

Could you check, how early the failure begins? I mean that does already 
the second or third call fail? Or it happens only after a few hundred 
calls?

IMHO, the latter is natural, and it means that you have exhausted some 
resources.

Best regards,

Gábor

7/6/2022 9:21 AM keltezéssel, Antonio Di Bacco írta:
> I wonder why calling eth_dev_tx_burst in a tight loop doesn't allow to
> write the packets into the transmit buffer. Only solution I found is
> to include a small delay after the tx_burst that is less than the
> estimated serialization time of the packet in order to be able to
> saturate the ethernet line.
>
> Anyway I wonder if this is the right approach.
>
> Thx,
> Antonio.
>
> On Sun, Jul 3, 2022 at 10:19 PM Gábor LENCSE <lencse at hit.bme.hu> wrote:
>> Dear Antonio,
>>
>> According to my experience, the rte_eth_tx_burst() function reports the
>> packets as "sent" (by a non-zero return value), when they are still in
>> the transmit buffer.
>>
>> (If you are interested in the details, you can see them in Section 3.6.5
>> of this paper: http://www.hit.bme.hu/~lencse/publications/e104-b_2_128.pdf )
>>
>> Therefore, I think that the return value of 0 may mean that
>> rte_eth_tx_burst() can't even commit itself for the future delivery of
>> the packets. I could only guess why. E.g. all its resources have been
>> exhausted.
>>
>> Best regards,
>>
>> Gábor
>>
>>
>> 7/3/2022 5:57 PM keltezéssel, Antonio Di Bacco írta:
>>> I'm trying to send packets continuously in a  tight loop with a burst
>>> size of 8 and packets are 9600 bytes long.
>>> If I don't insert a delay after the rte_eth_tx_burst it always returns 0.
>>>
>>> What's the explanation of this behaviour ?
>>>
>>> Best regards,
>>> Antonio.



More information about the users mailing list