> From: Alan Elder [mailto:alan.el...@microsoft.com]
> Sent: Monday, 15 April 2024 16.41
> 
> 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 due to accessing beyond the end of
> the dev->data->rx_queues[] array.
> 
> #0 rte_spinlock_trylock (sl = invalid address) at /include/rte_spinlock.h L63
> #1  hn_process_events at /drivers/net/netvsc/hn_rxtx.c L 1129
> #2  hn_xmit_pkts at /drivers/net/netvsc/hn_rxtx.c L1553
> 
> 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: sthem...@microsoft.com
> Cc: sta...@dpdk.org
> 
> Signed-off-by: Alan Elder <alan.el...@microsoft.com>
> ---

Is there any requirements to the order the application must call 
rte_eth_rx_queue_setup() and rte_eth_tx_queue_setup()?

I.e. does it work if rte_eth_tx_queue_setup() is called before 
rte_eth_rx_queue_setup(), and in the opposite order?


Although the ethdev documentation says:

"The functions exported by the application Ethernet API to setup a device 
designated by its port identifier must be invoked in the following order:

rte_eth_dev_configure()
rte_eth_tx_queue_setup()
rte_eth_rx_queue_setup()
rte_eth_dev_start()",

I would assume the order of calling rte_eth_tx_queue_setup() and 
rte_eth_rx_queue_setup() doesn't matter.


And the rte_eth_dev_reset() function documentation has rx/tx queue setup in the 
opposite order:

"After calling rte_eth_dev_reset(), the application should use 
rte_eth_dev_configure(), rte_eth_rx_queue_setup(), rte_eth_tx_queue_setup(), 
and rte_eth_dev_start() to reconfigure the device as appropriate."

Reply via email to