drivers/net/ethernet/meta/fbnic/fbnic_netdev.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/meta/fbnic/fbnic_netdev.h
Extension
.h
Size
3456 bytes
Lines
120
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 fbnic_net {
	struct bpf_prog *xdp_prog;

	struct fbnic_ring *tx[FBNIC_MAX_TXQS + FBNIC_MAX_XDPQS];
	struct fbnic_ring *rx[FBNIC_MAX_RXQS];

	struct fbnic_napi_vector *napi[FBNIC_MAX_NAPI_VECTORS];

	struct net_device *netdev;
	struct fbnic_dev *fbd;

	u32 txq_size;
	u32 hpq_size;
	u32 ppq_size;
	u32 rcq_size;

	u32 hds_thresh;

	u16 rx_usecs;
	u16 tx_usecs;

	u32 rx_max_frames;

	u16 num_napi;

	struct phylink *phylink;
	struct phylink_config phylink_config;
	struct phylink_pcs *pcs;

	u8 aui;
	u8 fec;

	/* Cached top bits of the HW time counter for 40b -> 64b conversion */
	u32 time_high;
	/* Protect readers of @time_offset, writers take @time_lock. */
	struct u64_stats_sync time_seq;
	/* Offset in ns between free running NIC PHC and time set via PTP
	 * clock callbacks
	 */
	s64 time_offset;

	u16 num_tx_queues;
	u16 num_rx_queues;

	u8 indir_tbl[FBNIC_RPC_RSS_TBL_COUNT][FBNIC_RPC_RSS_TBL_SIZE];
	u32 rss_key[FBNIC_RPC_RSS_KEY_DWORD_LEN];
	u32 rss_flow_hash[FBNIC_NUM_HASH_OPT];

	/* Storage for stats after ring destruction */
	struct fbnic_queue_stats tx_stats;
	struct fbnic_queue_stats rx_stats;
	struct fbnic_queue_stats bdq_stats;
	u64 link_down_events;

	/* Time stamping filter config */
	struct kernel_hwtstamp_config hwtstamp_config;

	bool tx_pause;
};

int __fbnic_open(struct fbnic_net *fbn);
void fbnic_up(struct fbnic_net *fbn);
void fbnic_down(struct fbnic_net *fbn);
void fbnic_down_noidle(struct fbnic_net *fbn);

struct net_device *fbnic_netdev_alloc(struct fbnic_dev *fbd);
void fbnic_netdev_free(struct fbnic_dev *fbd);
int fbnic_netdev_register(struct net_device *netdev);
void fbnic_netdev_unregister(struct net_device *netdev);
void fbnic_reset_queues(struct fbnic_net *fbn,
			unsigned int tx, unsigned int rx);

void fbnic_set_ethtool_ops(struct net_device *dev);

int fbnic_ptp_setup(struct fbnic_dev *fbd);
void fbnic_ptp_destroy(struct fbnic_dev *fbd);
void fbnic_time_init(struct fbnic_net *fbn);
int fbnic_time_start(struct fbnic_net *fbn);
void fbnic_time_stop(struct fbnic_net *fbn);

void __fbnic_set_rx_mode(struct fbnic_dev *fbd,
			 struct netdev_hw_addr_list *uc,
			 struct netdev_hw_addr_list *mc);
void fbnic_clear_rx_mode(struct fbnic_dev *fbd);

void fbnic_phylink_get_pauseparam(struct net_device *netdev,
				  struct ethtool_pauseparam *pause);
int fbnic_phylink_set_pauseparam(struct net_device *netdev,
				 struct ethtool_pauseparam *pause);
int fbnic_phylink_ethtool_ksettings_get(struct net_device *netdev,

Annotation

Implementation Notes