net/mlx5: rename Verbs flow to generic name
[dpdk.git] / drivers / net / mlx5 / mlx5.h
index 908e1fc..46e66eb 100644 (file)
@@ -210,6 +210,8 @@ struct mlx5_dev_config {
        unsigned int dv_esw_en:1; /* Enable E-Switch DV flow. */
        unsigned int dv_flow_en:1; /* Enable DV flow. */
        unsigned int dv_xmeta_en:2; /* Enable extensive flow metadata. */
+       unsigned int lacp_by_user:1;
+       /* Enable user to manage LACP traffic. */
        unsigned int swp:1; /* Tx generic tunnel checksum and TSO offload. */
        unsigned int devx:1; /* Whether devx interface is available or not. */
        unsigned int dest_tir:1; /* Whether advanced DR API is available. */
@@ -451,6 +453,12 @@ struct mlx5_flow_counter_mng {
        LIST_HEAD(stat_raws, mlx5_counter_stats_raw) free_stat_raws;
 };
 
+/* Default miss action resource structure. */
+struct mlx5_flow_default_miss_resource {
+       void *action; /* Pointer to the rdma-core action. */
+       rte_atomic32_t refcnt; /* Default miss action reference counter. */
+};
+
 #define MLX5_AGE_EVENT_NEW             1
 #define MLX5_AGE_TRIGGER               2
 #define MLX5_AGE_SET(age_info, BIT) \
@@ -511,21 +519,6 @@ struct mlx5_flow_tbl_resource {
 #define MLX5_MAX_TABLES_EXTERNAL (MLX5_MAX_TABLES - 3)
 #define MLX5_MAX_TABLES_FDB UINT16_MAX
 
-#define MLX5_DBR_PAGE_SIZE 4096 /* Must be >= 512. */
-#define MLX5_DBR_SIZE 8
-#define MLX5_DBR_PER_PAGE (MLX5_DBR_PAGE_SIZE / MLX5_DBR_SIZE)
-#define MLX5_DBR_BITMAP_SIZE (MLX5_DBR_PER_PAGE / 64)
-
-struct mlx5_devx_dbr_page {
-       /* Door-bell records, must be first member in structure. */
-       uint8_t dbrs[MLX5_DBR_PAGE_SIZE];
-       LIST_ENTRY(mlx5_devx_dbr_page) next; /* Pointer to the next element. */
-       void *umem;
-       uint32_t dbr_count; /* Number of door-bell records in use. */
-       /* 1 bit marks matching door-bell is in use. */
-       uint64_t dbr_bitmap[MLX5_DBR_BITMAP_SIZE];
-};
-
 /* ID generation structure. */
 struct mlx5_flow_id_pool {
        uint32_t *free_arr; /**< Pointer to the a array of free values. */
@@ -574,6 +567,8 @@ struct mlx5_dev_ctx_shared {
        uint32_t port_id_action_list; /* List of port ID actions. */
        uint32_t push_vlan_action_list; /* List of push VLAN actions. */
        struct mlx5_flow_counter_mng cmng; /* Counters management structure. */
+       struct mlx5_flow_default_miss_resource default_miss;
+       /* Default miss action resource structure. */
        struct mlx5_indexed_pool *ipool[MLX5_IPOOL_MAX];
        /* Memory Pool for mlx5 flow resources. */
        struct mlx5_l3t_tbl *cnt_id_tbl; /* Shared counter lookup table. */
@@ -667,7 +662,7 @@ struct mlx5_priv {
        /* Context for Verbs allocator. */
        int nl_socket_rdma; /* Netlink socket (NETLINK_RDMA). */
        int nl_socket_route; /* Netlink socket (NETLINK_ROUTE). */
-       LIST_HEAD(dbrpage, mlx5_devx_dbr_page) dbrpgs; /* Door-bell pages. */
+       struct mlx5_dbr_page_list dbrpgs; /* Door-bell pages. */
        struct mlx5_nl_vlan_vmwa_context *vmwa_context; /* VLAN WA context. */
        struct mlx5_flow_id_pool *qrss_id_pool;
        struct mlx5_hlist *mreg_cp_tbl;
@@ -694,10 +689,6 @@ struct mlx5_priv {
 
 int mlx5_getenv_int(const char *);
 int mlx5_proc_priv_init(struct rte_eth_dev *dev);
-int64_t mlx5_get_dbr(struct rte_eth_dev *dev,
-                    struct mlx5_devx_dbr_page **dbr_page);
-int32_t mlx5_release_dbr(struct rte_eth_dev *dev, uint32_t umem_id,
-                        uint64_t offset);
 int mlx5_udp_tunnel_port_add(struct rte_eth_dev *dev,
                              struct rte_eth_udp_tunnel *udp_tunnel);
 uint16_t mlx5_eth_find_next(uint16_t port_id, struct rte_pci_device *pci_dev);
@@ -891,6 +882,7 @@ int mlx5_ctrl_flow_vlan(struct rte_eth_dev *dev,
 int mlx5_ctrl_flow(struct rte_eth_dev *dev,
                   struct rte_flow_item_eth *eth_spec,
                   struct rte_flow_item_eth *eth_mask);
+int mlx5_flow_lacp_miss(struct rte_eth_dev *dev);
 struct rte_flow *mlx5_flow_create_esw_table_zero_flow(struct rte_eth_dev *dev);
 int mlx5_flow_create_drop_queue(struct rte_eth_dev *dev);
 void mlx5_flow_delete_drop_queue(struct rte_eth_dev *dev);
@@ -932,10 +924,6 @@ void mlx5_flow_meter_detach(struct mlx5_flow_meter *fm);
 
 /* mlx5_os.c */
 struct rte_pci_driver;
-const char *mlx5_os_get_ctx_device_name(void *ctx);
-const char *mlx5_os_get_ctx_device_path(void *ctx);
-const char *mlx5_os_get_dev_device_name(void *dev);
-uint32_t mlx5_os_get_umem_id(void *umem);
 int mlx5_os_get_dev_attr(void *ctx, struct mlx5_dev_attr *dev_attr);
 void mlx5_os_free_shared_dr(struct mlx5_priv *priv);
 int mlx5_os_open_device(const struct mlx5_dev_spawn_data *spawn,