net/mlx5: move Linux ifname function
[dpdk.git] / drivers / net / mlx5 / mlx5.h
index ef735a4..3aea3b5 100644 (file)
@@ -10,7 +10,6 @@
 #include <stdbool.h>
 #include <stdint.h>
 #include <limits.h>
-#include <net/if.h>
 #include <netinet/in.h>
 #include <sys/queue.h>
 
@@ -119,7 +118,6 @@ struct mlx5_local_data {
 };
 
 extern struct mlx5_shared_data *mlx5_shared_data;
-extern struct rte_pci_driver mlx5_driver;
 
 /* Dev ops structs */
 extern const struct eth_dev_ops mlx5_os_dev_ops;
@@ -367,8 +365,9 @@ struct mlx5_flow_counter {
 struct mlx5_flow_counter_ext {
        uint32_t shared:1; /**< Share counter ID with other flow rules. */
        uint32_t batch: 1;
+       uint32_t skipped:1; /* This counter is skipped or not. */
        /**< Whether the counter was allocated by batch command. */
-       uint32_t ref_cnt:30; /**< Reference counter. */
+       uint32_t ref_cnt:29; /**< Reference counter. */
        uint32_t id; /**< User counter ID. */
        union {  /**< Holds the counters for the rule. */
 #if defined(HAVE_IBV_DEVICE_COUNTERS_SET_V42)
@@ -391,8 +390,9 @@ struct mlx5_flow_counter_pool {
                rte_atomic64_t a64_dcs;
        };
        /* The devx object of the minimum counter ID. */
-       uint32_t index:29; /* Pool index in container. */
+       uint32_t index:28; /* Pool index in container. */
        uint32_t type:2; /* Memory type behind the counter array. */
+       uint32_t skip_cnt:1; /* Pool contains skipped counter. */
        volatile uint32_t query_gen:1; /* Query round. */
        rte_spinlock_t sl; /* The pool lock. */
        struct mlx5_counter_stats_raw *raw;
@@ -637,7 +637,7 @@ struct mlx5_dev_ctx_shared {
        void *esw_drop_action; /* Pointer to DR E-Switch drop action. */
        void *pop_vlan_action; /* Pointer to DR pop VLAN action. */
        uint32_t encaps_decaps; /* Encap/decap action indexed memory list. */
-       LIST_HEAD(modify_cmd, mlx5_flow_dv_modify_hdr_resource) modify_cmds;
+       struct mlx5_hlist *modify_cmds;
        struct mlx5_hlist *tag_table;
        uint32_t port_id_action_list; /* List of port ID actions. */
        uint32_t push_vlan_action_list; /* List of push VLAN actions. */
@@ -657,6 +657,7 @@ struct mlx5_dev_ctx_shared {
        struct mlx5dv_devx_uar *tx_uar; /* Tx/packer pacing shared UAR. */
        struct mlx5_flex_parser_profiles fp[MLX5_FLEX_PARSER_MAX];
        /* Flex parser profiles information. */
+       struct mlx5dv_devx_uar *devx_rx_uar; /* DevX UAR for Rx. */
        struct mlx5_dev_shared_port port[]; /* per device port data array. */
 };
 
@@ -811,7 +812,6 @@ int mlx5_dev_configure_rss_reta(struct rte_eth_dev *dev);
 
 /* mlx5_ethdev_os.c */
 
-int mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[IF_NAMESIZE]);
 unsigned int mlx5_ifindex(const struct rte_eth_dev *dev);
 int mlx5_get_mac(struct rte_eth_dev *dev, uint8_t (*mac)[RTE_ETHER_ADDR_LEN]);
 int mlx5_get_mtu(struct rte_eth_dev *dev, uint16_t *mtu);
@@ -969,12 +969,15 @@ int mlx5_flow_get_aged_flows(struct rte_eth_dev *dev, void **contexts,
                        uint32_t nb_contexts, struct rte_flow_error *error);
 
 /* mlx5_mp_os.c */
+
 int mlx5_mp_os_primary_handle(const struct rte_mp_msg *mp_msg,
                              const void *peer);
 int mlx5_mp_os_secondary_handle(const struct rte_mp_msg *mp_msg,
                                const void *peer);
 void mlx5_mp_os_req_start_rxtx(struct rte_eth_dev *dev);
 void mlx5_mp_os_req_stop_rxtx(struct rte_eth_dev *dev);
+int mlx5_mp_os_req_queue_control(struct rte_eth_dev *dev, uint16_t queue_id,
+                                enum mlx5_mp_req_type req_type);
 
 /* mlx5_socket.c */
 
@@ -1014,6 +1017,7 @@ int mlx5_os_vf_mac_addr_modify(struct mlx5_priv *priv, unsigned int iface_idx,
                               int vf_index);
 int mlx5_os_set_promisc(struct rte_eth_dev *dev, int enable);
 int mlx5_os_set_allmulti(struct rte_eth_dev *dev, int enable);
+int mlx5_os_set_nonblock_channel_fd(int fd);
 
 /* mlx5_txpp.c */