net/mlx5: create advanced RxQ table via DevX
[dpdk.git] / drivers / net / mlx5 / mlx5.h
index 4f4c4a7..8aa5240 100644 (file)
@@ -306,6 +306,51 @@ struct mlx5_devx_create_rq_attr {
        struct mlx5_devx_wq_attr wq_attr;
 };
 
+/* Modify RQ attributes structure, used by modify RQ operation. */
+struct mlx5_devx_modify_rq_attr {
+       uint32_t rqn:24;
+       uint32_t rq_state:4; /* Current RQ state. */
+       uint32_t state:4; /* Required RQ state. */
+       uint32_t scatter_fcs:1;
+       uint32_t vsd:1;
+       uint32_t counter_set_id:8;
+       uint32_t hairpin_peer_sq:24;
+       uint32_t hairpin_peer_vhca:16;
+       uint64_t modify_bitmask;
+       uint32_t lwm:16; /* Contained WQ lwm. */
+};
+
+struct mlx5_rx_hash_field_select {
+       uint32_t l3_prot_type:1;
+       uint32_t l4_prot_type:1;
+       uint32_t selected_fields:30;
+};
+
+/* TIR attributes structure, used by TIR operations. */
+struct mlx5_devx_tir_attr {
+       uint32_t disp_type:4;
+       uint32_t lro_timeout_period_usecs:16;
+       uint32_t lro_enable_mask:4;
+       uint32_t lro_max_msg_sz:8;
+       uint32_t inline_rqn:24;
+       uint32_t rx_hash_symmetric:1;
+       uint32_t tunneled_offload_en:1;
+       uint32_t indirect_table:24;
+       uint32_t rx_hash_fn:4;
+       uint32_t self_lb_block:2;
+       uint32_t transport_domain:24;
+       uint32_t rx_hash_toeplitz_key[10];
+       struct mlx5_rx_hash_field_select rx_hash_field_selector_outer;
+       struct mlx5_rx_hash_field_select rx_hash_field_selector_inner;
+};
+
+/* RQT attributes structure, used by RQT operations. */
+struct mlx5_devx_rqt_attr {
+       uint32_t rqt_max_size:16;
+       uint32_t rqt_actual_size:16;
+       uint32_t rq_list[];
+};
+
 /**
  * Type of object being allocated.
  */
@@ -789,5 +834,11 @@ int mlx5_devx_cmd_qp_query_tis_td(struct ibv_qp *qp, uint32_t tis_num,
 struct mlx5_devx_obj *mlx5_devx_cmd_create_rq(struct ibv_context *ctx,
                                struct mlx5_devx_create_rq_attr *rq_attr,
                                int socket);
+int mlx5_devx_cmd_modify_rq(struct mlx5_devx_obj *rq,
+                           struct mlx5_devx_modify_rq_attr *rq_attr);
+struct mlx5_devx_obj *mlx5_devx_cmd_create_tir(struct ibv_context *ctx,
+                                       struct mlx5_devx_tir_attr *tir_attr);
+struct mlx5_devx_obj *mlx5_devx_cmd_create_rqt(struct ibv_context *ctx,
+                                       struct mlx5_devx_rqt_attr *rqt_attr);
 
 #endif /* RTE_PMD_MLX5_H_ */