net/mlx5: change device reference for secondary process
[dpdk.git] / drivers / net / mlx5 / mlx5.h
index a0c393e..f1294c5 100644 (file)
@@ -88,6 +88,7 @@ struct mlx5_dev_config {
        unsigned int tx_vec_en:1; /* Tx vector is enabled. */
        unsigned int rx_vec_en:1; /* Rx vector is enabled. */
        unsigned int mpw_hdr_dseg:1; /* Enable DSEGs in the title WQEBB. */
+       unsigned int l3_vxlan_en:1; /* Enable L3 VXLAN flow creation. */
        unsigned int vf_nl_en:1; /* Enable Netlink requests in VF mode. */
        unsigned int swp:1; /* Tx generic tunnel checksum and TSO offload. */
        unsigned int max_verbs_prio; /* Number of Verb flow priorities. */
@@ -120,7 +121,7 @@ struct mlx5_verbs_alloc_ctx {
 };
 
 struct priv {
-       struct rte_eth_dev *dev; /* Ethernet device of master process. */
+       struct rte_eth_dev_data *dev_data;  /* Pointer to device data. */
        struct ibv_context *ctx; /* Verbs context. */
        struct ibv_device_attr_ex device_attr; /* Device properties. */
        struct ibv_pd *pd; /* Protection Domain. */
@@ -167,6 +168,9 @@ struct priv {
        uint32_t nl_sn; /* Netlink message sequence number. */
 };
 
+#define PORT_ID(priv) ((priv)->dev_data->port_id)
+#define ETH_DEV(priv) (&rte_eth_devices[PORT_ID(priv)])
+
 /* mlx5.c */
 
 int mlx5_getenv_int(const char *);
@@ -276,7 +280,7 @@ int mlx5_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
 void mlx5_flow_list_flush(struct rte_eth_dev *dev, struct mlx5_flows *list);
 int mlx5_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error);
 int mlx5_flow_query(struct rte_eth_dev *dev, struct rte_flow *flow,
-                   enum rte_flow_action_type action, void *data,
+                   const struct rte_flow_action *action, void *data,
                    struct rte_flow_error *error);
 int mlx5_flow_isolate(struct rte_eth_dev *dev, int enable,
                      struct rte_flow_error *error);