app/procinfo: add --show-mempool
[dpdk.git] / drivers / net / i40e / i40e_vf_representor.c
index 24751d1..45a15d3 100644 (file)
@@ -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,
@@ -504,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;
@@ -523,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;
 }