]> www.infradead.org Git - users/dwmw2/linux.git/commit
bnxt_en: Refactor and refine bnxt_tpa_start() and bnxt_tpa_end().
authorMichael Chan <michael.chan@broadcom.com>
Fri, 1 Dec 2023 22:39:18 +0000 (14:39 -0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 4 Dec 2023 23:12:48 +0000 (15:12 -0800)
commit39b2e62be3704d358c2c82eb326ae4b82a23ce1a
treedc5a696e86edaa2410f73255064c042286ed74dc
parentc2f8063309da9be81679e27cabd4a9dbf9be43cc
bnxt_en: Refactor and refine bnxt_tpa_start() and bnxt_tpa_end().

Refactor bnxt_tpa_start() by adding bnxt_tpa_metadata() to gather the
metadata from the TPA_START completion.  This makes it easier to
support the new P7 chip which has a modified TPA_START completion
structure with different metadata formats.  We also add vlan_valid
and cfa_code_valid fields to the bnxt_tpa_info structure so that the
VLAN and VF rep logic can be common for all chips.  The VLAN metadata
is now collected in bnxt_tpa_start() only when it is valid and the
vlan_valid field will be set.  bnxt_tpa_end() can now use common VLAN
logic for all chips.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20231201223924.26955-10-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h