From 0ec6faf41d92c78acada0bd923344261ee0169bf Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Tue, 20 Oct 2020 10:13:37 +0100 Subject: [PATCH] common/sfc_efx/base: add MAE match field VNET ID for tunnels Add MCDI-compatible enumeration for this field and provide necessary mappings for it to be inserted directly into mask-value pairs buffer. VNET_ID can be used to serve the following match fields: rte_flow_item_vxlan.vni, rte_flow_item_geneve.vni, rte_flow_item_nvgre.tni Signed-off-by: Ivan Malov Signed-off-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- drivers/common/sfc_efx/base/efx.h | 1 + drivers/common/sfc_efx/base/efx_mae.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h index 29ef20facc..901d653262 100644 --- a/drivers/common/sfc_efx/base/efx.h +++ b/drivers/common/sfc_efx/base/efx.h @@ -4136,6 +4136,7 @@ typedef enum efx_mae_field_id_e { EFX_MAE_FIELD_ENC_DST_IP6_BE, EFX_MAE_FIELD_ENC_L4_SPORT_BE, EFX_MAE_FIELD_ENC_L4_DPORT_BE, + EFX_MAE_FIELD_ENC_VNET_ID_BE, EFX_MAE_FIELD_NIDS } efx_mae_field_id_t; diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c index 6f32a82aba..20473a3b54 100644 --- a/drivers/common/sfc_efx/base/efx_mae.c +++ b/drivers/common/sfc_efx/base/efx_mae.c @@ -340,6 +340,7 @@ typedef enum efx_mae_field_cap_id_e { EFX_MAE_FIELD_ID_ENC_DST_IP6_BE = MAE_FIELD_ENC_DST_IP6, EFX_MAE_FIELD_ID_ENC_L4_SPORT_BE = MAE_FIELD_ENC_L4_SPORT, EFX_MAE_FIELD_ID_ENC_L4_DPORT_BE = MAE_FIELD_ENC_L4_DPORT, + EFX_MAE_FIELD_ID_ENC_VNET_ID_BE = MAE_FIELD_ENC_VNET_ID, EFX_MAE_FIELD_CAP_NIDS } efx_mae_field_cap_id_t; @@ -399,6 +400,7 @@ static const efx_mae_mv_desc_t __efx_mae_action_rule_mv_desc_set[] = { EFX_MAE_MV_DESC(L4_SPORT_BE, EFX_MAE_FIELD_BE), EFX_MAE_MV_DESC(L4_DPORT_BE, EFX_MAE_FIELD_BE), EFX_MAE_MV_DESC(TCP_FLAGS_BE, EFX_MAE_FIELD_BE), + EFX_MAE_MV_DESC(ENC_VNET_ID_BE, EFX_MAE_FIELD_BE), #undef EFX_MAE_MV_DESC }; -- 2.20.1