[PATCH v8 1/4] common/sfc_efx/base: report VLAN stripping capability
Artemii Morozov
artemii.morozov at arknetworks.am
Fri Jun 23 07:47:53 CEST 2023
These changes are necessary in order to add support for stripping
VLAN tags in the future.
Signed-off-by: Artemii Morozov <artemii.morozov at arknetworks.am>
Reviewed-by: Ivan Malov <ivan.malov at arknetworks.am>
Reviewed-by: Andy Moreton <amoreton at xilinx.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
---
drivers/common/sfc_efx/base/ef10_nic.c | 6 ++++++
drivers/common/sfc_efx/base/efx.h | 1 +
drivers/common/sfc_efx/base/siena_nic.c | 1 +
3 files changed, 8 insertions(+)
diff --git a/drivers/common/sfc_efx/base/ef10_nic.c b/drivers/common/sfc_efx/base/ef10_nic.c
index bf9cb9d309..79d596b5ef 100644
--- a/drivers/common/sfc_efx/base/ef10_nic.c
+++ b/drivers/common/sfc_efx/base/ef10_nic.c
@@ -1223,6 +1223,12 @@ ef10_get_datapath_caps(
else
encp->enc_hw_tx_insert_vlan_enabled = B_FALSE;
+ /* Check if firmware supports VLAN stripping. */
+ if (CAP_FLAGS1(req, RX_VLAN_STRIPPING))
+ encp->enc_rx_vlan_stripping_supported = B_TRUE;
+ else
+ encp->enc_rx_vlan_stripping_supported = B_FALSE;
+
/* Check if the firmware supports RX event batching */
if (CAP_FLAGS1(req, RX_BATCHING))
encp->enc_rx_batching_enabled = B_TRUE;
diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h
index ef626cc55a..7fcf48f5e1 100644
--- a/drivers/common/sfc_efx/base/efx.h
+++ b/drivers/common/sfc_efx/base/efx.h
@@ -1627,6 +1627,7 @@ typedef struct efx_nic_cfg_s {
/* Number of TSO contexts on the NIC (FATSOv2) */
uint32_t enc_fw_assisted_tso_v2_n_contexts;
boolean_t enc_hw_tx_insert_vlan_enabled;
+ boolean_t enc_rx_vlan_stripping_supported;
/* Number of PFs on the NIC */
uint32_t enc_hw_pf_count;
/* Datapath firmware vadapter/vport/vswitch support */
diff --git a/drivers/common/sfc_efx/base/siena_nic.c b/drivers/common/sfc_efx/base/siena_nic.c
index ca38eefa7e..e334f01b03 100644
--- a/drivers/common/sfc_efx/base/siena_nic.c
+++ b/drivers/common/sfc_efx/base/siena_nic.c
@@ -179,6 +179,7 @@ siena_board_cfg(
(encp->enc_rxq_limit * EFX_RXQ_DC_NDESCS(EFX_RXQ_DC_SIZE));
encp->enc_hw_tx_insert_vlan_enabled = B_FALSE;
+ encp->enc_rx_vlan_stripping_supported = B_FALSE;
encp->enc_fw_assisted_tso_enabled = B_FALSE;
encp->enc_fw_assisted_tso_v2_enabled = B_FALSE;
encp->enc_fw_assisted_tso_v2_n_contexts = 0;
--
2.34.1
More information about the dev
mailing list