+
+ /* RSS */
+ uint16_t reta_size;
+ uint8_t hash_key_size;
+ uint64_t flow_type_rss_offloads; /* 0 indicates RSS not supported */
+ /*
+ * Keep a copy of current RSS config for queries, as we cannot retrieve
+ * it from the NIC.
+ */
+ uint8_t rss_hash_type; /* NIC_CFG_RSS_HASH_TYPE flags */
+ uint8_t rss_enable;
+ uint64_t rss_hf; /* ETH_RSS flags */
+ union vnic_rss_key rss_key;
+ union vnic_rss_cpu rss_cpu;
+
+ uint64_t rx_offload_capa; /* DEV_RX_OFFLOAD flags */
+ uint64_t tx_offload_capa; /* DEV_TX_OFFLOAD flags */
+ uint64_t tx_queue_offload_capa; /* DEV_TX_OFFLOAD flags */
+ uint64_t tx_offload_mask; /* PKT_TX flags accepted */
+
+ /* Multicast MAC addresses added to the NIC */
+ uint32_t mc_count;
+ struct rte_ether_addr mc_addrs[ENIC_MULTICAST_PERFECT_FILTERS];
+
+ /* Flow manager API */
+ struct enic_flowman *fm;
+ uint64_t fm_vnic_handle;
+ uint32_t fm_vnic_uif;
+ /* switchdev */
+ uint8_t switchdev_mode;
+ uint16_t switch_domain_id;
+ uint16_t max_vf_id;
+ /* Number of queues needed for VF representor paths */
+ uint32_t vf_required_wq;
+ uint32_t vf_required_cq;
+ uint32_t vf_required_rq;
+ /*
+ * Lock to serialize devcmds from PF, VF representors as they all share
+ * the same PF devcmd instance in firmware.
+ */
+ rte_spinlock_t devcmd_lock;
+};
+
+struct enic_vf_representor {
+ struct enic enic;
+ struct vnic_enet_config config;
+ struct rte_eth_dev *eth_dev;
+ struct rte_ether_addr mac_addr;
+ struct rte_pci_addr bdf;
+ struct enic *pf;
+ uint16_t switch_domain_id;
+ uint16_t vf_id;
+ int allmulti;
+ int promisc;
+ /* Representor path uses PF queues. These are reserved during init */
+ uint16_t pf_wq_idx; /* WQ dedicated to VF rep */
+ uint16_t pf_wq_cq_idx; /* CQ for WQ */
+ uint16_t pf_rq_sop_idx; /* SOP RQ dedicated to VF rep */
+ uint16_t pf_rq_data_idx; /* Data RQ */
+ /* Representor flows managed by flowman */
+ struct rte_flow *vf2rep_flow[2];
+ struct rte_flow *rep2vf_flow[2];