[EXTERNAL] Re: [PATCH v3] net/netvsc: fix number Tx queues > Rx queues
Alan Elder
alan.elder at microsoft.com
Thu Apr 11 22:45:39 CEST 2024
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit at amd.com>
> Sent: Thursday, April 11, 2024 7:38 AM
> To: Alan Elder <alan.elder at microsoft.com>; Long Li <longli at microsoft.com>;
> Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> Cc: dev at dpdk.org; stephen <stephen at networkplumber.org>
> Subject: [EXTERNAL] Re: [PATCH v3] net/netvsc: fix number Tx queues > Rx
> queues
>
> On 3/19/2024 2:16 PM, Alan Elder wrote:
> > The previous code allowed the number of Tx queues to be set higher
> > than the number of Rx queues. If a packet was sent on a Tx queue with
> > index
> >> = number Rx queues there was a segfault.
> > This commit fixes the issue by creating an Rx queue for every Tx queue
> > meaning that an event buffer is allocated to handle receiving Tx
> > completion messages.
> >
> > mbuf pool and Rx ring are not allocated for these additional Rx queues
> > and RSS configuration ensures that no packets are received on them.
> >
> > Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
> > Cc: sthemmin at microsoft.com
> > Cc: stable at dpdk.org
> >
> > Signed-off-by: Alan Elder <alan.elder at microsoft.com>
> >
>
> Hi Alan,
>
> What is the root cause of the crash, is it in driver scope or application?
Hi Ferruh,
The root cause of the crash was in the driver - a packet received on a Tx queue that had no corresponding Rx queue would cause the dev->data->rx_queues[] array to be accessed past the length of the array.
https://github.com/DPDK/dpdk/blob/main/drivers/net/netvsc/hn_rxtx.c#L1071
Thanks,
Alan
More information about the dev
mailing list