On 12/22/2020 7:23 AM, Guo, Jia wrote:
Acked-by: Jeff Guo <[email protected]>

-----Original Message-----
From: Zhou, JunX W <[email protected]>
Sent: Tuesday, December 22, 2020 2:51 PM
To: Yu, DapengX <[email protected]>; Guo, Jia <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH v2] net/ixgbe: fix fdirctrl register setting

Tested-by: Zhou, Jun <[email protected]>

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of
[email protected]
Sent: Tuesday, December 15, 2020 6:11 PM
To: Guo, Jia <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH v2] net/ixgbe: fix fdirctrl register setting

From: YU DAPENG <[email protected]>

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: [email protected]

Signed-off-by: YU DAPENG <[email protected]>

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: [email protected]

    Signed-off-by: Dapeng Yu <[email protected]>
    Tested-by: Jun Zhou <[email protected]>
    Acked-by: Jeff Guo <[email protected]>

Please prefer the "Dapeng Yu <[email protected]>" signature to be consistent.

Reply via email to