summaryrefslogtreecommitdiff
path: root/drivers/net/netvsc/hn_ethdev.c
diff options
context:
space:
mode:
authorStephen Hemminger <sthemmin@microsoft.com>2019-06-06 09:15:10 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2019-06-20 23:42:04 +0200
commit5e811a1a39e650aafc931306b0042837baac0450 (patch)
tree6f96e2d2c7248bee616cc7a2e4bb00ef3dfcf858 /drivers/net/netvsc/hn_ethdev.c
parent5f6bd807691e300b2d8c25c209fb778fa6692d61 (diff)
downloaddpdk-5e811a1a39e650aafc931306b0042837baac0450.zip
dpdk-5e811a1a39e650aafc931306b0042837baac0450.tar.gz
dpdk-5e811a1a39e650aafc931306b0042837baac0450.tar.xz
net/netvsc: initialize VF spinlock
The VF spinlock was never initialized. It works because it is in zmalloc'd memory and an unlocked lock on x86 is 0. But for good practice, all spinlock's should be initialized. Fixes: dc7680e8597c ("net/netvsc: support integrated VF") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Diffstat (limited to 'drivers/net/netvsc/hn_ethdev.c')
-rw-r--r--drivers/net/netvsc/hn_ethdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 9e7cf2d..70352f0 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -739,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;
+ rte_spinlock_init(&hv->vf_lock);
hv->vf_port = HN_INVALID_PORT;
err = hn_parse_args(eth_dev);