[dpdk-dev] [PATCH v2 22/23] mlx4: disable multicast echo when device is not VF
Adrien Mazarguil
adrien.mazarguil at 6wind.com
Tue Jun 30 11:28:08 CEST 2015
From: Olga Shern <olgas at mellanox.com>
Multicast loopback must be disabled on PF devices to prevent the adapter
from sending frames back. Required with MOFED 3.0.
Signed-off-by: Olga Shern <olgas at mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
---
drivers/net/mlx4/Makefile | 5 +++++
drivers/net/mlx4/mlx4.c | 7 +++++++
2 files changed, 12 insertions(+)
diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile
index fd74dc8..725717f 100644
--- a/drivers/net/mlx4/Makefile
+++ b/drivers/net/mlx4/Makefile
@@ -112,6 +112,11 @@ mlx4_autoconf.h: $(RTE_SDK)/scripts/auto-config-h.sh
HAVE_EXP_QUERY_DEVICE \
infiniband/verbs.h \
type 'struct ibv_exp_device_attr' $(AUTOCONF_OUTPUT)
+ $Q sh -- '$<' '$@' \
+ HAVE_EXP_QP_BURST_CREATE_DISABLE_ETH_LOOPBACK \
+ infiniband/verbs.h \
+ enum IBV_EXP_QP_BURST_CREATE_DISABLE_ETH_LOOPBACK \
+ $(AUTOCONF_OUTPUT)
mlx4.o: mlx4_autoconf.h
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 631ab02..f4491e7 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -1534,6 +1534,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_DISABLE_ETH_LOOPBACK
+ /* MC loopback must be disabled when not using a VF. */
+ .family_flags =
+ (!priv->vf ?
+ IBV_EXP_QP_BURST_CREATE_DISABLE_ETH_LOOPBACK :
+ 0),
+#endif
};
tmpl.if_qp = ibv_exp_query_intf(priv->ctx, &attr.params, &status);
if (tmpl.if_qp == NULL) {
--
2.1.0
More information about the dev
mailing list