net/mlx5: fix tunnel offload object allocation
[dpdk.git] / drivers / net / mlx5 / mlx5.h
index c3e5ae9..0155f5c 100644 (file)
@@ -44,6 +44,8 @@ enum mlx5_ipool_index {
        MLX5_IPOOL_JUMP, /* Pool for jump resource. */
        MLX5_IPOOL_SAMPLE, /* Pool for sample resource. */
        MLX5_IPOOL_DEST_ARRAY, /* Pool for destination array resource. */
+       MLX5_IPOOL_TUNNEL_ID, /* Pool for tunnel offload context */
+       MLX5_IPOOL_TNL_TBL_ID, /* Pool for tunnel table ID. */
 #endif
        MLX5_IPOOL_MTR, /* Pool for meter resource. */
        MLX5_IPOOL_MCP, /* Pool for metadata resource. */
@@ -51,8 +53,6 @@ enum mlx5_ipool_index {
        MLX5_IPOOL_MLX5_FLOW, /* Pool for mlx5 flow handle. */
        MLX5_IPOOL_RTE_FLOW, /* Pool for rte_flow. */
        MLX5_IPOOL_RSS_EXPANTION_FLOW_ID, /* Pool for Queue/RSS flow ID. */
-       MLX5_IPOOL_TUNNEL_ID, /* Pool for flow tunnel ID. */
-       MLX5_IPOOL_TNL_TBL_ID, /* Pool for tunnel table ID. */
        MLX5_IPOOL_RSS_SHARED_ACTIONS, /* Pool for RSS shared actions. */
        MLX5_IPOOL_MAX,
 };
@@ -516,7 +516,8 @@ struct mlx5_aso_sq {
        volatile uint64_t *uar_addr;
        struct mlx5_aso_devx_mr mr;
        uint16_t pi;
-       uint16_t ci;
+       uint32_t head;
+       uint32_t tail;
        uint32_t sqn;
        struct mlx5_aso_sq_elem elts[1 << MLX5_ASO_QUEUE_LOG_DESC];
        uint16_t next; /* Pool index of the next pool to query. */
@@ -610,9 +611,9 @@ struct mlx5_flow_tbl_resource {
 #define MLX5_FLOW_MREG_ACT_TABLE_GROUP (MLX5_MAX_TABLES - 1)
 #define MLX5_FLOW_MREG_CP_TABLE_GROUP (MLX5_MAX_TABLES - 2)
 /* Tables for metering splits should be added here. */
-#define MLX5_MAX_TABLES_EXTERNAL (MLX5_MAX_TABLES - 3)
-#define MLX5_FLOW_TABLE_LEVEL_METER (MLX5_MAX_TABLES - 4)
 #define MLX5_FLOW_TABLE_LEVEL_SUFFIX (MLX5_MAX_TABLES - 3)
+#define MLX5_FLOW_TABLE_LEVEL_METER (MLX5_MAX_TABLES - 4)
+#define MLX5_MAX_TABLES_EXTERNAL MLX5_FLOW_TABLE_LEVEL_METER
 #define MLX5_MAX_TABLES_FDB UINT16_MAX
 #define MLX5_FLOW_TABLE_FACTOR 10
 
@@ -788,11 +789,11 @@ struct mlx5_flow_rss_desc {
        uint8_t key[MLX5_RSS_HASH_KEY_LEN]; /**< RSS hash key. */
        uint32_t key_len; /**< RSS hash key len. */
        uint32_t tunnel; /**< Queue in tunnel. */
+       uint32_t shared_rss; /**< Shared RSS index. */
        union {
                uint16_t *queue; /**< Destination queues. */
                const uint16_t *const_q; /**< Const pointer convert. */
        };
-       bool standalone; /**< Queue is standalone or not. */
 };
 
 #define MLX5_PROC_PRIV(port_id) \
@@ -835,7 +836,6 @@ struct mlx5_ind_table_obj {
 __extension__
 struct mlx5_hrxq {
        struct mlx5_cache_entry entry; /* Cache entry. */
-       uint32_t refcnt; /* Reference counter. */
        uint32_t standalone:1; /* This object used in shared action. */
        struct mlx5_ind_table_obj *ind_table; /* Indirection table. */
        RTE_STD_C11