drivers/net/ethernet/cisco/enic/vnic_vic.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/cisco/enic/vnic_vic.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/cisco/enic/vnic_vic.h
Extension
.h
Size
2061 bytes
Lines
69
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 vic_provinfo {
	u8 oui[3];		/* OUI of data provider */
	u8 type;		/* provider-specific type */
	u32 length;		/* length of data below */
	u32 num_tlvs;		/* number of tlvs */
	struct vic_provinfo_tlv {
		u16 type;
		u16 length;
		u8 value[0];
	} tlv[];
} __packed;

#define VIC_PROVINFO_ADD_TLV(vp, tlvtype, tlvlen, data) \
	do { \
		err = vic_provinfo_add_tlv(vp, tlvtype, tlvlen, data); \
		if (err) \
			goto add_tlv_failure; \
	} while (0)

#define VIC_PROVINFO_MAX_DATA		1385
#define VIC_PROVINFO_MAX_TLV_DATA (VIC_PROVINFO_MAX_DATA - \
	sizeof(struct vic_provinfo))

struct vic_provinfo *vic_provinfo_alloc(gfp_t flags, const u8 *oui,
	const u8 type);
void vic_provinfo_free(struct vic_provinfo *vp);
int vic_provinfo_add_tlv(struct vic_provinfo *vp, u16 type, u16 length,
	const void *value);
size_t vic_provinfo_size(struct vic_provinfo *vp);

#endif	/* _VNIC_VIC_H_ */

Annotation

Implementation Notes