[dpdk-stable] [dpdk-dev] [PATCH v2] net/ixgbe: fix fdirctrl register setting

Ferruh Yigit ferruh.yigit at intel.com
Tue Jan 5 13:09:51 CET 2021


On 12/22/2020 7:23 AM, Guo, Jia wrote:
> Acked-by: Jeff Guo <jia.guo at intel.com>
> 
>> -----Original Message-----
>> From: Zhou, JunX W <junx.w.zhou at intel.com>
>> Sent: Tuesday, December 22, 2020 2:51 PM
>> To: Yu, DapengX <dapengx.yu at intel.com>; Guo, Jia <jia.guo at intel.com>
>> Cc: dev at dpdk.org; Yu, DapengX <dapengx.yu at intel.com>; stable at dpdk.org
>> Subject: RE: [dpdk-dev] [PATCH v2] net/ixgbe: fix fdirctrl register setting
>>
>> Tested-by: Zhou, Jun <junx.w.zhou at intel.com>
>>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of
>> dapengx.yu at intel.com
>> Sent: Tuesday, December 15, 2020 6:11 PM
>> To: Guo, Jia <jia.guo at intel.com>
>> Cc: dev at dpdk.org; Yu, DapengX <dapengx.yu at intel.com>; stable at dpdk.org
>> Subject: [dpdk-dev] [PATCH v2] net/ixgbe: fix fdirctrl register setting
>>
>> From: YU DAPENG <dapengx.yu at 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: stable at dpdk.org
>>
>> Signed-off-by: YU DAPENG <dapengx.yu at 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: stable at dpdk.org

     Signed-off-by: Dapeng Yu <dapengx.yu at intel.com>
     Tested-by: Jun Zhou <junx.w.zhou at intel.com>
     Acked-by: Jeff Guo <jia.guo at intel.com>

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


More information about the stable mailing list