]> git.ipfire.org Git - thirdparty/linux.git/commit
bnxt_en: Fix to include flow direction in L2 key
authorSomnath Kotur <somnath.kotur@broadcom.com>
Sat, 17 Aug 2019 21:04:52 +0000 (17:04 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Aug 2019 20:05:01 +0000 (13:05 -0700)
commit9bf46566e80fd94845527d01ebd888eb49313551
tree0f6a84f04b0c9f236d5e7165b7065701c7fec3b6
parent685ec6a81bb0d47faf1dba49437d5bdaede2733d
bnxt_en: Fix to include flow direction in L2 key

FW expects the driver to provide unique flow reference handles
for Tx or Rx flows. When a Tx flow and an Rx flow end up sharing
a reference handle, flow offload does not seem to work.
This could happen in the case of 2 flows having their L2 fields
wildcarded but in different direction.
Fix to incorporate the flow direction as part of the L2 key

v2: Move the dir field to the end of the bnxt_tc_l2_key struct to
fix the warning reported by kbuild test robot <lkp@intel.com>.
There is existing code that initializes the structure using
nested initializer and will warn with the new u8 field added to
the beginning.  The structure also packs nicer when this new u8 is
added to the end of the structure [MChan].

Fixes: abd43a13525d ("bnxt_en: Support for 64-bit flow handle.")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h