X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fi40e%2Fi40e_vf_representor.c;h=45a15d3ab45a83cbac0229ba48c06554b5c838b2;hb=0101a0ec621757850210fa084c2d4158404125e3;hp=0bfbb4f6011fa94bb41c3b5a7220088c060e5ab4;hpb=c8dc2d66c547daf5054557b485eff3fdc0f87864;p=dpdk.git diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c index 0bfbb4f601..45a15d3ab4 100644 --- a/drivers/net/i40e/i40e_vf_representor.c +++ b/drivers/net/i40e/i40e_vf_representor.c @@ -420,7 +420,7 @@ i40e_vf_representor_vlan_pvid_set(struct rte_eth_dev *ethdev, uint16_t vlan_id, representor->vf_id, vlan_id); } -struct eth_dev_ops i40e_representor_dev_ops = { +static const struct eth_dev_ops i40e_representor_dev_ops = { .dev_infos_get = i40e_vf_representor_dev_infos_get, .dev_start = i40e_vf_representor_dev_start, @@ -487,9 +487,6 @@ i40e_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params) if (representor->vf_id >= pf->vf_num) return -ENODEV; - /** representor shares the same driver as it's PF device */ - ethdev->device->driver = representor->adapter->eth_dev->device->driver; - /* Set representor device ops */ ethdev->dev_ops = &i40e_representor_dev_ops; @@ -507,6 +504,7 @@ i40e_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params) } ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR; + ethdev->data->representor_id = representor->vf_id; /* Setting the number queues allocated to the VF */ ethdev->data->nb_rx_queues = vf->vsi->nb_qps; @@ -526,7 +524,10 @@ i40e_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params) } int -i40e_vf_representor_uninit(struct rte_eth_dev *ethdev __rte_unused) +i40e_vf_representor_uninit(struct rte_eth_dev *ethdev) { + /* mac_addrs must not be freed because part of i40e_pf_vf */ + ethdev->data->mac_addrs = NULL; + return 0; }