net/mlx: fix setting interface flags
[dpdk.git] / drivers / net / mlx5 / mlx5_txq.c
index 4f17fb0..6fe61c4 100644 (file)
@@ -320,7 +320,13 @@ txq_ctrl_setup(struct rte_eth_dev *dev, struct txq_ctrl *txq_ctrl,
                        .max_send_wr = ((priv->device_attr.max_qp_wr < desc) ?
                                        priv->device_attr.max_qp_wr :
                                        desc),
-                       /* Max number of scatter/gather elements in a WR. */
+                       /*
+                        * Max number of scatter/gather elements in a WR,
+                        * must be 1 to prevent libmlx5 from trying to affect
+                        * too much memory. TX gather is not impacted by the
+                        * priv->device_attr.max_sge limit and will still work
+                        * properly.
+                        */
                        .max_send_sge = 1,
                },
                .qp_type = IBV_QPT_RAW_PACKET,
@@ -343,6 +349,11 @@ txq_ctrl_setup(struct rte_eth_dev *dev, struct txq_ctrl *txq_ctrl,
                      (void *)dev, strerror(ret));
                goto error;
        }
+       DEBUG("TX queue capabilities: max_send_wr=%u, max_send_sge=%u,"
+             " max_inline_data=%u",
+             attr.init.cap.max_send_wr,
+             attr.init.cap.max_send_sge,
+             attr.init.cap.max_inline_data);
        attr.mod = (struct ibv_exp_qp_attr){
                /* Move the QP to this state. */
                .qp_state = IBV_QPS_INIT,