mlx5: enable multi packet send WR in Tx CQ
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>
Fri, 30 Oct 2015 18:55:17 +0000 (19:55 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 1 Nov 2015 10:23:45 +0000 (11:23 +0100)
For adapters that support it, this flag improves performance outside of VF
context.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
drivers/net/mlx5/Makefile
drivers/net/mlx5/mlx5_txq.c

index 2f9f2b8..ae568e6 100644 (file)
@@ -120,6 +120,11 @@ mlx5_autoconf.h: $(RTE_SDK)/scripts/auto-config-h.sh
                HAVE_FLOW_SPEC_IPV6 \
                infiniband/verbs.h \
                type 'struct ibv_exp_flow_spec_ipv6' $(AUTOCONF_OUTPUT)
+       $Q sh -- '$<' '$@' \
+               HAVE_EXP_QP_BURST_CREATE_ENABLE_MULTI_PACKET_SEND_WR \
+               infiniband/verbs.h \
+               enum IBV_EXP_QP_BURST_CREATE_ENABLE_MULTI_PACKET_SEND_WR \
+               $(AUTOCONF_OUTPUT)
 
 mlx5.o: mlx5_autoconf.h
 
index a53b128..aa7581f 100644 (file)
@@ -395,6 +395,13 @@ txq_setup(struct rte_eth_dev *dev, struct txq *txq, uint16_t desc,
                .intf_scope = IBV_EXP_INTF_GLOBAL,
                .intf = IBV_EXP_INTF_QP_BURST,
                .obj = tmpl.qp,
+#ifdef HAVE_EXP_QP_BURST_CREATE_ENABLE_MULTI_PACKET_SEND_WR
+               /* Multi packet send WR can only be used outside of VF. */
+               .family_flags =
+                       (!priv->vf ?
+                        IBV_EXP_QP_BURST_CREATE_ENABLE_MULTI_PACKET_SEND_WR :
+                        0),
+#endif
        };
        tmpl.if_qp = ibv_exp_query_intf(priv->ctx, &attr.params, &status);
        if (tmpl.if_qp == NULL) {