dev_info->max_rx_queues = hv->max_queues;
dev_info->max_tx_queues = hv->max_queues;
- rc = hn_rndis_get_offload(hv, dev_info);
- if (rc != 0)
- return rc;
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
- rc = hn_vf_info_get(hv, dev_info);
+ /* fills in rx and tx offload capability */
+ rc = hn_rndis_get_offload(hv, dev_info);
if (rc != 0)
return rc;
- return 0;
+ /* merges the offload and queues of vf */
+ return hn_vf_info_get(hv, dev_info);
}
static int hn_rss_reta_update(struct rte_eth_dev *dev,
eth_dev->tx_pkt_burst = &hn_xmit_pkts;
eth_dev->rx_pkt_burst = &hn_recv_pkts;
+ /* Since Hyper-V only supports one MAC address, just use local data */
+ eth_dev->data->mac_addrs = &hv->mac_addr;
+
/*
* for secondary processes, we don't initialize any further as primary
* has already done this work.
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- /* Since Hyper-V only supports one MAC address, just use local data */
- eth_dev->data->mac_addrs = &hv->mac_addr;
-
hv->vmbus = vmbus;
hv->rxbuf_res = &vmbus->resource[HV_RECV_BUF_MAP];
hv->chim_res = &vmbus->resource[HV_SEND_BUF_MAP];