[PATCH v2 1/2] common/sfc_efx/base: add MAE IP fragmentation match bits

Artemii Morozov artemii.morozov at arknetworks.am
Wed Jun 28 09:00:21 CEST 2023


Introduce necessary infrastructure for these bits to
be set and validated. Using a combination of these bits
IP fragmentation can be configured.

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>
---
 drivers/common/sfc_efx/base/efx.h     | 4 ++++
 drivers/common/sfc_efx/base/efx_mae.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h
index 77f855bfb0..efefea717f 100644
--- a/drivers/common/sfc_efx/base/efx.h
+++ b/drivers/common/sfc_efx/base/efx.h
@@ -4317,6 +4317,10 @@ typedef enum efx_mae_field_id_e {
 	 */
 	EFX_MAE_FIELD_RECIRC_ID,
 	EFX_MAE_FIELD_CT_MARK,
+
+	/* Single bits which can be set by efx_mae_match_spec_bit_set(). */
+	EFX_MAE_FIELD_IS_IP_FRAG,
+	EFX_MAE_FIELD_IP_FIRST_FRAG,
 	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 9ff887e04b..d36cdc71be 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -483,6 +483,8 @@ typedef enum efx_mae_field_cap_id_e {
 	EFX_MAE_FIELD_ID_ENC_HAS_IVLAN = MAE_FIELD_ENC_HAS_IVLAN,
 	EFX_MAE_FIELD_ID_RECIRC_ID = MAE_FIELD_RECIRC_ID,
 	EFX_MAE_FIELD_ID_CT_MARK = MAE_FIELD_CT_MARK,
+	EFX_MAE_FIELD_ID_IS_IP_FRAG = MAE_FIELD_IS_IP_FRAG,
+	EFX_MAE_FIELD_ID_IP_FIRST_FRAG = MAE_FIELD_IP_FIRST_FRAG,
 
 	EFX_MAE_FIELD_CAP_NIDS
 } efx_mae_field_cap_id_t;
@@ -668,6 +670,8 @@ static const efx_mae_mv_bit_desc_t __efx_mae_action_rule_mv_bit_desc_set[] = {
 	EFX_MAE_MV_BIT_DESC(HAS_IVLAN),
 	EFX_MAE_MV_BIT_DESC(ENC_HAS_OVLAN),
 	EFX_MAE_MV_BIT_DESC(ENC_HAS_IVLAN),
+	EFX_MAE_MV_BIT_DESC(IS_IP_FRAG),
+	EFX_MAE_MV_BIT_DESC(IP_FIRST_FRAG),
 
 #undef EFX_MAE_MV_BIT_DESC
 };
-- 
2.34.1



More information about the dev mailing list