DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>, <dev@dpdk.org>,
	<chenbo.xia@intel.com>, <amorenoz@redhat.com>,
	<david.marchand@redhat.com>, <andrew.rybchenko@oktetlabs.ru>,
	<michaelba@nvidia.com>, <viacheslavo@nvidia.com>,
	<xiaoyun.li@intel.com>
Cc: <nelio.laranjeiro@6wind.com>, <yvugenfi@redhat.com>,
	<ybendito@redhat.com>
Subject: Re: [dpdk-dev] [PATCH v6 1/5] net/virtio: add initial RSS support
Date: Fri, 29 Oct 2021 18:40:14 +0100	[thread overview]
Message-ID: <a19e8a42-e668-ce96-3be4-ac54c55547d7@intel.com> (raw)
In-Reply-To: <20211027142213.556166-2-maxime.coquelin@redhat.com>

On 10/27/2021 3:22 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>

<...>

> +static uint64_t
> +ethdev_to_virtio_rss_offloads(uint64_t ethdev_hash_types)
> +{
> +	uint64_t virtio_hash_types = 0;
> +
> +	if (ethdev_hash_types & (ETH_RSS_IPV4 | ETH_RSS_FRAG_IPV4 | ETH_RSS_NONFRAG_IPV4_OTHER))
> +		virtio_hash_types |= VIRTIO_NET_HASH_TYPE_IPV4;
> +
> +	if (ethdev_hash_types & ETH_RSS_NONFRAG_IPV4_TCP)
> +		virtio_hash_types |= VIRTIO_NET_HASH_TYPE_TCPV4;
> +
> +	if (ethdev_hash_types & ETH_RSS_NONFRAG_IPV4_UDP)
> +		virtio_hash_types |= VIRTIO_NET_HASH_TYPE_UDPV4;
> +
> +	if (ethdev_hash_types & (ETH_RSS_IPV6 | ETH_RSS_FRAG_IPV6 | ETH_RSS_NONFRAG_IPV6_OTHER))
> +		virtio_hash_types |= VIRTIO_NET_HASH_TYPE_IPV6;
> +
> +	if (ethdev_hash_types & ETH_RSS_NONFRAG_IPV6_TCP)
> +		virtio_hash_types |= VIRTIO_NET_HASH_TYPE_TCPV6;
> +
> +	if (ethdev_hash_types & ETH_RSS_NONFRAG_IPV6_UDP)
> +		virtio_hash_types |= VIRTIO_NET_HASH_TYPE_UDPV6;
> +
> +	if (ethdev_hash_types & ETH_RSS_IPV6_EX)
> +		virtio_hash_types |= VIRTIO_NET_HASH_TYPE_IP_EX;
> +
> +	if (ethdev_hash_types & ETH_RSS_IPV6_TCP_EX)
> +		virtio_hash_types |= VIRTIO_NET_HASH_TYPE_TCP_EX;
> +
> +	if (ethdev_hash_types & ETH_RSS_IPV6_UDP_EX)
> +		virtio_hash_types |= VIRTIO_NET_HASH_TYPE_UDP_EX;

Should use RTE_ETH_RSS macros with RTE_ prefix versions, updating in next-net.
Same for below virtio_to_ethdev_rss_offloads().


  parent reply	other threads:[~2021-10-29 17:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27 14:22 [dpdk-dev] [PATCH v6 0/5] Virtio PMD RSS support & RSS fixes Maxime Coquelin
2021-10-27 14:22 ` [dpdk-dev] [PATCH v6 1/5] net/virtio: add initial RSS support Maxime Coquelin
2021-10-27 14:58   ` Andrew Rybchenko
2021-10-29 17:40   ` Ferruh Yigit [this message]
2021-10-29 17:54     ` Maxime Coquelin
2021-10-27 14:22 ` [dpdk-dev] [PATCH v6 2/5] app/testpmd: fix RSS key length Maxime Coquelin
2021-10-27 14:22 ` [dpdk-dev] [PATCH v6 3/5] app/testpmd: fix RSS type display Maxime Coquelin
2021-10-27 14:22 ` [dpdk-dev] [PATCH v6 4/5] net/mlx5: fix RSS RETA update Maxime Coquelin
2021-10-27 14:22 ` [dpdk-dev] [PATCH v6 5/5] app/testpmd: add missing flow types in port info Maxime Coquelin
2021-10-29 10:36 ` [dpdk-dev] [PATCH v6 0/5] Virtio PMD RSS support & RSS fixes 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=a19e8a42-e668-ce96-3be4-ac54c55547d7@intel.com \
    --to=ferruh.yigit@intel.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=maxime.coquelin@redhat.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).