From: Ferruh Yigit <ferruh.yigit@amd.com>
To: "Morten Brørup" <mb@smartsharesystems.com>,
"Alan Elder" <alan.elder@microsoft.com>,
"Long Li" <longli@microsoft.com>,
"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>
Cc: dev@dpdk.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [PATCH v4] net/netvsc: fix number Tx queues > Rx queues
Date: Mon, 20 May 2024 14:52:47 +0100 [thread overview]
Message-ID: <1833ae2b-76e2-49ff-8b8d-e10eba462e81@amd.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F40B@smartserver.smartshare.dk>
On 5/1/2024 8:43 AM, Morten Brørup wrote:
>> From: Alan Elder [mailto:alan.elder@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: sthemmin@microsoft.com
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Alan Elder <alan.elder@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.
>
Same, I am not aware of any strict ordering requirement for Rx and Tx
queues setup.
>
> 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."
>
next prev parent reply other threads:[~2024-05-20 13:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 19:29 [PATCH] " Alan Elder
2024-02-29 21:53 ` Stephen Hemminger
2024-03-01 2:03 ` Long Li
2024-03-08 18:21 ` Alan Elder
2024-03-08 18:09 ` [PATCH v2] " Alan Elder
2024-03-11 22:31 ` Ferruh Yigit
2024-03-12 19:08 ` Long Li
2024-03-19 14:16 ` [PATCH v3] " Alan Elder
2024-03-19 18:40 ` Long Li
2024-04-11 11:38 ` Ferruh Yigit
2024-04-11 20:45 ` [EXTERNAL] " Alan Elder
2024-04-12 10:23 ` Ferruh Yigit
2024-04-12 16:50 ` Alan Elder
2024-04-15 17:54 ` Ferruh Yigit
2024-04-15 14:40 ` [PATCH v4] " Alan Elder
2024-04-15 18:11 ` Ferruh Yigit
2024-04-17 23:45 ` Long Li
2024-05-01 7:43 ` Morten Brørup
2024-05-20 13:52 ` Ferruh Yigit [this message]
2024-10-03 22:55 ` Stephen Hemminger
2024-10-17 19:21 ` Long Li
2024-03-19 14:19 ` [PATCH v2] " Alan Elder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1833ae2b-76e2-49ff-8b8d-e10eba462e81@amd.com \
--to=ferruh.yigit@amd.com \
--cc=alan.elder@microsoft.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=longli@microsoft.com \
--cc=mb@smartsharesystems.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).