From patchwork Tue Jun 30 09:27:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Mazarguil X-Patchwork-Id: 5978 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 9369DC49A; Tue, 30 Jun 2015 11:29:04 +0200 (CEST) Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id D7ECAC364 for ; Tue, 30 Jun 2015 11:28:47 +0200 (CEST) Received: by widjy10 with SMTP id jy10so24862923wid.1 for ; Tue, 30 Jun 2015 02:28:47 -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=EPGIKjgc02T5sxAqcwCXuLO4UKawNiYU6V9bAUyjNRo=; b=JdSdJPifilxW0nSI1X2lU7a8K0G/oZ1jmjNq/BsO7kTk46XJdPp5qb/Qzbvw5FRxO2 pyftOB6p0zaIA3toTEiF1R+wHbXYAO4zgScBJO23iRHfus92/4bBYeOP+GXJAkUSjnLe Bw7P9fsSSwvHb0EjLFPF90E0FiXU9t6vzQrVGm6WWuWewjfk5xX58YcJjWqEy+zUOusw 7IfpuTd/g+j+i2NRY9sMZ9JBaB2DxbbnN6/Zlz6RYm9kZFJoI51/Kb41mym3loMzX8bY njTQ5qqPg4+GwuPMQJE7XKQ3DYqDDkVgKeQy5PuKBkIe/ih9MKjwVmNGXfzxbCGn/TNd xEpQ== X-Gm-Message-State: ALoCoQnT2eQ7PfpR1w1DM2x41S8l70HO50bbtAo4FkXeyzEL1cRdMu9LeFdu9XJsSYGCNGsMhGZo X-Received: by 10.180.97.129 with SMTP id ea1mr32542278wib.24.1435656527780; Tue, 30 Jun 2015 02:28:47 -0700 (PDT) Received: from 6wind.com (6wind.net2.nerim.net. [213.41.151.210]) by mx.google.com with ESMTPSA id c11sm16131751wib.1.2015.06.30.02.28.46 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 30 Jun 2015 02:28:46 -0700 (PDT) From: Adrien Mazarguil To: dev@dpdk.org Date: Tue, 30 Jun 2015 11:27:56 +0200 Message-Id: <1435656489-27986-11-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 10/23] mlx4: remove provision for flow creation failure in DMFS A0 mode 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Or Ami Starting from MLNX_OFED 3.0 FW 2.34.5000 when working with optimized steering mode (-7) QPs can be attached to the port's MAC, therefore no need for the check. Signed-off-by: Or Ami Signed-off-by: Olga Shern Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index c87facb..8da21cd 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -272,7 +272,6 @@ struct priv { uint8_t port; /* Physical port number. */ unsigned int started:1; /* Device started, flows enabled. */ unsigned int promisc:1; /* Device in promiscuous mode. */ - unsigned int promisc_ok:1; /* Promiscuous flow is supported. */ unsigned int allmulti:1; /* Device receives all multicast packets. */ unsigned int hw_qpg:1; /* QP groups are supported. */ unsigned int hw_tss:1; /* TSS is supported. */ @@ -1983,25 +1982,6 @@ rxq_mac_addr_add(struct rxq *rxq, unsigned int mac_index) errno = 0; flow = ibv_create_flow(rxq->qp, attr); if (flow == NULL) { - int err = errno; - - /* Flow creation failure is not fatal when in DMFS A0 mode. - * Ignore error if promiscuity is already enabled or can be - * enabled. */ - if (priv->promisc_ok) - return 0; - if ((rxq->promisc_flow != NULL) || - (rxq_promiscuous_enable(rxq) == 0)) { - if (rxq->promisc_flow != NULL) - rxq_promiscuous_disable(rxq); - WARN("cannot configure normal flow but promiscuous" - " mode is fine, assuming promiscuous optimization" - " is enabled" - " (options mlx4_core log_num_mgm_entry_size=-7)"); - priv->promisc_ok = 1; - return 0; - } - errno = err; /* It's not clear whether errno is always set in this case. */ ERROR("%p: flow configuration failed, errno=%d: %s", (void *)rxq, errno,