From 2bbd8c9f8c8f246a17d8748b6d433007bcb1f790 Mon Sep 17 00:00:00 2001 From: Adrien Mazarguil Date: Fri, 30 Oct 2015 19:55:17 +0100 Subject: [PATCH] mlx5: enable multi packet send WR in Tx CQ For adapters that support it, this flag improves performance outside of VF context. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/Makefile | 5 +++++ drivers/net/mlx5/mlx5_txq.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index 2f9f2b825c..ae568e61a1 100644 --- a/drivers/net/mlx5/Makefile +++ b/drivers/net/mlx5/Makefile @@ -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 diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index a53b128413..aa7581fb22 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -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) { -- 2.20.1