/* Maximum number of data descriptors allowed per packet, or per-TSO segment. */ #define GVE_TX_MAX_DATA_DESCS 10
/* Min gap between tail and head to avoid cacheline overlap */ #define GVE_TX_MIN_DESC_PREVENT_CACHE_OVERLAP 4
/* "report_event" on TX packet descriptors may only be reported on the last * descriptor of a TX packet, and they must be spaced apart with at least this * value.
*/ #define GVE_TX_MIN_RE_INTERVAL 32
/* Logical structure of metadata which is packed into context descriptor flex * fields.
*/ struct gve_tx_metadata_dqo { union { struct {
u8 version;
/* If `skb->l4_hash` is set, this value should be * derived from `skb->hash`. * * A zero value means no l4_hash was associated with the * skb.
*/
u16 path_hash: 15;
/* Should be set to 1 if the flow associated with the * skb had a rehash from the TCP stack.
*/
u16 rehash_event: 1;
} __packed;
u8 bytes[12];
};
} __packed;
static_assert(sizeof(struct gve_tx_metadata_dqo) == 12);
#define GVE_TX_METADATA_VERSION_DQO 0
/* TX completion descriptor */ struct gve_tx_compl_desc { /* For types 0-4 this is the TX queue ID associated with this * completion.
*/
u16 id: 11;
/* Flipped by HW to notify the descriptor is populated. */
u16 generation: 1; union { /* For descriptor completions, this is the last index fetched * by HW + 1.
*/
__le16 tx_head;
/* For packet completions, this is the completion tag set on the * TX packet descriptors.
*/
__le16 completion_tag;
};
__le32 reserved1;
} __packed;
static_assert(sizeof(struct gve_tx_compl_desc) == 8);
/* The most significant bit in the completion tag can change the completion * type from packet completion to miss path completion.
*/ #define GVE_ALT_MISS_COMPL_BIT BIT(15)
/* Descriptor to post buffers to HW on buffer queue. */ struct gve_rx_desc_dqo {
__le16 buf_id; /* ID returned in Rx completion descriptor */
__le16 reserved0;
__le32 reserved1;
__le64 buf_addr; /* DMA address of the buffer */
__le64 header_buf_addr;
__le64 reserved2;
} __packed;
static_assert(sizeof(struct gve_rx_desc_dqo) == 32);
/* Descriptor for HW to notify SW of new packets received on RX queue. */ struct gve_rx_compl_desc_dqo { /* Must be 1 */
u8 rxdid: 4;
u8 reserved0: 4;
/* Packet originated from this system rather than the network. */
u8 loopback: 1; /* Set when IPv6 packet contains a destination options header or routing * header.
*/
u8 ipv6_ex_add: 1; /* Invalid packet was received. */
u8 rx_error: 1;
u8 reserved1: 5;
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.