drivers/net/ethernet/microchip/sparx5/sparx5_vcap_impl.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/microchip/sparx5/sparx5_vcap_impl.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/microchip/sparx5/sparx5_vcap_impl.h
Extension
.h
Size
7183 bytes
Lines
229
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct sparx5_vcap_inst {
	enum vcap_type vtype; /* type of vcap */
	int vinst; /* instance number within the same type */
	int lookups; /* number of lookups in this vcap type */
	int lookups_per_instance; /* number of lookups in this instance */
	int first_cid; /* first chain id in this vcap */
	int last_cid; /* last chain id in this vcap */
	int count; /* number of available addresses, not in super vcap */
	int map_id; /* id in the super vcap block mapping (if applicable) */
	int blockno; /* starting block in super vcap (if applicable) */
	int blocks; /* number of blocks in super vcap (if applicable) */
	bool ingress; /* is vcap in the ingress path */
};

extern const struct sparx5_vcap_inst sparx5_vcap_inst_cfg[];

/* IS0 port keyset selection control */

/* IS0 ethernet, IPv4, IPv6 traffic type keyset generation */
enum vcap_is0_port_sel_etype {
	VCAP_IS0_PS_ETYPE_DEFAULT, /* None or follow depending on class */
	VCAP_IS0_PS_ETYPE_MLL,
	VCAP_IS0_PS_ETYPE_SGL_MLBS,
	VCAP_IS0_PS_ETYPE_DBL_MLBS,
	VCAP_IS0_PS_ETYPE_TRI_MLBS,
	VCAP_IS0_PS_ETYPE_TRI_VID,
	VCAP_IS0_PS_ETYPE_LL_FULL,
	VCAP_IS0_PS_ETYPE_NORMAL_SRC,
	VCAP_IS0_PS_ETYPE_NORMAL_DST,
	VCAP_IS0_PS_ETYPE_NORMAL_7TUPLE,
	VCAP_IS0_PS_ETYPE_NORMAL_5TUPLE_IP4,
	VCAP_IS0_PS_ETYPE_PURE_5TUPLE_IP4,
	VCAP_IS0_PS_ETYPE_DBL_VID_IDX,
	VCAP_IS0_PS_ETYPE_ETAG,
	VCAP_IS0_PS_ETYPE_NO_LOOKUP,
};

/* IS0 MPLS traffic type keyset generation */
enum vcap_is0_port_sel_mpls_uc_mc {
	VCAP_IS0_PS_MPLS_FOLLOW_ETYPE,
	VCAP_IS0_PS_MPLS_MLL,
	VCAP_IS0_PS_MPLS_SGL_MLBS,
	VCAP_IS0_PS_MPLS_DBL_MLBS,
	VCAP_IS0_PS_MPLS_TRI_MLBS,
	VCAP_IS0_PS_MPLS_TRI_VID,
	VCAP_IS0_PS_MPLS_LL_FULL,
	VCAP_IS0_PS_MPLS_NORMAL_SRC,
	VCAP_IS0_PS_MPLS_NORMAL_DST,
	VCAP_IS0_PS_MPLS_NORMAL_7TUPLE,
	VCAP_IS0_PS_MPLS_NORMAL_5TUPLE_IP4,
	VCAP_IS0_PS_MPLS_PURE_5TUPLE_IP4,
	VCAP_IS0_PS_MPLS_DBL_VID_IDX,
	VCAP_IS0_PS_MPLS_ETAG,
	VCAP_IS0_PS_MPLS_NO_LOOKUP,
};

/* IS0 MBLS traffic type keyset generation */
enum vcap_is0_port_sel_mlbs {
	VCAP_IS0_PS_MLBS_FOLLOW_ETYPE,
	VCAP_IS0_PS_MLBS_SGL_MLBS,
	VCAP_IS0_PS_MLBS_DBL_MLBS,
	VCAP_IS0_PS_MLBS_TRI_MLBS,
	VCAP_IS0_PS_MLBS_NO_LOOKUP = 17,
};

/* IS2 port keyset selection control */

/* IS2 non-ethernet traffic type keyset generation */
enum vcap_is2_port_sel_noneth {
	VCAP_IS2_PS_NONETH_MAC_ETYPE,
	VCAP_IS2_PS_NONETH_CUSTOM_1,
	VCAP_IS2_PS_NONETH_CUSTOM_2,
	VCAP_IS2_PS_NONETH_NO_LOOKUP
};

/* IS2 IPv4 unicast traffic type keyset generation */
enum vcap_is2_port_sel_ipv4_uc {
	VCAP_IS2_PS_IPV4_UC_MAC_ETYPE,
	VCAP_IS2_PS_IPV4_UC_IP4_TCP_UDP_OTHER,
	VCAP_IS2_PS_IPV4_UC_IP_7TUPLE,
};

/* IS2 IPv4 multicast traffic type keyset generation */
enum vcap_is2_port_sel_ipv4_mc {
	VCAP_IS2_PS_IPV4_MC_MAC_ETYPE,
	VCAP_IS2_PS_IPV4_MC_IP4_TCP_UDP_OTHER,
	VCAP_IS2_PS_IPV4_MC_IP_7TUPLE,
	VCAP_IS2_PS_IPV4_MC_IP4_VID,
};

Annotation

Implementation Notes