[PATCH 3/6] drivers/nfb: do not report zero-sized TX burst

Ferruh Yigit ferruh.yigit at intel.com
Mon Feb 14 18:34:19 CET 2022


On 2/14/2022 4:53 PM, Martin Spinler wrote:
> On Mon, 2022-02-14 at 13:35 +0000, Ferruh Yigit wrote:
>> On 2/14/2022 11:25 AM, spinler at cesnet.cz wrote:
>>> From: Martin Spinler <spinler at cesnet.cz>
>>>
>>> Zero-sized TX burst floods the log no more.
>>>
>>
>> If you want this patch to be backported, you can update
>> commit log as fix and add fixes & stable tags.
> 
> I don't think it is a fix, rather an unplesant behaviour in a specific
> application. It doesn't happen in the test-pmd app.
> 

If you don't want to backport, OK to keep as it is.

>>
>>> Signed-off-by: Martin Spinler <spinler at cesnet.cz>
>>> ---
>>>    drivers/net/nfb/nfb_tx.h | 5 ++++-
>>>    1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/nfb/nfb_tx.h b/drivers/net/nfb/nfb_tx.h
>>> index d3cbe3e6b3..910020e9e9 100644
>>> --- a/drivers/net/nfb/nfb_tx.h
>>> +++ b/drivers/net/nfb/nfb_tx.h
>>> @@ -136,7 +136,10 @@ nfb_eth_ndp_tx(void *queue,
>>>    
>>>    	struct ndp_packet packets[nb_pkts];
>>>    
>>> -	if (unlikely(ndp->queue == NULL || nb_pkts == 0)) {
>>> +	if (unlikely(nb_pkts == 0))
>>> +		return 0;
>>> +
>>> +	if (unlikely(ndp->queue == NULL)) {
>>>    		RTE_LOG(ERR, PMD, "TX invalid arguments!\n");
>>>    		return 0;
>>>    	}
>>
> 



More information about the dev mailing list