[dpdk-dev] [PATCH 1/2] net/netvsc: fix underflow error when external mbuf are used in the receive path

Ferruh Yigit ferruh.yigit at intel.com
Thu Jul 9 17:28:40 CEST 2020


On 7/2/2020 1:06 AM, Stephen Hemminger wrote:
> On Tue, 23 Jun 2020 18:11:45 -0700
> longli at linuxonhyperv.com wrote:
> 
>> From: Long Li <longli at microsoft.com>
>>
>> When rte_pktmbuf_attach_extbuf() is used, the driver should not decrease the
>> reference count in its callback function hn_rx_buf_free_cb, because the
>> reference count is already decreased by rte_pktmbuf. Doing it twice may result
>> in underflow and driver may never send an ack packet over vmbus to host.
>>
>> Also declares rxbuf_outstanding as atomic, because this value is shared
>> among all receive queues.
>>
>> Signed-off-by: Long Li <longli at microsoft.com>
> 
> Good catch. DPDK ought to have a real refcnt type like the kernel.
> One that traps on underflow.
> 
> Acked-by: Stephen Hemminger <stephen at networkplumber.org>
> 

Series applied to dpdk-next-net/master, thanks.


More information about the dev mailing list