From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
To: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH 4/5] net/hns3: add RSS hash offload to port Rx configuration
Date: Fri, 22 May 2020 17:21:17 +0800 [thread overview]
Message-ID: <1590139278-11046-5-git-send-email-xavier.huwei@huawei.com> (raw)
In-Reply-To: <1590139278-11046-1-git-send-email-xavier.huwei@huawei.com>
From: Lijun Ou <oulijun@huawei.com>
Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
enable/disable PMDs write to `rte_mbuf::hash::rss`. The hns3 PMD driver
already can notify the validity of `rte_mbuf::hash:rss` to the application
by enabling `PKT_RX_RSS_HASH` flag in `rte_mbuf::ol_flags`.
Fixes: 19a3ca4c99cf ("net/hns3: add start/stop and configure operations")
Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Cc: stable@dpdk.org
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 1 +
drivers/net/hns3/hns3_ethdev_vf.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 1c06b8f..33d7c5c 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2312,6 +2312,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
/* When RSS is not configured, redirect the packet queue 0 */
if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
+ conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
rss_conf = conf->rx_adv_conf.rss_conf;
if (rss_conf.rss_key == NULL) {
rss_conf.rss_key = rss_cfg->key;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 904562e..16d6012 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -784,6 +784,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
/* When RSS is not configured, redirect the packet queue 0 */
if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
+ conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
rss_conf = conf->rx_adv_conf.rss_conf;
if (rss_conf.rss_key == NULL) {
rss_conf.rss_key = rss_cfg->key;
--
2.7.4
next prev parent reply other threads:[~2020-05-22 9:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-22 9:21 [dpdk-dev] [PATCH 0/5] misc updates for hns3 PMD driver Wei Hu (Xavier)
2020-05-22 9:21 ` [dpdk-dev] [PATCH 1/5] net/hns3: replace PF vport id zero with private macro Wei Hu (Xavier)
2020-05-22 9:21 ` [dpdk-dev] [PATCH 2/5] net/hns3: fix promiscuous config not clear for PF on uninit Wei Hu (Xavier)
2020-05-22 9:21 ` [dpdk-dev] [PATCH 3/5] net/hns3: fix preparing sending packets less than 60 bytes Wei Hu (Xavier)
2020-05-22 9:21 ` Wei Hu (Xavier) [this message]
2020-05-22 9:21 ` [dpdk-dev] [PATCH 5/5] net/hns3: fix key length when configuring RSS Wei Hu (Xavier)
2020-05-22 11:20 ` [dpdk-dev] [PATCH 0/5] misc updates for hns3 PMD driver Ferruh Yigit
2020-05-23 1:33 ` Wei Hu (Xavier)
2020-05-27 15:36 ` Ferruh Yigit
2020-05-28 1:35 ` Wei Hu (Xavier)
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=1590139278-11046-5-git-send-email-xavier.huwei@huawei.com \
--to=xavier.huwei@huawei.com \
--cc=dev@dpdk.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).