u32 wqe_cnt;
u32 wq_stride;
u32 buf_sz;
- u32 striding_wqe_tail;
+ u32 queue_index;
+ union
+ {
+ struct
+ {
+ u32 striding_wqe_tail; /* Striding RQ: number of released whole WQE */
+ u8 log_stride_per_wqe; /* Striding RQ: number of strides in a single WQE */
+ };
+
+ struct
+ {
+ u8 *n_used_per_chain; /* Legacy RQ: for each buffer chain, how many additional segments are needed */
+
+ u32 *second_bufs; /* Legacy RQ: ring of second buffers of each chain */
+ u32 incomplete_tail; /* Legacy RQ: tail index in bufs,
+ corresponds to buffer chains with recycled valid head buffer,
+ but whose other buffers are not yet recycled (due to pool exhaustion). */
+ u16 n_total_additional_segs;
+ u8 n_ds_per_wqe; /* Legacy RQ: number of nonnull data segs per WQE */
+ };
+ };
u8 log_wqe_sz; /* log-size of a single WQE (in data segments) */
- u8 log_stride_per_wqe; /* Striding RQ: number of strides in a single WQE */
} rdma_rxq_t;
typedef struct
#define RDMA_RXQ_MAX_CHAIN_LOG_SZ 3 /* This should NOT be lower than 3! */
#define RDMA_RXQ_MAX_CHAIN_SZ (1U << RDMA_RXQ_MAX_CHAIN_LOG_SZ)
#define RDMA_RXQ_LEGACY_MODE_MAX_CHAIN_SZ 5
+
+typedef enum
+{
+ RDMA_RSS4_AUTO = 0,
+ RDMA_RSS4_IP,
+ RDMA_RSS4_IP_UDP,
+ RDMA_RSS4_IP_TCP,
+} rdma_rss4_t;
+
+typedef enum
+{
+ RDMA_RSS6_AUTO = 0,
+ RDMA_RSS6_IP,
+ RDMA_RSS6_IP_UDP,
+ RDMA_RSS6_IP_TCP,
+} rdma_rss6_t;
+
typedef struct
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
mac_address_t hwaddr;
u32 async_event_clib_file_index;
u32 dev_instance;
+ rdma_rss4_t rss4;
+ rdma_rss6_t rss6;
struct ibv_context *ctx;
struct ibv_pd *pd;
u16x8 cqe_flags8[VLIB_FRAME_SIZE / 8];
u16x16 cqe_flags16[VLIB_FRAME_SIZE / 16];
};
+ union
+ {
+ struct
+ {
+ u32 current_segs[VLIB_FRAME_SIZE];
+ u32 to_free_buffers[VLIB_FRAME_SIZE];
+ }; /* Specific to STRIDING RQ mode */
+ struct
+ {
+ u32 tmp_bi[VLIB_FRAME_SIZE];
+ vlib_buffer_t *tmp_bufs[VLIB_FRAME_SIZE];
+ }; /* Specific to LEGACY RQ mode */
+ };
+
vlib_buffer_t buffer_template;
- u32 current_segs[VLIB_FRAME_SIZE];
- u32 to_free_buffers[VLIB_FRAME_SIZE];
} rdma_per_thread_data_t;
typedef struct
u32 txq_size;
u32 rxq_num;
rdma_mode_t mode;
+ u8 no_multi_seg;
+ u8 disable_striding_rq;
+ u16 max_pktlen;
+ rdma_rss4_t rss4;
+ rdma_rss6_t rss6;
/* return */
int rv;