On 6/22/23 14:31, Artemii Morozov wrote:
To enable VLAN stripping, two conditions must be met:
the corresponding flag must be set and the appropriate
Rx prefix should be requested.
VLAN stripping is supported on EF100.
Signed-off-by: Artemii Morozov <[email protected]>
Reviewed-by: Ivan Malov <[email protected]>
Reviewed-by: Andy Moreton <[email protected]>
with minor style fix, see below:
Acked-by: Andrew Rybchenko <[email protected]>
diff --git a/drivers/common/sfc_efx/base/ef10_filter.c
b/drivers/common/sfc_efx/base/ef10_filter.c
index 278502fb61..827b3e8f00 100644
--- a/drivers/common/sfc_efx/base/ef10_filter.c
+++ b/drivers/common/sfc_efx/base/ef10_filter.c
@@ -171,6 +171,7 @@ efx_mcdi_filter_op_add(
EFX_MCDI_DECLARE_BUF(payload, MC_CMD_FILTER_OP_V3_IN_LEN,
MC_CMD_FILTER_OP_EXT_OUT_LEN);
efx_filter_match_flags_t match_flags;
+ efx_port_t *epp = &(enp->en_port);
uint32_t port_id;
efx_rc_t rc;
@@ -338,6 +339,11 @@ efx_mcdi_filter_op_add(
FILTER_OP_V3_IN_MATCH_SET_FLAG, 1);
}
+ if (epp->ep_vlan_strip) {
+ MCDI_IN_SET_DWORD_FIELD(req, FILTER_OP_V3_IN_MATCH_ACTION_FLAGS,
+ FILTER_OP_V3_IN_MATCH_STRIP_VLAN, 1);
4 spaces alignment, please, on line continuation in libefx
+ }
+
efx_mcdi_execute(enp, &req);
if (req.emr_rc != 0) {
[snip]