git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/bnx2x: fix invalid free on unplug
[dpdk.git]
/
drivers
/
net
/
i40e
/
i40e_vf_representor.c
diff --git
a/drivers/net/i40e/i40e_vf_representor.c
b/drivers/net/i40e/i40e_vf_representor.c
index
0bfbb4f
..
633dca6
100644
(file)
--- a/
drivers/net/i40e/i40e_vf_representor.c
+++ b/
drivers/net/i40e/i40e_vf_representor.c
@@
-324,7
+324,7
@@
i40e_vf_representor_mac_addr_remove(struct rte_eth_dev *ethdev, uint32_t index)
static int
i40e_vf_representor_mac_addr_set(struct rte_eth_dev *ethdev,
static int
i40e_vf_representor_mac_addr_set(struct rte_eth_dev *ethdev,
- struct ether_addr *mac_addr)
+ struct
rte_
ether_addr *mac_addr)
{
struct i40e_vf_representor *representor = ethdev->data->dev_private;
{
struct i40e_vf_representor *representor = ethdev->data->dev_private;
@@
-420,7
+420,7
@@
i40e_vf_representor_vlan_pvid_set(struct rte_eth_dev *ethdev, uint16_t vlan_id,
representor->vf_id, vlan_id);
}
representor->vf_id, vlan_id);
}
-struct eth_dev_ops i40e_representor_dev_ops = {
+st
atic const st
ruct eth_dev_ops i40e_representor_dev_ops = {
.dev_infos_get = i40e_vf_representor_dev_infos_get,
.dev_start = i40e_vf_representor_dev_start,
.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;
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;
/* 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->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;
/* 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
}
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;
}
return 0;
}