net/netvsc: initialize vf spinlock
PATCH 1/1 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")
Signed-off-by Stephen Hemminger <[email protected]>
--- drivers/net/netvsc/hn_ethdev.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/netvsc/hn_ethdev.c +1 -0
@@ -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);
Signature · 1 line
2.20.1
Ferruh Yigit
AppliedQuoted 6 lines · Stephen Hemminger
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")Signed-off-by Stephen Hemminger <[email protected]>
Applied to dpdk-next-net/master, thanks.