net/mlx4: fix indirection table error rollback
[dpdk.git] / drivers / net / mlx4 / mlx4_txq.c
index 0e27df2..a9c5bd2 100644 (file)
@@ -261,7 +261,9 @@ mlx4_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
        }
        *txq = (struct txq){
                .priv = priv,
-               .stats.idx = idx,
+               .stats = {
+                       .idx = idx,
+               },
                .socket = socket,
                .elts_n = desc,
                .elts = elts,
@@ -278,6 +280,8 @@ mlx4_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
                        RTE_MIN(MLX4_PMD_TX_PER_COMP_REQ, desc / 4),
                .csum = priv->hw_csum,
                .csum_l2tun = priv->hw_csum_l2tun,
+               /* Enable Tx loopback for VF devices. */
+               .lb = !!priv->vf,
                .bounce_buf = bounce_buf,
        };
        txq->cq = ibv_create_cq(priv->ctx, desc, NULL, NULL, 0);