From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AF79CA04B5; Mon, 26 Oct 2020 11:37:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E0BB22BA2; Mon, 26 Oct 2020 11:37:01 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 4AACB2B9D for ; Mon, 26 Oct 2020 11:37:00 +0100 (CET) IronPort-SDR: XRgrzIsxz472hw0WpyOIyHlIm564M+QdAAOH4tbXrTRmzXabJ1HnwcL60AFzfRebcHFMU1Az80 eBZ06IkHuyLg== X-IronPort-AV: E=McAfee;i="6000,8403,9785"; a="252602488" X-IronPort-AV: E=Sophos;i="5.77,419,1596524400"; d="scan'208";a="252602488" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2020 03:36:58 -0700 IronPort-SDR: oTznI97c8IWS6R1MbuEFjain+oacseiy7gxqaDHZkw9o1QImGQYEX8KHv+odru8Vn8saN2z4ZG BcykJFVZErOg== X-IronPort-AV: E=Sophos;i="5.77,419,1596524400"; d="scan'208";a="525448564" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.225.151]) ([10.213.225.151]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2020 03:36:56 -0700 To: Lijun Ou , wenzhuo.lu@intel.com, beilei.xing@intel.com, adrien.mazarguil@6wind.com Cc: dev@dpdk.org, linuxarm@huawei.com References: <1602765018-29810-1-git-send-email-oulijun@huawei.com> <1603274830-25490-1-git-send-email-oulijun@huawei.com> From: Ferruh Yigit Message-ID: Date: Mon, 26 Oct 2020 10:36:53 +0000 MIME-Version: 1.0 In-Reply-To: <1603274830-25490-1-git-send-email-oulijun@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] app/testpmd: set default RSS key as null X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" On 10/21/2020 11:07 AM, Lijun Ou wrote: > From: Ophir Munk > > When creating an RSS rule without specifying a key (see [1]) it is > expected that the device will use the default key. > A NULL key is used to indicate to a PMD it should use > its default key, however testpmd assigns a non-NULL dummy key > (see [2]) instead. > This does not enable testing any PMD behavior when the RSS key is not > specified. This commit fixes this limitation by setting key to NULL. > Also, it fixes the Scenario [3] that enable default RSS action by > setting key=NULL and key_len!=0. > [1] > RSS rule example without specifying a key: > flow create 0 ingress / end actions rss queues 0 1 end / end > [2] > Testpmd default key assignment: > .key= "testpmd's default RSS hash key, " > "override it for better balancing" > [3] > flow create 0 actions rss queues 0 1 end key_len 40 / end > > fixes refer to the link: https://patches.dpdk.org/patch/80898/ > > Signed-off-by: Ophir Munk > Signed-off-by: Ferruh Yigit > Signed-off-by: Lijun Ou Applied to dpdk-next-net/main, thanks. Updated the commit log as below: Author: Lijun Ou Date: Wed Oct 21 18:07:10 2020 +0800 app/testpmd: fix RSS key for flow API RSS rule When a flow API RSS rule is issued in testpmd, device RSS key is changed unexpectedly, device RSS key is changed to the testpmd default RSS key. Consider the following usage with testpmd: 1. first, startup testpmd: testpmd> show port 0 rss-hash key RSS functions: all ipv4-frag ipv4-other ipv6-frag ipv6-other ip RSS key: 6D5A56DA255B0EC24167253D43A38FB0D0CA2BCBAE7B30B477CB2DA38030F 20C6A42B73BBEAC01FA 2. create a rss rule testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end \ actions rss types ipv4-udp end queues end / end 3. show rss-hash key testpmd> show port 0 rss-hash key RSS functions: all ipv4-udp udp RSS key: 74657374706D6427732064656661756C74205253532068617368206B65792 C206F76657272696465 This is because testpmd always sends a key with the RSS rule, if user provides a key as part of the rule that key is used, if user doesn't provide a key, testpmd default key is sent to the PMDs, which is causing device programmed RSS key to be changed. There was a previous attempt to fix the same issue [1], but it has been reverted back [2] because of the crash when 'key_len' is provided without 'key'. This patch follows the same approach with the initial fix [1] but also addresses the crash. After change, testpmd RSS key is 'NULL' by default, if user provides a key as part of rule it is used, if not no key is sent to the PMDs at all [1] Commit a4391f8bae85 ("app/testpmd: set default RSS key as null") [2] Commit f3698c3d09a6 ("app/testpmd: revert setting default RSS") Fixes: d0ad8648b1c5 ("app/testpmd: fix RSS flow action configuration") Cc: stable@dpdk.org Signed-off-by: Lijun Ou Signed-off-by: Ophir Munk Signed-off-by: Ferruh Yigit