From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,PDS_BAD_THREAD_QP_64,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E90DEC433E0 for ; Fri, 22 Jan 2021 05:43:38 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id 5CEE3236F9 for ; Fri, 22 Jan 2021 05:43:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5CEE3236F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD275140E6A; Fri, 22 Jan 2021 06:43:37 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 68D4B140E4B; Fri, 22 Jan 2021 06:43:35 +0100 (CET) IronPort-SDR: xyxaBLgYCR4YyRrj6DIZEv4SeEj8flQL8tGdvIkPOwjThv+RjkSLi1GjIK4af2JMANbyQxoT1O Z7eXsTizJ3qA== X-IronPort-AV: E=McAfee;i="6000,8403,9871"; a="159175019" X-IronPort-AV: E=Sophos;i="5.79,365,1602572400"; d="scan'208";a="159175019" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2021 21:43:33 -0800 IronPort-SDR: x5Q5u3+dH6LDMucSMd71plx10kyOQZEb9BvWUD4p8F5srqoDt0+dqgacaE+ZUW1QK5jv3Giz+J JgFZB7JQuaWQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,365,1602572400"; d="scan'208";a="385621108" Received: from irsmsx603.ger.corp.intel.com ([163.33.146.9]) by orsmga008.jf.intel.com with ESMTP; 21 Jan 2021 21:43:32 -0800 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by irsmsx603.ger.corp.intel.com (163.33.146.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 22 Jan 2021 05:43:30 +0000 Received: from shsmsx606.ccr.corp.intel.com ([10.109.6.216]) by SHSMSX606.ccr.corp.intel.com ([10.109.6.216]) with mapi id 15.01.1713.004; Fri, 22 Jan 2021 13:43:28 +0800 From: "Zhou, JunX W" To: "Zhang, AlvinX" , "Yigit, Ferruh" CC: "dev@dpdk.org" , "Zhang, AlvinX" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2] app/testpmd: fix RSS key Thread-Index: AQHW79m5S7vGuJtgM02zclOcKRX5AqozI0FA Date: Fri, 22 Jan 2021 05:43:28 +0000 Message-ID: References: <20210118085937.12072-1-alvinx.zhang@intel.com> <20210121094154.6788-1-alvinx.zhang@intel.com> In-Reply-To: <20210121094154.6788-1-alvinx.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: fix RSS key X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Tested-by: Zhou, Jun =20 -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhang,Alvin Sent: Thursday, January 21, 2021 5:42 PM To: Yigit, Ferruh Cc: dev@dpdk.org; Zhang, AlvinX ; stable@dpdk.org Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix RSS key From: Alvin Zhang Since the patch '1848b117' has initialized the variable 'key' in 'struct rt= e_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 paramete= r 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 --- 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 inde= x 0618611..067e120 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -3541,7 +3541,10 @@ static int comp_set_modify_field_id(struct context *= , const struct token *, .name =3D "key", .help =3D "RSS hash key", .next =3D NEXT(action_rss, NEXT_ENTRY(HEX)), - .args =3D ARGS(ARGS_ENTRY_ARB(0, 0), + .args =3D 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), -- 1.8.3.1