common/sfc_efx/base: add MAE match field VNET ID for tunnels
authorIvan Malov <ivan.malov@oktetlabs.ru>
Tue, 20 Oct 2020 09:13:37 +0000 (10:13 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:24:25 +0000 (23:24 +0100)
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 <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
drivers/common/sfc_efx/base/efx.h
drivers/common/sfc_efx/base/efx_mae.c

index 29ef20f..901d653 100644 (file)
@@ -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;
index 6f32a82..20473a3 100644 (file)
@@ -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
 };