Commit a5cc98ad authored by Steen Hegelund's avatar Steen Hegelund Committed by Paolo Abeni
Browse files

net: microchip: sparx5: Add ES0 VCAP model and updated KUNIT VCAP model



This provides the VCAP model for the Sparx5 ES0 (Egress Stage 0) VCAP.

This VCAP provides rewriting functionality in the egress path.

Signed-off-by: default avatarSteen Hegelund <steen.hegelund@microchip.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent b5b0c364
Loading
Loading
Loading
Loading
+382 −3
Original line number Diff line number Diff line
@@ -3,8 +3,8 @@
 * Microchip VCAP API
 */

/* This file is autogenerated by cml-utils 2023-01-17 16:55:38 +0100.
 * Commit ID: cc027a9bd71002aebf074df5ad8584fe1545e05e
/* This file is autogenerated by cml-utils 2023-02-10 11:15:56 +0100.
 * Commit ID: c30fb4bf0281cd4a7133bdab6682f9e43c872ada
 */

#include <linux/types.h>
@@ -1333,6 +1333,54 @@ static const struct vcap_field is2_ip_7tuple_keyfield[] = {
	},
};

static const struct vcap_field es0_isdx_keyfield[] = {
	[VCAP_KF_TYPE] = {
		.type = VCAP_FIELD_BIT,
		.offset = 0,
		.width = 1,
	},
	[VCAP_KF_IF_EGR_PORT_NO] = {
		.type = VCAP_FIELD_U32,
		.offset = 1,
		.width = 7,
	},
	[VCAP_KF_8021Q_VID_CLS] = {
		.type = VCAP_FIELD_U32,
		.offset = 8,
		.width = 13,
	},
	[VCAP_KF_COSID_CLS] = {
		.type = VCAP_FIELD_U32,
		.offset = 21,
		.width = 3,
	},
	[VCAP_KF_8021Q_TPID] = {
		.type = VCAP_FIELD_U32,
		.offset = 24,
		.width = 3,
	},
	[VCAP_KF_L3_DPL_CLS] = {
		.type = VCAP_FIELD_BIT,
		.offset = 27,
		.width = 1,
	},
	[VCAP_KF_ISDX_GT0_IS] = {
		.type = VCAP_FIELD_BIT,
		.offset = 28,
		.width = 1,
	},
	[VCAP_KF_PROT_ACTIVE] = {
		.type = VCAP_FIELD_BIT,
		.offset = 29,
		.width = 1,
	},
	[VCAP_KF_ISDX_CLS] = {
		.type = VCAP_FIELD_U32,
		.offset = 39,
		.width = 12,
	},
};

