On 12/22/2020 7:23 AM, Guo, Jia wrote:
Acked-by: Jeff Guo <jia....@intel.com>

-----Original Message-----
From: Zhou, JunX W <junx.w.z...@intel.com>
Sent: Tuesday, December 22, 2020 2:51 PM
To: Yu, DapengX <dapengx...@intel.com>; Guo, Jia <jia....@intel.com>
Cc: dev@dpdk.org; Yu, DapengX <dapengx...@intel.com>; sta...@dpdk.org
Subject: RE: [dpdk-dev] [PATCH v2] net/ixgbe: fix fdirctrl register setting

Tested-by: Zhou, Jun <junx.w.z...@intel.com>

-----Original Message-----
From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of
dapengx...@intel.com
Sent: Tuesday, December 15, 2020 6:11 PM
To: Guo, Jia <jia....@intel.com>
Cc: dev@dpdk.org; Yu, DapengX <dapengx...@intel.com>; sta...@dpdk.org
Subject: [dpdk-dev] [PATCH v2] net/ixgbe: fix fdirctrl register setting

From: YU DAPENG <dapengx...@intel.com>

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: sta...@dpdk.org

Signed-off-by: YU DAPENG <dapengx...@intel.com>

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: sta...@dpdk.org

    Signed-off-by: Dapeng Yu <dapengx...@intel.com>
    Tested-by: Jun Zhou <junx.w.z...@intel.com>
    Acked-by: Jeff Guo <jia....@intel.com>

Please prefer the "Dapeng Yu <dapengx...@intel.com>" signature to be consistent.

Reply via email to