common/mlx5: extend flex parser capabilities
[dpdk.git] / drivers / common / mlx5 / windows / mlx5_win_defs.h
index 231c322..9f709ff 100644 (file)
@@ -1,7 +1,7 @@
-/*
+/* SPDX-License-Identifier: BSD-3-Clause
  * Copyright (C) Mellanox Technologies, Ltd. 2001-2020.
- *
  */
+
 #ifndef __MLX5_WIN_DEFS_H__
 #define __MLX5_WIN_DEFS_H__
 
@@ -93,6 +93,18 @@ enum {
        MLX5_ETH_WQE_L4_CSUM = (1 << 7),
 };
 
+enum {
+       MLX5_WQE_CTRL_CQ_UPDATE = 2 << 2,
+       MLX5_WQE_CTRL_SOLICITED = 1 << 1,
+       MLX5_WQE_CTRL_FENCE     = 4 << 5,
+       MLX5_WQE_CTRL_INITIATOR_SMALL_FENCE = 1 << 5,
+};
+
+enum {
+       MLX5_SEND_WQE_BB        = 64,
+       MLX5_SEND_WQE_SHIFT     = 6,
+};
+
 /*
  * RX Hash fields enable to set which incoming packet's field should
  * participates in RX Hash. Each flag represent certain packet's field,
@@ -189,6 +201,17 @@ struct mlx5_matcher {
        uint64_t match_buf[];
 };
 
+/*
+ * Windows mlx5_action. This struct is the
+ * equivalent of rdma-core struct mlx5dv_dr_action.
+ */
+struct mlx5_action {
+       int type;
+       struct {
+               uint32_t id;
+       } dest_tir;
+};
+
 struct mlx5_err_cqe {
        uint8_t         rsvd0[32];
        uint32_t        srqn;
@@ -233,4 +256,10 @@ enum {
        MLX5_FLOW_CONTEXT_DEST_TYPE_TIR                      = 0x2,
        MLX5_FLOW_CONTEXT_DEST_TYPE_QP                       = 0x3,
 };
+
+enum {
+       MLX5_MATCH_OUTER_HEADERS        = 1 << 0,
+       MLX5_MATCH_MISC_PARAMETERS      = 1 << 1,
+       MLX5_MATCH_INNER_HEADERS        = 1 << 2,
+};
 #endif /* __MLX5_WIN_DEFS_H__ */