net/ice: enable flow redirect on switch
[dpdk.git] / drivers / net / virtio / virtio_ethdev.c
index 044eb10..f9d0ea7 100644 (file)
@@ -1913,6 +1913,8 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
                        goto err_vtpci_init;
        }
 
+       rte_spinlock_init(&hw->state_lock);
+
        /* reset device and negotiate default features */
        ret = virtio_init_device(eth_dev, VIRTIO_PMD_DEFAULT_GUEST_FEATURES);
        if (ret < 0)
@@ -2155,8 +2157,6 @@ virtio_dev_configure(struct rte_eth_dev *dev)
                        return -EBUSY;
                }
 
-       rte_spinlock_init(&hw->state_lock);
-
        hw->use_simple_rx = 1;
 
        if (vtpci_with_feature(hw, VIRTIO_F_IN_ORDER)) {