static const struct vcap_field es2_mac_etype_keyfield[] = {
	[VCAP_KF_TYPE] = {
		.type = VCAP_FIELD_U32,
@@ -2283,6 +2331,14 @@ static const struct vcap_set is2_keyfield_set[] = {
	},
};

static const struct vcap_set es0_keyfield_set[] = {
	[VCAP_KFS_ISDX] = {
		.type_id = 0,
		.sw_per_item = 1,
		.sw_cnt = 1,
	},
};

static const struct vcap_set es2_keyfield_set[] = {
	[VCAP_KFS_MAC_ETYPE] = {
		.type_id = 0,
@@ -2331,6 +2387,10 @@ static const struct vcap_field *is2_keyfield_set_map[] = {
	[VCAP_KFS_IP_7TUPLE] = is2_ip_7tuple_keyfield,
};

static const struct vcap_field *es0_keyfield_set_map[] = {
	[VCAP_KFS_ISDX] = es0_isdx_keyfield,
};

static const struct vcap_field *es2_keyfield_set_map[] = {
	[VCAP_KFS_MAC_ETYPE] = es2_mac_etype_keyfield,
	[VCAP_KFS_ARP] = es2_arp_keyfield,
@@ -2355,6 +2415,10 @@ static int is2_keyfield_set_map_size[] = {
	[VCAP_KFS_IP_7TUPLE] = ARRAY_SIZE(is2_ip_7tuple_keyfield),
};

static int es0_keyfield_set_map_size[] = {
	[VCAP_KFS_ISDX] = ARRAY_SIZE(es0_isdx_keyfield),
};

static int es2_keyfield_set_map_size[] = {
	[VCAP_KFS_MAC_ETYPE] = ARRAY_SIZE(es2_mac_etype_keyfield),
	[VCAP_KFS_ARP] = ARRAY_SIZE(es2_arp_keyfield),
@@ -2752,6 +2816,184 @@ static const struct vcap_field is2_base_type_actionfield[] = {
	},
};

static const struct vcap_field es0_es0_actionfield[] = {
	[VCAP_AF_PUSH_OUTER_TAG] = {
		.type = VCAP_FIELD_U32,
		.offset = 0,
		.width = 2,
	},
	[VCAP_AF_PUSH_INNER_TAG] = {
		.type = VCAP_FIELD_BIT,
		.offset = 2,
		.width = 1,
	},
	[VCAP_AF_TAG_A_TPID_SEL] = {
		.type = VCAP_FIELD_U32,
		.offset = 3,
		.width = 3,
	},
	[VCAP_AF_TAG_A_VID_SEL] = {
		.type = VCAP_FIELD_U32,
		.offset = 6,
		.width = 2,
	},
	[VCAP_AF_TAG_A_PCP_SEL] = {
		.type = VCAP_FIELD_U32,
		.offset = 8,
		.width = 3,
	},
	[VCAP_AF_TAG_A_DEI_SEL] = {
		.type = VCAP_FIELD_U32,
		.offset = 11,
		.width = 3,
	},
	[VCAP_AF_TAG_B_TPID_SEL] = {
		.type = VCAP_FIELD_U32,
		.offset = 14,
		.width = 3,
	},
	[VCAP_AF_TAG_B_VID_SEL] = {
		.type = VCAP_FIELD_U32,
		.offset = 17,
		.width = 2,
	},
	[VCAP_AF_TAG_B_PCP_SEL] = {
		.type = VCAP_FIELD_U32,
		.offset = 19,
		.width = 3,
	},
	[VCAP_AF_TAG_B_DEI_SEL] = {
		.type = VCAP_FIELD_U32,
		.offset = 22,
		.width = 3,
	},
	[VCAP_AF_TAG_C_TPID_SEL] = {
		.type = VCAP_FIELD_U32,
		.offset = 25,
		.width = 3,
	},
	[VCAP_AF_TAG_C_PCP_SEL] = {
		.type = VCAP_FIELD_U32,
		.offset = 28,
		.width = 3,
	},
	[VCAP_AF_TAG_C_DEI_SEL] = {
		.type = VCAP_FIELD_U32,
		.offset = 31,
		.width = 3,
	},
	[VCAP_AF_VID_A_VAL] = {
		.type = VCAP_FIELD_U32,
		.offset = 34,
		.width = 12,
	},
	[VCAP_AF_PCP_A_VAL] = {
		.type = VCAP_FIELD_U32,
		.offset = 46,
		.width = 3,
	},
	[VCAP_AF_DEI_A_VAL] = {
		.type = VCAP_FIELD_BIT,
		.offset = 49,
		.width = 1,
	},
	[VCAP_AF_VID_B_VAL] = {
		.type = VCAP_FIELD_U32,
		.offset = 50,
		.width = 12,
	},
	[VCAP_AF_PCP_B_VAL] = {
		.type = VCAP_FIELD_U32,
		.offset = 62,
		.width = 3,
	},
	[VCAP_AF_DEI_B_VAL] = {
		.type = VCAP_FIELD_BIT,
		.offset = 65,
		.width = 1,
	},
	[VCAP_AF_VID_C_VAL] = {
		.type = VCAP_FIELD_U32,
		.offset = 66,
		.width = 12,
	},
	[VCAP_AF_PCP_C_VAL] = {
		.type = VCAP_FIELD_U32,
		.offset = 78,
		.width = 3,
	},
	[VCAP_AF_DEI_C_VAL] = {
		.type = VCAP_FIELD_BIT,
		.offset = 81,
		.width = 1,
	},
	[VCAP_AF_POP_VAL] = {
		.type = VCAP_FIELD_U32,
		.offset = 82,
		.width = 2,
	},
	[VCAP_AF_UNTAG_VID_ENA] = {
		.type = VCAP_FIELD_BIT,
		.offset = 84,
		.width = 1,
	},
	[VCAP_AF_PUSH_CUSTOMER_TAG] = {
		.type = VCAP_FIELD_U32,
		.offset = 85,
		.width = 2,
	},
	[VCAP_AF_TAG_C_VID_SEL] = {
		.type = VCAP_FIELD_U32,
		.offset = 87,
		.width = 2,
	},
	[VCAP_AF_DSCP_SEL] = {
		.type = VCAP_FIELD_U32,
		.offset = 127,
		.width = 3,
	},
	[VCAP_AF_DSCP_VAL] = {
		.type = VCAP_FIELD_U32,
		.offset = 130,
		.width = 6,
	},
	[VCAP_AF_ESDX] = {
		.type = VCAP_FIELD_U32,
		.offset = 323,
		.width = 13,
	},
	[VCAP_AF_FWD_SEL] = {
		.type = VCAP_FIELD_U32,
		.offset = 459,
		.width = 2,
	},
	[VCAP_AF_CPU_QU] = {
		.type = VCAP_FIELD_U32,
		.offset = 461,
		.width = 3,
	},
	[VCAP_AF_PIPELINE_PT] = {
		.type = VCAP_FIELD_U32,
		.offset = 464,
		.width = 2,
	},
	[VCAP_AF_PIPELINE_ACT] = {
		.type = VCAP_FIELD_BIT,
		.offset = 466,
		.width = 1,
	},
	[VCAP_AF_SWAP_MACS_ENA] = {
		.type = VCAP_FIELD_BIT,
		.offset = 475,
		.width = 1,
	},
	[VCAP_AF_LOOP_ENA] = {
		.type = VCAP_FIELD_BIT,
		.offset = 476,
		.width = 1,
	},
};

static const struct vcap_field es2_base_type_actionfield[] = {
	[VCAP_AF_HIT_ME_ONCE] = {
		.type = VCAP_FIELD_BIT,
@@ -2852,6 +3094,14 @@ static const struct vcap_set is2_actionfield_set[] = {
	},
};

static const struct vcap_set es0_actionfield_set[] = {
	[VCAP_AFS_ES0] = {
		.type_id = -1,
		.sw_per_item = 1,
		.sw_cnt = 1,
	},
};

static const struct vcap_set es2_actionfield_set[] = {
	[VCAP_AFS_BASE_TYPE] = {
		.type_id = -1,
@@ -2871,6 +3121,10 @@ static const struct vcap_field *is2_actionfield_set_map[] = {
	[VCAP_AFS_BASE_TYPE] = is2_base_type_actionfield,
};

static const struct vcap_field *es0_actionfield_set_map[] = {
	[VCAP_AFS_ES0] = es0_es0_actionfield,
};

static const struct vcap_field *es2_actionfield_set_map[] = {
	[VCAP_AFS_BASE_TYPE] = es2_base_type_actionfield,
};
@@ -2886,6 +3140,10 @@ static int is2_actionfield_set_map_size[] = {
	[VCAP_AFS_BASE_TYPE] = ARRAY_SIZE(is2_base_type_actionfield),
};

static int es0_actionfield_set_map_size[] = {
	[VCAP_AFS_ES0] = ARRAY_SIZE(es0_es0_actionfield),
};

static int es2_actionfield_set_map_size[] = {
	[VCAP_AFS_BASE_TYPE] = ARRAY_SIZE(es2_base_type_actionfield),
};
@@ -2990,10 +3248,35 @@ static const struct vcap_typegroup is0_x6_keyfield_set_typegroups[] = {
};

static const struct vcap_typegroup is0_x3_keyfield_set_typegroups[] = {
	{
		.offset = 0,
		.width = 3,
		.value = 4,
	},
	{
		.offset = 52,
		.width = 2,
		.value = 0,
	},
	{
		.offset = 104,
		.width = 2,
		.value = 0,
	},
	{}
};

static const struct vcap_typegroup is0_x2_keyfield_set_typegroups[] = {
	{
		.offset = 0,
		.width = 2,
		.value = 2,
	},
	{
		.offset = 52,
		.width = 1,
		.value = 0,
	},
	{}
};

@@ -3047,6 +3330,10 @@ static const struct vcap_typegroup is2_x1_keyfield_set_typegroups[] = {
	{}
};

static const struct vcap_typegroup es0_x1_keyfield_set_typegroups[] = {
	{}
};

static const struct vcap_typegroup es2_x12_keyfield_set_typegroups[] = {
	{
		.offset = 0,
@@ -3086,6 +3373,11 @@ static const struct vcap_typegroup es2_x6_keyfield_set_typegroups[] = {
};

static const struct vcap_typegroup es2_x3_keyfield_set_typegroups[] = {
	{
		.offset = 0,
		.width = 1,
		.value = 1,
	},
	{}
};

@@ -3110,6 +3402,11 @@ static const struct vcap_typegroup *is2_keyfield_set_typegroups[] = {
	[13] = NULL,
};

static const struct vcap_typegroup *es0_keyfield_set_typegroups[] = {
	[1] = es0_x1_keyfield_set_typegroups,
	[2] = NULL,
};

static const struct vcap_typegroup *es2_keyfield_set_typegroups[] = {
	[12] = es2_x12_keyfield_set_typegroups,
	[6] = es2_x6_keyfield_set_typegroups,
@@ -3183,6 +3480,10 @@ static const struct vcap_typegroup is2_x1_actionfield_set_typegroups[] = {
	{}
};

static const struct vcap_typegroup es0_x1_actionfield_set_typegroups[] = {
	{}
};

static const struct vcap_typegroup es2_x3_actionfield_set_typegroups[] = {
	{
		.offset = 0,
@@ -3219,6 +3520,11 @@ static const struct vcap_typegroup *is2_actionfield_set_typegroups[] = {
	[13] = NULL,
};

static const struct vcap_typegroup *es0_actionfield_set_typegroups[] = {
	[1] = es0_x1_actionfield_set_typegroups,
	[2] = NULL,
};

static const struct vcap_typegroup *es2_actionfield_set_typegroups[] = {
	[3] = es2_x3_actionfield_set_typegroups,
	[1] = es2_x1_actionfield_set_typegroups,
@@ -3229,18 +3535,24 @@ static const struct vcap_typegroup *es2_actionfield_set_typegroups[] = {
static const char * const vcap_keyfield_set_names[] = {
	[VCAP_KFS_NO_VALUE]                      =  "(None)",
	[VCAP_KFS_ARP]                           =  "VCAP_KFS_ARP",
	[VCAP_KFS_ETAG]                          =  "VCAP_KFS_ETAG",
	[VCAP_KFS_IP4_OTHER]                     =  "VCAP_KFS_IP4_OTHER",
	[VCAP_KFS_IP4_TCP_UDP]                   =  "VCAP_KFS_IP4_TCP_UDP",
	[VCAP_KFS_IP4_VID]                       =  "VCAP_KFS_IP4_VID",
	[VCAP_KFS_IP6_OTHER]                     =  "VCAP_KFS_IP6_OTHER",
	[VCAP_KFS_IP6_STD]                       =  "VCAP_KFS_IP6_STD",
	[VCAP_KFS_IP6_TCP_UDP]                   =  "VCAP_KFS_IP6_TCP_UDP",
	[VCAP_KFS_IP6_VID]                       =  "VCAP_KFS_IP6_VID",
	[VCAP_KFS_IP_7TUPLE]                     =  "VCAP_KFS_IP_7TUPLE",
	[VCAP_KFS_ISDX]                          =  "VCAP_KFS_ISDX",
	[VCAP_KFS_LL_FULL]                       =  "VCAP_KFS_LL_FULL",
	[VCAP_KFS_MAC_ETYPE]                     =  "VCAP_KFS_MAC_ETYPE",
	[VCAP_KFS_MAC_LLC]                       =  "VCAP_KFS_MAC_LLC",
	[VCAP_KFS_MAC_SNAP]                      =  "VCAP_KFS_MAC_SNAP",
	[VCAP_KFS_NORMAL_5TUPLE_IP4]             =  "VCAP_KFS_NORMAL_5TUPLE_IP4",
	[VCAP_KFS_NORMAL_7TUPLE]                 =  "VCAP_KFS_NORMAL_7TUPLE",
	[VCAP_KFS_OAM]                           =  "VCAP_KFS_OAM",
	[VCAP_KFS_PURE_5TUPLE_IP4]               =  "VCAP_KFS_PURE_5TUPLE_IP4",
	[VCAP_KFS_SMAC_SIP4]                     =  "VCAP_KFS_SMAC_SIP4",
	[VCAP_KFS_SMAC_SIP6]                     =  "VCAP_KFS_SMAC_SIP6",
};
@@ -3251,6 +3563,7 @@ static const char * const vcap_actionfield_set_names[] = {
	[VCAP_AFS_BASE_TYPE]                     =  "VCAP_AFS_BASE_TYPE",
	[VCAP_AFS_CLASSIFICATION]                =  "VCAP_AFS_CLASSIFICATION",
	[VCAP_AFS_CLASS_REDUCED]                 =  "VCAP_AFS_CLASS_REDUCED",
	[VCAP_AFS_ES0]                           =  "VCAP_AFS_ES0",
	[VCAP_AFS_FULL]                          =  "VCAP_AFS_FULL",
	[VCAP_AFS_SMAC_SIP]                      =  "VCAP_AFS_SMAC_SIP",
};
@@ -3258,6 +3571,12 @@ static const char * const vcap_actionfield_set_names[] = {
/* Keyfield names */
static const char * const vcap_keyfield_names[] = {
	[VCAP_KF_NO_VALUE]                       =  "(None)",
	[VCAP_KF_8021BR_ECID_BASE]               =  "8021BR_ECID_BASE",
	[VCAP_KF_8021BR_ECID_EXT]                =  "8021BR_ECID_EXT",
	[VCAP_KF_8021BR_E_TAGGED]                =  "8021BR_E_TAGGED",
	[VCAP_KF_8021BR_GRP]                     =  "8021BR_GRP",
	[VCAP_KF_8021BR_IGR_ECID_BASE]           =  "8021BR_IGR_ECID_BASE",
	[VCAP_KF_8021BR_IGR_ECID_EXT]            =  "8021BR_IGR_ECID_EXT",
	[VCAP_KF_8021Q_DEI0]                     =  "8021Q_DEI0",
	[VCAP_KF_8021Q_DEI1]                     =  "8021Q_DEI1",
	[VCAP_KF_8021Q_DEI2]                     =  "8021Q_DEI2",
@@ -3266,6 +3585,7 @@ static const char * const vcap_keyfield_names[] = {
	[VCAP_KF_8021Q_PCP1]                     =  "8021Q_PCP1",
	[VCAP_KF_8021Q_PCP2]                     =  "8021Q_PCP2",
	[VCAP_KF_8021Q_PCP_CLS]                  =  "8021Q_PCP_CLS",
	[VCAP_KF_8021Q_TPID]                     =  "8021Q_TPID",
	[VCAP_KF_8021Q_TPID0]                    =  "8021Q_TPID0",
	[VCAP_KF_8021Q_TPID1]                    =  "8021Q_TPID1",
	[VCAP_KF_8021Q_TPID2]                    =  "8021Q_TPID2",
@@ -3275,6 +3595,7 @@ static const char * const vcap_keyfield_names[] = {
	[VCAP_KF_8021Q_VID_CLS]                  =  "8021Q_VID_CLS",
	[VCAP_KF_8021Q_VLAN_TAGGED_IS]           =  "8021Q_VLAN_TAGGED_IS",
	[VCAP_KF_8021Q_VLAN_TAGS]                =  "8021Q_VLAN_TAGS",
	[VCAP_KF_ACL_GRP_ID]                     =  "ACL_GRP_ID",
	[VCAP_KF_ARP_ADDR_SPACE_OK_IS]           =  "ARP_ADDR_SPACE_OK_IS",
	[VCAP_KF_ARP_LEN_OK_IS]                  =  "ARP_LEN_OK_IS",
	[VCAP_KF_ARP_OPCODE]                     =  "ARP_OPCODE",
@@ -3283,11 +3604,13 @@ static const char * const vcap_keyfield_names[] = {
	[VCAP_KF_ARP_SENDER_MATCH_IS]            =  "ARP_SENDER_MATCH_IS",
	[VCAP_KF_ARP_TGT_MATCH_IS]               =  "ARP_TGT_MATCH_IS",
	[VCAP_KF_COSID_CLS]                      =  "COSID_CLS",
	[VCAP_KF_ES0_ISDX_KEY_ENA]               =  "ES0_ISDX_KEY_ENA",
	[VCAP_KF_ETYPE]                          =  "ETYPE",
	[VCAP_KF_ETYPE_LEN_IS]                   =  "ETYPE_LEN_IS",
	[VCAP_KF_HOST_MATCH]                     =  "HOST_MATCH",
	[VCAP_KF_IF_EGR_PORT_MASK]               =  "IF_EGR_PORT_MASK",
	[VCAP_KF_IF_EGR_PORT_MASK_RNG]           =  "IF_EGR_PORT_MASK_RNG",
	[VCAP_KF_IF_EGR_PORT_NO]                 =  "IF_EGR_PORT_NO",
	[VCAP_KF_IF_IGR_PORT]                    =  "IF_IGR_PORT",
	[VCAP_KF_IF_IGR_PORT_MASK]               =  "IF_IGR_PORT_MASK",
	[VCAP_KF_IF_IGR_PORT_MASK_L3]            =  "IF_IGR_PORT_MASK_L3",
@@ -3348,6 +3671,7 @@ static const char * const vcap_keyfield_names[] = {
	[VCAP_KF_LOOKUP_GEN_IDX]                 =  "LOOKUP_GEN_IDX",
	[VCAP_KF_LOOKUP_GEN_IDX_SEL]             =  "LOOKUP_GEN_IDX_SEL",
	[VCAP_KF_LOOKUP_PAG]                     =  "LOOKUP_PAG",
	[VCAP_KF_MIRROR_PROBE]                   =  "MIRROR_PROBE",
	[VCAP_KF_OAM_CCM_CNTS_EQ0]               =  "OAM_CCM_CNTS_EQ0",
	[VCAP_KF_OAM_DETECTED]                   =  "OAM_DETECTED",
	[VCAP_KF_OAM_FLAGS]                      =  "OAM_FLAGS",
@@ -3356,6 +3680,7 @@ static const char * const vcap_keyfield_names[] = {
	[VCAP_KF_OAM_OPCODE]                     =  "OAM_OPCODE",
	[VCAP_KF_OAM_VER]                        =  "OAM_VER",
	[VCAP_KF_OAM_Y1731_IS]                   =  "OAM_Y1731_IS",
	[VCAP_KF_PROT_ACTIVE]                    =  "PROT_ACTIVE",
	[VCAP_KF_TCP_IS]                         =  "TCP_IS",
	[VCAP_KF_TCP_UDP_IS]                     =  "TCP_UDP_IS",
	[VCAP_KF_TYPE]                           =  "TYPE",
@@ -3370,16 +3695,23 @@ static const char * const vcap_actionfield_names[] = {
	[VCAP_AF_COPY_PORT_NUM]                  =  "COPY_PORT_NUM",
	[VCAP_AF_COPY_QUEUE_NUM]                 =  "COPY_QUEUE_NUM",
	[VCAP_AF_CPU_COPY_ENA]                   =  "CPU_COPY_ENA",
	[VCAP_AF_CPU_QU]                         =  "CPU_QU",
	[VCAP_AF_CPU_QUEUE_NUM]                  =  "CPU_QUEUE_NUM",
	[VCAP_AF_DEI_A_VAL]                      =  "DEI_A_VAL",
	[VCAP_AF_DEI_B_VAL]                      =  "DEI_B_VAL",
	[VCAP_AF_DEI_C_VAL]                      =  "DEI_C_VAL",
	[VCAP_AF_DEI_ENA]                        =  "DEI_ENA",
	[VCAP_AF_DEI_VAL]                        =  "DEI_VAL",
	[VCAP_AF_DP_ENA]                         =  "DP_ENA",
	[VCAP_AF_DP_VAL]                         =  "DP_VAL",
	[VCAP_AF_DSCP_ENA]                       =  "DSCP_ENA",
	[VCAP_AF_DSCP_SEL]                       =  "DSCP_SEL",
	[VCAP_AF_DSCP_VAL]                       =  "DSCP_VAL",
	[VCAP_AF_ES2_REW_CMD]                    =  "ES2_REW_CMD",
	[VCAP_AF_ESDX]                           =  "ESDX",
	[VCAP_AF_FWD_KILL_ENA]                   =  "FWD_KILL_ENA",
	[VCAP_AF_FWD_MODE]                       =  "FWD_MODE",
	[VCAP_AF_FWD_SEL]                        =  "FWD_SEL",
	[VCAP_AF_HIT_ME_ONCE]                    =  "HIT_ME_ONCE",
	[VCAP_AF_HOST_MATCH]                     =  "HOST_MATCH",
	[VCAP_AF_IGNORE_PIPELINE_CTRL]           =  "IGNORE_PIPELINE_CTRL",
@@ -3387,6 +3719,7 @@ static const char * const vcap_actionfield_names[] = {
	[VCAP_AF_ISDX_ADD_REPLACE_SEL]           =  "ISDX_ADD_REPLACE_SEL",
	[VCAP_AF_ISDX_ENA]                       =  "ISDX_ENA",
	[VCAP_AF_ISDX_VAL]                       =  "ISDX_VAL",
	[VCAP_AF_LOOP_ENA]                       =  "LOOP_ENA",
	[VCAP_AF_LRN_DIS]                        =  "LRN_DIS",
	[VCAP_AF_MAP_IDX]                        =  "MAP_IDX",
	[VCAP_AF_MAP_KEY]                        =  "MAP_KEY",
@@ -3401,20 +3734,45 @@ static const char * const vcap_actionfield_names[] = {
	[VCAP_AF_NXT_IDX_CTRL]                   =  "NXT_IDX_CTRL",
	[VCAP_AF_PAG_OVERRIDE_MASK]              =  "PAG_OVERRIDE_MASK",
	[VCAP_AF_PAG_VAL]                        =  "PAG_VAL",
	[VCAP_AF_PCP_A_VAL]                      =  "PCP_A_VAL",
	[VCAP_AF_PCP_B_VAL]                      =  "PCP_B_VAL",
	[VCAP_AF_PCP_C_VAL]                      =  "PCP_C_VAL",
	[VCAP_AF_PCP_ENA]                        =  "PCP_ENA",
	[VCAP_AF_PCP_VAL]                        =  "PCP_VAL",
	[VCAP_AF_PIPELINE_ACT]                   =  "PIPELINE_ACT",
	[VCAP_AF_PIPELINE_FORCE_ENA]             =  "PIPELINE_FORCE_ENA",
	[VCAP_AF_PIPELINE_PT]                    =  "PIPELINE_PT",
	[VCAP_AF_POLICE_ENA]                     =  "POLICE_ENA",
	[VCAP_AF_POLICE_IDX]                     =  "POLICE_IDX",
	[VCAP_AF_POLICE_REMARK]                  =  "POLICE_REMARK",
	[VCAP_AF_POLICE_VCAP_ONLY]               =  "POLICE_VCAP_ONLY",
	[VCAP_AF_POP_VAL]                        =  "POP_VAL",
	[VCAP_AF_PORT_MASK]                      =  "PORT_MASK",
	[VCAP_AF_PUSH_CUSTOMER_TAG]              =  "PUSH_CUSTOMER_TAG",
	[VCAP_AF_PUSH_INNER_TAG]                 =  "PUSH_INNER_TAG",
	[VCAP_AF_PUSH_OUTER_TAG]                 =  "PUSH_OUTER_TAG",
	[VCAP_AF_QOS_ENA]                        =  "QOS_ENA",
	[VCAP_AF_QOS_VAL]                        =  "QOS_VAL",
	[VCAP_AF_REW_OP]                         =  "REW_OP",
	[VCAP_AF_RT_DIS]                         =  "RT_DIS",
	[VCAP_AF_SWAP_MACS_ENA]                  =  "SWAP_MACS_ENA",
	[VCAP_AF_TAG_A_DEI_SEL]                  =  "TAG_A_DEI_SEL",
	[VCAP_AF_TAG_A_PCP_SEL]                  =  "TAG_A_PCP_SEL",
	[VCAP_AF_TAG_A_TPID_SEL]                 =  "TAG_A_TPID_SEL",
	[VCAP_AF_TAG_A_VID_SEL]                  =  "TAG_A_VID_SEL",
	[VCAP_AF_TAG_B_DEI_SEL]                  =  "TAG_B_DEI_SEL",
	[VCAP_AF_TAG_B_PCP_SEL]                  =  "TAG_B_PCP_SEL",
	[VCAP_AF_TAG_B_TPID_SEL]                 =  "TAG_B_TPID_SEL",
	[VCAP_AF_TAG_B_VID_SEL]                  =  "TAG_B_VID_SEL",
	[VCAP_AF_TAG_C_DEI_SEL]                  =  "TAG_C_DEI_SEL",
	[VCAP_AF_TAG_C_PCP_SEL]                  =  "TAG_C_PCP_SEL",
	[VCAP_AF_TAG_C_TPID_SEL]                 =  "TAG_C_TPID_SEL",
	[VCAP_AF_TAG_C_VID_SEL]                  =  "TAG_C_VID_SEL",
	[VCAP_AF_TYPE]                           =  "TYPE",
	[VCAP_AF_UNTAG_VID_ENA]                  =  "UNTAG_VID_ENA",
	[VCAP_AF_VID_A_VAL]                      =  "VID_A_VAL",
	[VCAP_AF_VID_B_VAL]                      =  "VID_B_VAL",
	[VCAP_AF_VID_C_VAL]                      =  "VID_C_VAL",
	[VCAP_AF_VID_VAL]                        =  "VID_VAL",
};

@@ -3462,6 +3820,27 @@ const struct vcap_info sparx5_vcaps[] = {
		.keyfield_set_typegroups = is2_keyfield_set_typegroups,
		.actionfield_set_typegroups = is2_actionfield_set_typegroups,
	},
	[VCAP_TYPE_ES0] = {
		.name = "es0",
		.rows = 4096,
		.sw_count = 1,
		.sw_width = 52,
		.sticky_width = 1,
		.act_width = 489,
		.default_cnt = 70,
		.require_cnt_dis = 0,
		.version = 1,
		.keyfield_set = es0_keyfield_set,
		.keyfield_set_size = ARRAY_SIZE(es0_keyfield_set),
		.actionfield_set = es0_actionfield_set,
		.actionfield_set_size = ARRAY_SIZE(es0_actionfield_set),
		.keyfield_set_map = es0_keyfield_set_map,
		.keyfield_set_map_size = es0_keyfield_set_map_size,
		.actionfield_set_map = es0_actionfield_set_map,
		.actionfield_set_map_size = es0_actionfield_set_map_size,
		.keyfield_set_typegroups = es0_keyfield_set_typegroups,
		.actionfield_set_typegroups = es0_actionfield_set_typegroups,
	},
	[VCAP_TYPE_ES2] = {
		.name = "es2",
		.rows = 1024,
@@ -3487,7 +3866,7 @@ const struct vcap_info sparx5_vcaps[] = {

const struct vcap_statistics sparx5_vcap_stats = {
	.name = "sparx5",
	.count = 3,
	.count = 4,
	.keyfield_set_names = vcap_keyfield_set_names,
	.actionfield_set_names = vcap_actionfield_set_names,
	.keyfield_names = vcap_keyfield_names,
+160 −14

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -387,7 +387,7 @@ static const char * const test_admin_info_expect[] = {
	"default_cnt: 73\n",
	"require_cnt_dis: 0\n",
	"version: 1\n",
	"vtype: 2\n",
	"vtype: 3\n",
	"vinst: 0\n",
	"ingress: 1\n",
	"first_cid: 10000\n",
@@ -435,7 +435,7 @@ static const char * const test_admin_expect[] = {
	"default_cnt: 73\n",
	"require_cnt_dis: 0\n",
	"version: 1\n",
	"vtype: 2\n",
	"vtype: 3\n",
	"vinst: 0\n",
	"ingress: 1\n",
	"first_cid: 8000000\n",
+168 −102

File changed.

Preview size limit exceeded, changes collapsed.

+9 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: BSD-3-Clause */
/* Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries.
/* Copyright (C) 2023 Microchip Technology Inc. and its subsidiaries.
 * Microchip VCAP test model interface for kunit testing
 */

/* This file is autogenerated by cml-utils 2023-02-10 11:16:00 +0100.
 * Commit ID: c30fb4bf0281cd4a7133bdab6682f9e43c872ada
 */

#ifndef __VCAP_MODEL_KUNIT_H__
#define __VCAP_MODEL_KUNIT_H__

/* VCAPs */
extern const struct vcap_info kunit_test_vcaps[];
extern const struct vcap_statistics kunit_test_vcap_stats;

#endif /* __VCAP_MODEL_KUNIT_H__ */