From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F2002A09FF for ; Tue, 5 Jan 2021 13:10:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 93C14160817; Tue, 5 Jan 2021 13:10:02 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id D8328160810; Tue, 5 Jan 2021 13:09:59 +0100 (CET) IronPort-SDR: lcCRrsTMrkidcbgCsbyqIXz5MxGM8vxGIM7JLqiYJhz1t2khS1Xod99yTimJp3LY2tKcJZvdf0 pnthY38QWBTQ== X-IronPort-AV: E=McAfee;i="6000,8403,9854"; a="174518991" X-IronPort-AV: E=Sophos;i="5.78,476,1599548400"; d="scan'208";a="174518991" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2021 04:09:58 -0800 IronPort-SDR: ENVp9p7JoAuqZl92mIAaoXUE7Og9/mb5EsY9UkXHdTDR/iOZMUlulyj468jQdjheT8/pwBrR0J qhFNOUWqUoxg== X-IronPort-AV: E=Sophos;i="5.78,476,1599548400"; d="scan'208";a="421753509" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.236.177]) ([10.213.236.177]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2021 04:09:55 -0800 To: "Guo, Jia" , "Zhou, JunX W" , "Yu, DapengX" Cc: "dev@dpdk.org" , "stable@dpdk.org" , "Zhang, Qi Z" References: <20201211013506.49885-1-dapengx.yu@intel.com> <20201215101031.99657-1-dapengx.yu@intel.com> <09872e2e27dc485aa2e24593002eaf9f@intel.com> <890c4965e10a45b5be8b901a64ee213b@intel.com> From: Ferruh Yigit Message-ID: Date: Tue, 5 Jan 2021 12:09:51 +0000 MIME-Version: 1.0 In-Reply-To: <890c4965e10a45b5be8b901a64ee213b@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] net/ixgbe: fix fdirctrl register setting X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On 12/22/2020 7:23 AM, Guo, Jia wrote: > Acked-by: Jeff Guo > >> -----Original Message----- >> From: Zhou, JunX W >> Sent: Tuesday, December 22, 2020 2:51 PM >> To: Yu, DapengX ; Guo, Jia >> Cc: dev@dpdk.org; Yu, DapengX ; stable@dpdk.org >> Subject: RE: [dpdk-dev] [PATCH v2] net/ixgbe: fix fdirctrl register setting >> >> Tested-by: Zhou, Jun >> >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of >> dapengx.yu@intel.com >> Sent: Tuesday, December 15, 2020 6:11 PM >> To: Guo, Jia >> Cc: dev@dpdk.org; Yu, DapengX ; stable@dpdk.org >> Subject: [dpdk-dev] [PATCH v2] net/ixgbe: fix fdirctrl register setting >> >> From: YU DAPENG >> >> The function ixgbe_fdir_set_flexbytes_offset is used when create FDir rule >> for flexbytes. It set a register: FDIRCTRL.FLEX_OFFSET, which cause that even >> if the FDir flexbytes rule is destroyed, the rule still direct the packet and >> transfer it to the wrong place. It is because setting FDIRCTRL shall only be >> permitted on Flow Director initialization flow or clearing the Flow Director >> table according to intel datasheet, otherwise unexpected happens. In order >> to evade the limit, add code to set FDIRCMD.CLEARHT to 1b and then clear it >> back to 0b to make the setting act like the Flow Director initialization flow or >> clearing the Flow Director table. >> >> Fixes: f35fec63dde1 ("net/ixgbe: enable flex bytes for generic flow API") >> Cc: stable@dpdk.org >> >> Signed-off-by: YU DAPENG Updating the commit log as following: net/ixgbe: fix flexbytes flow director rule When a flexbytes flow director rule is created, the FDIRCTRL.FLEX_OFFSET register is set, and it keeps its affect even after the flow director flexbytes rule is destroyed, causing packets to be transferred to the wrong place. It is because setting FDIRCTRL shall only be permitted on Flow Director initialization flow or clearing the Flow Director table according to the datasheet, otherwise device may behave unexpectedly. In order to evade this limitation, simulate the Flow Director initialization flow or clearing the Flow Director table by setting FDIRCMD.CLEARHT to 0x1B and then clear it back to 0x0B. Fixes: f35fec63dde1 ("net/ixgbe: enable flex bytes for generic flow API") Cc: stable@dpdk.org Signed-off-by: Dapeng Yu Tested-by: Jun Zhou Acked-by: Jeff Guo Please prefer the "Dapeng Yu " signature to be consistent.