return 0;
}
-static void enic_vf_dev_tx_queue_release(void *txq)
+static void enic_vf_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
{
+ void *txq = dev->data->tx_queues[qid];
+
ENICPMD_FUNC_TRACE();
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return;
return 0;
}
-static void enic_vf_dev_rx_queue_release(void *rxq)
+static void enic_vf_dev_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
{
+ void *rxq = dev->data->rx_queues[qid];
+
ENICPMD_FUNC_TRACE();
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return;
};
static int
-enic_vf_filter_ctrl(struct rte_eth_dev *eth_dev,
- enum rte_filter_type filter_type,
- enum rte_filter_op filter_op,
- void *arg)
+enic_vf_flow_ops_get(struct rte_eth_dev *eth_dev,
+ const struct rte_flow_ops **ops)
{
struct enic_vf_representor *vf;
- int ret = 0;
ENICPMD_FUNC_TRACE();
vf = eth_dev->data->dev_private;
- switch (filter_type) {
- case RTE_ETH_FILTER_GENERIC:
- if (filter_op != RTE_ETH_FILTER_GET)
- return -EINVAL;
- if (vf->enic.flow_filter_mode == FILTER_FLOWMAN) {
- *(const void **)arg = &enic_vf_flow_ops;
- } else {
- ENICPMD_LOG(WARNING, "VF representors require flowman support for rte_flow API");
- ret = -EINVAL;
- }
- break;
- default:
- ENICPMD_LOG(WARNING, "Filter type (%d) not supported",
- filter_type);
- ret = -EINVAL;
- break;
+ if (vf->enic.flow_filter_mode != FILTER_FLOWMAN) {
+ ENICPMD_LOG(WARNING,
+ "VF representors require flowman support for rte_flow API");
+ return -EINVAL;
}
- return ret;
+
+ *ops = &enic_vf_flow_ops;
+ return 0;
}
static int enic_vf_link_update(struct rte_eth_dev *eth_dev,
.dev_start = enic_vf_dev_start,
.dev_stop = enic_vf_dev_stop,
.dev_close = enic_vf_dev_close,
- .filter_ctrl = enic_vf_filter_ctrl,
+ .flow_ops_get = enic_vf_flow_ops_get,
.link_update = enic_vf_link_update,
.promiscuous_enable = enic_vf_promiscuous_enable,
.promiscuous_disable = enic_vf_promiscuous_disable,
eth_dev->device->driver = pf->rte_dev->device->driver;
eth_dev->dev_ops = &enic_vf_representor_dev_ops;
- eth_dev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR |
- RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR;
eth_dev->data->representor_id = vf->vf_id;
+ eth_dev->data->backer_port_id = pf->port_id;
eth_dev->data->mac_addrs = rte_zmalloc("enic_mac_addr_vf",
sizeof(struct rte_ether_addr) *
ENIC_UNICAST_PERFECT_FILTERS, 0);