Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/gve/gve_dqo.h
| Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | |||||
| #define GVE_RX_BUF_THRESH_DQO 32 | #define GVE_RX_BUF_THRESH_DQO 32 | ||||
| /* | /* | ||||
| * Start dropping RX fragments if at least these many | * Start dropping RX fragments if at least these many | ||||
| * buffers cannot be posted to the NIC. | * buffers cannot be posted to the NIC. | ||||
| */ | */ | ||||
| #define GVE_RX_DQO_MIN_PENDING_BUFS 128 | #define GVE_RX_DQO_MIN_PENDING_BUFS 128 | ||||
| #define GVE_DQ_NUM_FRAGS_IN_PAGE (PAGE_SIZE / GVE_DEFAULT_RX_BUFFER_SIZE) | |||||
| /* | /* | ||||
| * gve_rx_qpl_buf_id_dqo's 11 bit wide buf_id field limits the total | * gve_rx_qpl_buf_id_dqo's 11 bit wide buf_id field limits the total | ||||
| * number of pages per QPL to 2048. | * number of pages per QPL to 2048. | ||||
| */ | */ | ||||
| #define GVE_RX_NUM_QPL_PAGES_DQO 2048 | #define GVE_RX_NUM_QPL_PAGES_DQO 2048 | ||||
| /* 2K TX buffers for DQO-QPL */ | /* 2K TX buffers for DQO-QPL */ | ||||
| #define GVE_TX_BUF_SHIFT_DQO 11 | #define GVE_TX_BUF_SHIFT_DQO 11 | ||||
| ▲ Show 20 Lines • Show All 253 Lines • ▼ Show 20 Lines | struct gve_rx_compl_desc_dqo { | ||||
| }; | }; | ||||
| __le32 hash; | __le32 hash; | ||||
| __le32 reserved6; | __le32 reserved6; | ||||
| __le64 reserved7; | __le64 reserved7; | ||||
| } __packed; | } __packed; | ||||
| _Static_assert(sizeof(struct gve_rx_compl_desc_dqo) == 32, | _Static_assert(sizeof(struct gve_rx_compl_desc_dqo) == 32, | ||||
| "gve: bad dqo desc struct length"); | "gve: bad dqo desc struct length"); | ||||
| static inline uint8_t | |||||
| gve_get_dq_num_frags_in_page(struct gve_priv *priv) | |||||
| { | |||||
| return (PAGE_SIZE / priv->rx_buf_size_dqo); | |||||
| } | |||||
| #endif /* _GVE_DESC_DQO_H_ */ | #endif /* _GVE_DESC_DQO_H_ */ | ||||