#include <stdbool.h>
#include <stdint.h>
#include <limits.h>
-#include <netinet/in.h>
#include <sys/queue.h>
#include <rte_pci.h>
void *phys_dev; /**< Associated physical device. */
struct rte_eth_dev *eth_dev; /**< Associated Ethernet device. */
struct rte_pci_device *pci_dev; /**< Backend PCI device. */
+ struct mlx5_bond_info *bond_info;
+};
+
+/** Data associated with socket messages. */
+struct mlx5_flow_dump_req {
+ uint32_t port_id; /**< There are plans in DPDK to extend port_id. */
+ uint64_t flow_id;
+} __rte_packed;
+
+struct mlx5_flow_dump_ack {
+ int rc; /**< Return code. */
};
/** Key string for IPC. */
void *obj; /* Flex parser node object. */
};
+/* Max member ports per bonding device. */
+#define MLX5_BOND_MAX_PORTS 2
+
+/* Bonding device information. */
+struct mlx5_bond_info {
+ int n_port; /* Number of bond member ports. */
+ uint32_t ifindex;
+ char ifname[MLX5_NAMESIZE + 1];
+ struct {
+ char ifname[MLX5_NAMESIZE + 1];
+ uint32_t ifindex;
+ struct rte_pci_addr pci_addr;
+ } ports[MLX5_BOND_MAX_PORTS];
+};
+
/*
* Shared Infiniband device context for Master/Representors
* which belong to same IB device with multiple IB ports.
uint32_t sq_ts_format:2; /* SQ timestamp formats supported. */
uint32_t qp_ts_format:2; /* QP timestamp formats supported. */
uint32_t max_port; /* Maximal IB device port index. */
+ struct mlx5_bond_info bond; /* Bonding information. */
void *ctx; /* Verbs/DV/DevX context. */
void *pd; /* Protection Domain. */
uint32_t pdn; /* Protection Domain number. */
struct mlx5_hlist *flow_tbls;
struct mlx5_flow_tunnel_hub *tunnel_hub;
/* Direct Rules tables for FDB, NIC TX+RX */
- void *esw_drop_action; /* Pointer to DR E-Switch drop action. */
+ void *dr_drop_action; /* Pointer to DR drop action, any domain. */
void *pop_vlan_action; /* Pointer to DR pop VLAN action. */
struct mlx5_hlist *encaps_decaps; /* Encap/decap action hash list. */
struct mlx5_hlist *modify_cmds;
uint32_t vport_meta_tag; /* Used for vport index match ove VF LAG. */
uint32_t vport_meta_mask; /* Used for vport index field match mask. */
int32_t representor_id; /* -1 if not a representor. */
- int32_t pf_bond; /* >=0 means PF index in bonding configuration. */
+ int32_t pf_bond; /* >=0, representor owner PF index in bonding. */
unsigned int if_index; /* Associated kernel network device index. */
- uint32_t bond_ifindex; /**< Bond interface index. */
- char bond_name[MLX5_NAMESIZE]; /**< Bond interface name. */
/* RX/TX queues. */
unsigned int rxqs_n; /* RX queues array size. */
unsigned int txqs_n; /* TX queues array size. */
((repr_id) & 0xfff)
#define MLX5_REPRESENTOR_TYPE(repr_id) \
(((repr_id) >> 12) & 3)
-uint16_t mlx5_representor_id_encode(const struct mlx5_switch_info *info);
+uint16_t mlx5_representor_id_encode(const struct mlx5_switch_info *info,
+ enum rte_eth_representor_type hpf_type);
int mlx5_fw_version_get(struct rte_eth_dev *dev, char *fw_ver,
size_t fw_size);
int mlx5_dev_infos_get(struct rte_eth_dev *dev,
void mlx5_counter_free(struct rte_eth_dev *dev, uint32_t cnt);
int mlx5_counter_query(struct rte_eth_dev *dev, uint32_t cnt,
bool clear, uint64_t *pkts, uint64_t *bytes);
-int mlx5_flow_dev_dump(struct rte_eth_dev *dev, FILE *file,
- struct rte_flow_error *error);
+int mlx5_flow_dev_dump(struct rte_eth_dev *dev, struct rte_flow *flow,
+ FILE *file, struct rte_flow_error *error);
void mlx5_flow_rxq_dynf_metadata_set(struct rte_eth_dev *dev);
int mlx5_flow_get_aged_flows(struct rte_eth_dev *dev, void **contexts,
uint32_t nb_contexts, struct rte_flow_error *error);