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/sfc/base: provide APIs to configure and reset vPort
[dpdk.git]
/
drivers
/
net
/
netvsc
/
hn_ethdev.c
diff --git
a/drivers/net/netvsc/hn_ethdev.c
b/drivers/net/netvsc/hn_ethdev.c
index
49b7ca7
..
9e7cf2d
100644
(file)
--- a/
drivers/net/netvsc/hn_ethdev.c
+++ b/
drivers/net/netvsc/hn_ethdev.c
@@
-112,6
+112,9
@@
eth_dev_vmbus_allocate(struct rte_vmbus_device *dev, size_t private_data_size)
eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
eth_dev->intr_handle = &dev->intr_handle;
eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
eth_dev->intr_handle = &dev->intr_handle;
+ /* allow ethdev to remove on close */
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE;
+
return eth_dev;
}
return eth_dev;
}
@@
-289,7
+292,7
@@
hn_dev_allmulticast_disable(struct rte_eth_dev *dev)
static int
hn_dev_mc_addr_list(struct rte_eth_dev *dev,
static int
hn_dev_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addr_set,
+ struct
rte_
ether_addr *mc_addr_set,
uint32_t nb_mc_addr)
{
/* No filtering on the synthetic path, but can do it on VF */
uint32_t nb_mc_addr)
{
/* No filtering on the synthetic path, but can do it on VF */
@@
-632,11
+635,12
@@
hn_dev_stop(struct rte_eth_dev *dev)
}
static void
}
static void
-hn_dev_close(struct rte_eth_dev *dev
__rte_unused
)
+hn_dev_close(struct rte_eth_dev *dev)
{
{
- PMD_INIT_
LOG(DEBUG, "close"
);
+ PMD_INIT_
FUNC_TRACE(
);
hn_vf_close(dev);
hn_vf_close(dev);
+ hn_dev_free_queues(dev);
}
static const struct eth_dev_ops hn_eth_dev_ops = {
}
static const struct eth_dev_ops hn_eth_dev_ops = {
@@
-735,6
+739,7
@@
eth_hn_dev_init(struct rte_eth_dev *eth_dev)
hv->port_id = eth_dev->data->port_id;
hv->latency = HN_CHAN_LATENCY_NS;
hv->max_queues = 1;
hv->port_id = eth_dev->data->port_id;
hv->latency = HN_CHAN_LATENCY_NS;
hv->max_queues = 1;
+ hv->vf_port = HN_INVALID_PORT;
err = hn_parse_args(eth_dev);
if (err)
err = hn_parse_args(eth_dev);
if (err)
@@
-761,7
+766,7
@@
eth_hn_dev_init(struct rte_eth_dev *eth_dev)
if (!hv->primary)
return -ENOMEM;
if (!hv->primary)
return -ENOMEM;
- err = hn_attach(hv, ETHER_MTU);
+ err = hn_attach(hv,
RTE_
ETHER_MTU);
if (err)
goto failed;
if (err)
goto failed;
@@
-788,7
+793,7
@@
eth_hn_dev_init(struct rte_eth_dev *eth_dev)
hv->max_queues = RTE_MIN(rxr_cnt, (unsigned int)max_chan);
/* If VF was reported but not added, do it now */
hv->max_queues = RTE_MIN(rxr_cnt, (unsigned int)max_chan);
/* If VF was reported but not added, do it now */
- if (hv->vf_present && !h
v->vf_dev
) {
+ if (hv->vf_present && !h
n_vf_attached(hv)
) {
PMD_INIT_LOG(DEBUG, "Adding VF device");
err = hn_vf_add(eth_dev, hv);
PMD_INIT_LOG(DEBUG, "Adding VF device");
err = hn_vf_add(eth_dev, hv);