From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Yuri Benditovich <ybendito@redhat.com>
Cc: ": Yan Vugenfirer" <yvugenfi@redhat.com>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
dev@dpdk.org, chenbo.xia@intel.com, amorenoz@redhat.com,
david.marchand@redhat.com, ferruh.yigit@intel.com,
michaelba@nvidia.com, viacheslavo@nvidia.com,
xiaoyun.li@intel.com, nelio.laranjeiro@6wind.com
Subject: Re: [dpdk-dev] [PATCH v5 1/5] net/virtio: add initial RSS support
Date: Wed, 27 Oct 2021 21:59:46 +0200 [thread overview]
Message-ID: <480d2265-9c26-5106-3b66-64d37e06f1bd@redhat.com> (raw)
In-Reply-To: <CAK9d7mwmi++sYMe33fEB+5Kf9tEw7wY91qwW0v1BQtzy3-5_GQ@mail.gmail.com>
Hi Yuri,
On 10/27/21 16:45, Yuri Benditovich wrote:
>
>
> On Wed, Oct 27, 2021 at 1:55 PM Maxime Coquelin
> <maxime.coquelin@redhat.com <mailto:maxime.coquelin@redhat.com>> wrote:
>
> Hi,
>
> On 10/19/21 11:37, Andrew Rybchenko wrote:
> > Hi Maxime,
> >
> > On 10/19/21 12:22 PM, Maxime Coquelin wrote:
> >> Hi Andrew,
> >>
> >> On 10/19/21 09:30, Andrew Rybchenko wrote:
> >>> On 10/18/21 1:20 PM, Maxime Coquelin wrote:
> >>>> Provide the capability to update the hash key, hash types
> >>>> and RETA table on the fly (without needing to stop/start
> >>>> the device). However, the key length and the number of RETA
> >>>> entries are fixed to 40B and 128 entries respectively. This
> >>>> is done in order to simplify the design, but may be
> >>>> revisited later as the Virtio spec provides this
> >>>> flexibility.
> >>>>
> >>>> Note that only VIRTIO_NET_F_RSS support is implemented,
> >>>> VIRTIO_NET_F_HASH_REPORT, which would enable reporting the
> >>>> packet RSS hash calculated by the device into mbuf.rss, is
> >>>> not yet supported.
> >>>>
> >>>> Regarding the default RSS configuration, it has been
> >>>> chosen to use the default Intel ixgbe key as default key,
> >>>> and default RETA is a simple modulo between the hash and
> >>>> the number of Rx queues.
> >>>>
> >>>> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com
> <mailto:maxime.coquelin@redhat.com>>
> >
> > [snip]
> >
> >>>> + rss.unclassified_queue = 0;
> >>>> + memcpy(rss.indirection_table, hw->rss_reta,
> >>>> VIRTIO_NET_RSS_RETA_SIZE * sizeof(uint16_t));
> >>>> + rss.max_tx_vq = nb_queues;
> >>>
> >>> Is it guaranteed that driver is configured with equal number
> >>> of Rx and Tx queues? Or is it not a problem otherwise?
> >>
> >> Virtio networking devices works with queue pairs.
> >
> > But it seems to me that I still can configure just 1 Rx queue
> > and many Tx queues. Basically just non equal.
> > The line is suspicious since I'd expect nb_queues to be
> > a number of Rx queues in the function, but we set max_tx_vq
> > count here.
>
> The Virtio spec says:
> "
> A driver sets max_tx_vq to inform a device how many transmit
> virtqueues it may use (transmitq1. . .transmitq max_tx_vq).
> "
>
> But looking at Qemu side, its value is interpreted as the number of
> queue pairs setup by the driver, same as is handled virtqueue_pairs of
> struct virtio_net_ctrl_mq when RSS is not supported.
>
> In this patch we are compatible with what is done in Qemu, and what is
> done for multiqueue when RSS is not enabled.
>
> I don't get why the spec talks about transmit queues, Yan & Yuri, any
> idea?
>
>
> Indeed QEMU reference code uses the max_tx_vq as a number of queue pairs
> the same way it uses a parameter of _MQ command.
> Mainly this is related to vhost start flow which assumes that there is
> some number of ready vq pairs.
> When the driver sets max_tx_vq it guarantees that it does not use more
> than max_tx_vq TX queues.
> Actual RX queues that will be used can be taken from the indirection
> table which contains indices of RX queues.
Thanks for the quick reply.
Then setting to MAX(nb_rx_queue, nb_tx_queue) is compliant with both the
spec and the Qemu implementation.
Maxime
next prev parent reply other threads:[~2021-10-27 20:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 10:20 [dpdk-dev] [PATCH v5 0/5] Virtio PMD RSS support & RSS fixes Maxime Coquelin
2021-10-18 10:20 ` [dpdk-dev] [PATCH v5 1/5] net/virtio: add initial RSS support Maxime Coquelin
2021-10-19 4:47 ` Xia, Chenbo
2021-10-19 7:31 ` Maxime Coquelin
2021-10-19 7:30 ` Andrew Rybchenko
2021-10-19 9:22 ` Maxime Coquelin
2021-10-19 9:37 ` Andrew Rybchenko
2021-10-27 10:55 ` Maxime Coquelin
2021-10-27 14:45 ` Yuri Benditovich
2021-10-27 19:59 ` Maxime Coquelin [this message]
2021-10-18 10:20 ` [dpdk-dev] [PATCH v5 2/5] app/testpmd: fix RSS key length Maxime Coquelin
2021-10-18 10:20 ` [dpdk-dev] [PATCH v5 3/5] app/testpmd: fix RSS type display Maxime Coquelin
2021-10-18 10:20 ` [dpdk-dev] [PATCH v5 4/5] net/mlx5: fix RSS RETA update Maxime Coquelin
2021-10-18 10:20 ` [dpdk-dev] [PATCH v5 5/5] app/testpmd: add missing flow types in port info Maxime Coquelin
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=480d2265-9c26-5106-3b66-64d37e06f1bd@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=amorenoz@redhat.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=chenbo.xia@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=michaelba@nvidia.com \
--cc=nelio.laranjeiro@6wind.com \
--cc=viacheslavo@nvidia.com \
--cc=xiaoyun.li@intel.com \
--cc=ybendito@redhat.com \
--cc=yvugenfi@redhat.com \
/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).