From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by dpdk.org (Postfix) with ESMTP id 15654C448 for ; Tue, 30 Jun 2015 11:29:24 +0200 (CEST) Received: by wiwl6 with SMTP id l6so125423780wiw.0 for ; Tue, 30 Jun 2015 02:29:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/tbu+Rpu5l7cSpE1rfMH2mUQADrQe0gHcjZKc+1y6RU=; b=iImkWEXVNfMkAjXH2n8f/kpvqglygUDpSXIdgO1REFzTfuwmm8YNViLXDPaEjPDeb+ u2DGGGvLU2c+dLFZxX6AFTehXk3Bu0vxesyoIxFR+AQ2RpvySLpFntY8x81uj40qZMF9 ci2ca5sU7YLE2VgLV1P13io0KiiQUgypqhvkC/8eyys2vtDo6pPdIT7Kwf2t7IdvZ7N7 aIDNueLLgsq2/aiNq/H34MlEP7JPJ4wFOXwd750qr9tmSzuv/wOlAb24BtsVJacy5pgz PQemTX+rAgrFp/jcOYORPvjjrX2EREMwFX04/Akp8Bl4KJL1XhXhuc3Cu5cOA+cgFV6X mLOQ== X-Gm-Message-State: ALoCoQk8pyxckoacR/FiUd+tvJbs8kIJE7V8nEAmXM/D9LksTp8nFVjb6n1SPXb7Y6LBfm8kMJJm X-Received: by 10.180.91.76 with SMTP id cc12mr32568547wib.67.1435656564004; Tue, 30 Jun 2015 02:29:24 -0700 (PDT) Received: from 6wind.com (6wind.net2.nerim.net. [213.41.151.210]) by mx.google.com with ESMTPSA id q3sm68082503wjr.38.2015.06.30.02.29.22 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 30 Jun 2015 02:29:23 -0700 (PDT) From: Adrien Mazarguil To: dev@dpdk.org Date: Tue, 30 Jun 2015 11:28:08 +0200 Message-Id: <1435656489-27986-23-git-send-email-adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1435656489-27986-1-git-send-email-adrien.mazarguil@6wind.com> References: <1433546120-2254-1-git-send-email-adrien.mazarguil@6wind.com> <1435656489-27986-1-git-send-email-adrien.mazarguil@6wind.com> Subject: [dpdk-dev] [PATCH v2 22/23] mlx4: disable multicast echo when device is not VF X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2015 09:29:24 -0000 From: Olga Shern 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 Signed-off-by: Adrien Mazarguil --- 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