From: "Wei Hu (Xavier)" <huwei013@chinasoftinc.com>
To: <ferruh.yigit@intel.com>, <wenzhuo.lu@intel.com>,
<beilei.xing@intel.com>, <bernard.iremonger@intel.com>
Cc: <xavier.huwei@huawei.com>, <lihuisong@huawei.com>, <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH v2] app/testpmd: update Rx RSS HASH offload when setting MQ RSS
Date: Wed, 23 Sep 2020 15:51:34 +0800 [thread overview]
Message-ID: <20200923075134.24168-1-huwei013@chinasoftinc.com> (raw)
In-Reply-To: <20200908021603.44862-1-huwei013@chinasoftinc.com>
From: Huisong Li <lihuisong@huawei.com>
Currently, when starting testpmd application without '--disable-rss' and
the number of Rx queue configured is greater than 1, ETH_MQ_RX_RSS flag
is set in port->dev_conf.rxmode.mq_mode in testpmd application, and
DEV_RX_OFFLOAD_RSS_HASH flag is set in rx_offloads
(dev->data->dev_conf.rxmode.offloads) according to the ETH_MQ_RX_RSS
flag of rxmode.mq_mode in PMD drivers.
However, DEV_RX_OFFLOAD_RSS_HASH is not set to rx_offloads maintained
in testpmd application, this will cause the inconsistent problem that
rx_offloads is different for testpmd and PMD drivers.
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
v1 -> v2: add check if PMD support DEV_RX_OFFLOAD_RSS_HASH before
setting it.
---
app/test-pmd/testpmd.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index fe6450c..a36db76 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3353,11 +3353,15 @@ init_port_config(void)
}
if (port->dcb_flag == 0) {
- if( port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0)
+ if (port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0) {
port->dev_conf.rxmode.mq_mode =
(enum rte_eth_rx_mq_mode)
(rx_mq_mode & ETH_MQ_RX_RSS);
- else
+ if (port->dev_info.rx_offload_capa &
+ DEV_RX_OFFLOAD_RSS_HASH)
+ port->dev_conf.rxmode.offloads |=
+ DEV_RX_OFFLOAD_RSS_HASH;
+ } else
port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_NONE;
}
--
2.9.5
prev parent reply other threads:[~2020-09-23 7:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-08 2:16 [dpdk-dev] [PATCH 0/2] updates for testpmd Wei Hu (Xavier)
2020-09-08 2:16 ` [dpdk-dev] [PATCH 1/2] app/testpmd: update Rx RSS HASH offload when setting MQ RSS Wei Hu (Xavier)
2020-09-22 16:21 ` Ferruh Yigit
2020-09-23 7:04 ` Wei Hu (Xavier)
2020-09-23 9:35 ` Ferruh Yigit
2020-09-28 12:27 ` Wei Hu (Xavier)
2020-09-08 2:16 ` [dpdk-dev] [PATCH 2/2] app/testpmd: retain original FDIR mode when configuring DCB Wei Hu (Xavier)
2020-09-22 5:15 ` Ajit Khaparde
2020-09-23 7:14 ` Wei Hu (Xavier)
2020-09-24 2:41 ` Wei Hu (Xavier)
2020-09-23 7:51 ` Wei Hu (Xavier) [this message]
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=20200923075134.24168-1-huwei013@chinasoftinc.com \
--to=huwei013@chinasoftinc.com \
--cc=beilei.xing@intel.com \
--cc=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=lihuisong@huawei.com \
--cc=wenzhuo.lu@intel.com \
--cc=xavier.huwei@huawei.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).