/* wrapper around a pointer to a socket buffer, * so a DMA handle can be stored along with the buffer
*/ struct ixgbevf_tx_buffer { union ixgbe_adv_tx_desc *next_to_watch; unsignedlong time_stamp; union { struct sk_buff *skb; /* XDP uses address ptr on irq_clean */ void *data;
}; unsignedint bytecount; unsignedshort gso_segs;
__be16 protocol;
DEFINE_DMA_UNMAP_ADDR(dma);
DEFINE_DMA_UNMAP_LEN(len);
u32 tx_flags;
};
/* holds the special value that gets the hardware register offset * associated with this ring, which is different for DCB and RSS modes
*/
u16 reg_idx; int queue_index; /* needed for multiqueue queue management */
} ____cacheline_internodealigned_in_smp;
/* How many Rx Buffers do we bundle into one write to the hardware ? */ #define IXGBEVF_RX_BUFFER_WRITE 16 /* Must be power of 2 */
struct ixgbevf_ring_container { struct ixgbevf_ring *ring; /* pointer to linked list of rings */ unsignedint total_bytes; /* total bytes processed this int */ unsignedint total_packets; /* total packets processed this int */
u8 count; /* total number of rings in vector */
u8 itr; /* current ITR setting for ring */
};
/* iterator for handling rings in ring container */ #define ixgbevf_for_each_ring(pos, head) \ for (pos = (head).ring; pos != NULL; pos = pos->next)
/* MAX_MSIX_Q_VECTORS of these are allocated, * but we only use one per queue-specific vector.
*/ struct ixgbevf_q_vector { struct ixgbevf_adapter *adapter; /* index of q_vector within array, also used for finding the bit in * EICR and friends that represents the vector for this ring
*/
u16 v_idx;
u16 itr; /* Interrupt throttle rate written to EITR */ struct napi_struct napi; struct ixgbevf_ring_container rx, tx; struct rcu_head rcu; /* to avoid race with update stats on free */ char name[IFNAMSIZ + 9];
/* for dynamic allocation of rings associated with this q_vector */ struct ixgbevf_ring ring[0] ____cacheline_internodealigned_in_smp; #ifdef CONFIG_NET_RX_BUSY_POLL unsignedint state; #define IXGBEVF_QV_STATE_IDLE 0 #define IXGBEVF_QV_STATE_NAPI 1 /* NAPI owns this QV */ #define IXGBEVF_QV_STATE_POLL 2 /* poll owns this QV */ #define IXGBEVF_QV_STATE_DISABLED 4 /* QV is disabled */ #define IXGBEVF_QV_OWNED (IXGBEVF_QV_STATE_NAPI | IXGBEVF_QV_STATE_POLL) #define IXGBEVF_QV_LOCKED (IXGBEVF_QV_OWNED | IXGBEVF_QV_STATE_DISABLED) #define IXGBEVF_QV_STATE_NAPI_YIELD 8 /* NAPI yielded this QV */ #define IXGBEVF_QV_STATE_POLL_YIELD 16 /* poll yielded this QV */ #define IXGBEVF_QV_YIELD (IXGBEVF_QV_STATE_NAPI_YIELD | \
IXGBEVF_QV_STATE_POLL_YIELD) #define IXGBEVF_QV_USER_PEND (IXGBEVF_QV_STATE_POLL | \
IXGBEVF_QV_STATE_POLL_YIELD)
spinlock_t lock; #endif/* CONFIG_NET_RX_BUSY_POLL */
};
/* microsecond values for various ITR rates shifted by 2 to fit itr register * with the first 3 bits reserved 0
*/ #define IXGBE_MIN_RSC_ITR 24 #define IXGBE_100K_ITR 40 #define IXGBE_20K_ITR 200 #define IXGBE_12K_ITR 336
/* Helper macros to switch between ints/sec and what the register uses. * And yes, it's the same math going both ways. The lowest value * supported by all of the ixgbe hardware is 8.
*/ #define EITR_INTS_PER_SEC_TO_REG(_eitr) \
((_eitr) ? (1000000000 / ((_eitr) * 256)) : 8) #define EITR_REG_TO_INTS_PER_SEC EITR_INTS_PER_SEC_TO_REG
/* ixgbevf_test_staterr - tests bits in Rx descriptor status and error fields */ staticinline __le32 ixgbevf_test_staterr(union ixgbe_adv_rx_desc *rx_desc, const u32 stat_err_bits)
{ return rx_desc->wb.upper.status_error & cpu_to_le32(stat_err_bits);
}
/* board specific private data structure */ struct ixgbevf_adapter { /* this field must be first, see ixgbevf_process_skb_fields */ unsignedlong active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
/* XDP */ int num_xdp_queues; struct ixgbevf_ring *xdp_ring[MAX_XDP_QUEUES];
/* TX */ int num_tx_queues; struct ixgbevf_ring *tx_ring[MAX_TX_QUEUES]; /* One per active queue */
u64 restart_queue;
u32 tx_timeout_count;
u64 tx_ipsec;
/* RX */ int num_rx_queues; struct ixgbevf_ring *rx_ring[MAX_TX_QUEUES]; /* One per active queue */
u64 hw_csum_rx_error; int num_msix_vectors;
u64 alloc_rx_page_failed;
u64 alloc_rx_buff_failed;
u64 alloc_rx_page;
u64 rx_ipsec;
struct msix_entry *msix_entries;
/* OS defined structs */ struct net_device *netdev; struct bpf_prog *xdp_prog; struct pci_dev *pdev;
/* structs defined in ixgbe_vf.h */ struct ixgbe_hw hw;
u16 msg_enable;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.