From a1a2b7392a2dba8d81529b03acb490d472b6c6d5 Mon Sep 17 00:00:00 2001 From: speech_white Date: Mon, 8 Nov 2021 14:33:50 +0800 Subject: [PATCH] app/testpmd: fix PMD cannot get the RSS key Since the patch '1848b117' has initialized the variable 'key' in 'struct rte_flow_action_rss' with 'NULL', the PMD cannot get the RSS key now. Details as bellow: testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-other end key 1234567890123456789012345678901234567890FFFFFFFFFFFF123 4567890123456789012345678901234567890FFFFFFFFFFFF queues end / end Flow rule #1 created testpmd> show port 0 rss-hash key RSS functions: all ipv4-other ip RSS key: 4439796BB54C5023B675EA5B124F9F30B8A2C03DDFDC4D02A08C9B3 34AF64A4C05C6FA343958D8557D99583AE138C92E81150366 This patch sets offset and size of the 'key' variable as the first parameter of the token 'key'. Later, the address of the RSS key will be copied to 'key' variable. Signed-off-by: speech_white --- ...pp-testpmd-fix-key-for-RSS-flow-rule.patch | 55 +++++++++++++++++++ dpdk.spec | 6 +- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 0232-app-testpmd-fix-key-for-RSS-flow-rule.patch diff --git a/0232-app-testpmd-fix-key-for-RSS-flow-rule.patch b/0232-app-testpmd-fix-key-for-RSS-flow-rule.patch new file mode 100644 index 0000000..12167e3 --- /dev/null +++ b/0232-app-testpmd-fix-key-for-RSS-flow-rule.patch @@ -0,0 +1,55 @@ +From b57927702a58685e46d87960aba25a7b1fa0279e Mon Sep 17 00:00:00 2001 +From: Alvin Zhang +Date: Thu, 21 Jan 2021 17:41:54 +0800 +Subject: [PATCH] app/testpmd: fix key for RSS flow rule + +Since the patch '1848b117' has initialized the variable 'key' in +'struct rte_flow_action_rss' with 'NULL', the PMD cannot get the +RSS key now. Details as bellow: + +testpmd> flow create 0 ingress pattern eth / ipv4 / end actions + rss types ipv4-other end key + 1234567890123456789012345678901234567890FFFFFFFFFFFF123 + 4567890123456789012345678901234567890FFFFFFFFFFFF + queues end / end +Flow rule #1 created +testpmd> show port 0 rss-hash key +RSS functions: + all ipv4-other ip +RSS key: + 4439796BB54C5023B675EA5B124F9F30B8A2C03DDFDC4D02A08C9B3 + 34AF64A4C05C6FA343958D8557D99583AE138C92E81150366 + +This patch sets offset and size of the 'key' variable as the first +parameter of the token 'key'. Later, the address of the RSS key will +be copied to 'key' variable. + +Fixes: 1848b117cca1 ("app/testpmd: fix RSS key for flow API RSS rule") +Cc: stable@dpdk.org + +Signed-off-by: Alvin Zhang +Tested-by: Jun W Zhou +Reviewed-by: Ferruh Yigit +--- + app/test-pmd/cmdline_flow.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c +index 0618611ab1..067e120743 100644 +--- a/app/test-pmd/cmdline_flow.c ++++ b/app/test-pmd/cmdline_flow.c +@@ -3541,7 +3541,10 @@ static const struct token token_list[] = { + .name = "key", + .help = "RSS hash key", + .next = NEXT(action_rss, NEXT_ENTRY(HEX)), +- .args = ARGS(ARGS_ENTRY_ARB(0, 0), ++ .args = ARGS(ARGS_ENTRY_ARB ++ (offsetof(struct action_rss_data, conf) + ++ offsetof(struct rte_flow_action_rss, key), ++ sizeof(((struct rte_flow_action_rss *)0)->key)), + ARGS_ENTRY_ARB + (offsetof(struct action_rss_data, conf) + + offsetof(struct rte_flow_action_rss, key_len), +-- +2.33.0 + diff --git a/dpdk.spec b/dpdk.spec index 9a6fd03..ec7918d 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -1,6 +1,6 @@ Name: dpdk Version: 20.11 -Release: 12 +Release: 13 Packager: packaging@6wind.com URL: http://dpdk.org %global source_version 20.11 @@ -238,6 +238,7 @@ Patch228: 0228-net-hns3-fix-interrupt-vector-freeing.patch Patch229: 0229-net-hns3-add-runtime-config-for-mailbox-limit-time.patch Patch230: 0230-net-hns3-fix-mailbox-communication-with-HW.patch Patch231: 0231-app-testpmd-support-multi-process.patch +Patch232: 0232-app-testpmd-fix-key-for-RSS-flow-rule.patch Summary: Data Plane Development Kit core Group: System Environment/Libraries @@ -376,6 +377,9 @@ strip -g $RPM_BUILD_ROOT/lib/modules/${namer}/extra/dpdk/rte_kni.ko /usr/sbin/depmod %changelog +* Mon Nov 08 2021 Min Hu - 20.11-13 +- fix PMD cannot get the RSS key. + * Mon Nov 01 2021 Min Hu - 20.11-12 - synchronize dmadev and hns3 bugfixes from upstream -- Gitee