From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by dpdk.org (Postfix) with ESMTP id 913082A66 for ; Thu, 3 May 2018 13:06:29 +0200 (CEST) Received: by mail-wr0-f195.google.com with SMTP id p18-v6so17159471wrm.1 for ; Thu, 03 May 2018 04:06:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=k2uzxrS7lmM29TL4SdhHr420cH2DwyDIvLxAli0wMDw=; b=KRCXR1d9+S3ewI1+z/pXp8IVGzN2+lOlkZ+MD/6D2E2DC5HdOZ2XE19U09vOJBjYb2 gHXpSvflI7zhAXOCwnnYF0EZsoUT/favo/L3yj+mmT4933kn4DZjZ9dL1jqOivoE2lDC 9QjAHPi9HMWEj/Cxebdg3KOZHix8dXxb6QexyRYv9kb6qUcQjmpOb8ZitY4NmHAlKZqn rCnGdXmjUrl12ZeMuqXJqF7k1LLxw1hpw8Ad86PGjqfLsqyRkaz8abKBhv90Gv7yZEkA +boA3PndESBgGtuVJzrkNWPRgFiGYXACz9pN5VOCVR1DhWwLWLQblW/ah5zaagTpqh/J 6DFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=k2uzxrS7lmM29TL4SdhHr420cH2DwyDIvLxAli0wMDw=; b=pCexcH/cyA8R0ZNWB7DX+nYcfmsOac33a7Kng9h9NJMUZxkvu9gdvfrSXKVAuQhfzq jp/IPGMgBrsehFrMYB2++OiFUNF4H1Uiw1OfG4PfnDf+qSAIqJjKdNMIew7Lrp0k0YwY zauv1Xh+ZKrNaFr4dT2bkWIOIQ3MDDUZOApanLfqUrRgAK9lgp295aynMk69VHi2ceqn Npgcw22tEPOYsC8c2qt15IERM0zYfdIjhY4dEk0DUrPcF1U0A2Hd0VxSsN6vwKqbrdrJ l/CMwFehzqKV8F5K+PgGGqQPFnUZmHfI3bGguaXqw2Mq9aisslZ1eJngHnQh5s2RyMEe Ybjg== X-Gm-Message-State: ALQs6tBHWYXJO3yxDcxQTFRoZfsbfFg4BAtPZh253lIY0KwsSpLDbO1p zpEzz1L0eIdvL7KWtygz7mg= X-Google-Smtp-Source: AB8JxZqKpV7yIFVuavNuNhmLfd4Fi6ZOM0CzrxC80ZbA2dJ/pS5jI47v/RazIg829Ve3reG3TQGqaw== X-Received: by 2002:adf:ea01:: with SMTP id q1-v6mr19234306wrm.50.1525345589324; Thu, 03 May 2018 04:06:29 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id k82sm12552270wmf.17.2018.05.03.04.06.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 May 2018 04:06:28 -0700 (PDT) From: luca.boccassi@gmail.com To: Adrien Mazarguil Cc: dpdk stable Date: Thu, 3 May 2018 12:06:10 +0100 Message-Id: <20180503110612.12146-3-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180503110612.12146-1-luca.boccassi@gmail.com> References: <20180430145402.23057-42-luca.boccassi@gmail.com> <20180503110612.12146-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/mlx4: fix default RSS hash fields' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2018 11:06:29 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/04/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 4da4da9d55e86db126aaee76369a58289dcb2bbd Mon Sep 17 00:00:00 2001 From: Adrien Mazarguil Date: Thu, 26 Apr 2018 18:26:15 +0200 Subject: [PATCH] net/mlx4: fix default RSS hash fields [ upstream commit 1d173da83ef2176b7ef107b76a4c5b80d47e1d00 ] Using special types value -1 with mlx4_conv_rss_types() is supposed to return a supported set of Verbs RSS hash fields, that is, priv->hw_rss_sup unmodified. Due to the way this function is written and because it is also used to initially populate priv->hw_rss_sup however, this special value works properly only once and fails with ENOTSUP errors afterward. This problem can be seen when re-creating default flows (e.g. by entering and leaving isolated mode). Fixes: 024e87bef40b ("net/mlx4: restore UDP RSS by probing capabilities") Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 15 +++++++-------- drivers/net/mlx4/mlx4_flow.c | 13 ++++--------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index c1f825e75..3a95e1d5e 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -569,14 +569,13 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) if (!priv->hw_rss_sup) { WARN("no RSS capabilities reported; disabling support" " for UDP RSS and inner VXLAN RSS"); - /* Fake support for all possible RSS hash fields. */ - priv->hw_rss_sup = ~UINT64_C(0); - priv->hw_rss_sup = mlx4_conv_rss_hf(priv, -1); - /* Filter out known unsupported fields. */ - priv->hw_rss_sup &= - ~(uint64_t)(IBV_RX_HASH_SRC_PORT_UDP | - IBV_RX_HASH_DST_PORT_UDP | - IBV_RX_HASH_INNER); + priv->hw_rss_sup = + IBV_RX_HASH_SRC_IPV4 | + IBV_RX_HASH_DST_IPV4 | + IBV_RX_HASH_SRC_IPV6 | + IBV_RX_HASH_DST_IPV6 | + IBV_RX_HASH_SRC_PORT_TCP | + IBV_RX_HASH_DST_PORT_TCP; } DEBUG("supported RSS hash fields mask: %016" PRIx64, priv->hw_rss_sup); diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c index 4d26df326..d7a02e90c 100644 --- a/drivers/net/mlx4/mlx4_flow.c +++ b/drivers/net/mlx4/mlx4_flow.c @@ -125,20 +125,15 @@ mlx4_conv_rss_hf(struct priv *priv, uint64_t rss_hf) uint64_t conv = 0; unsigned int i; + if (rss_hf == (uint64_t)-1) + return priv->hw_rss_sup; for (i = 0; i != RTE_DIM(in); ++i) if (rss_hf & in[i]) { seen |= rss_hf & in[i]; conv |= out[i]; } - if ((conv & priv->hw_rss_sup) == conv) { - if (rss_hf == (uint64_t)-1) { - /* Include inner RSS by default if supported. */ - conv |= priv->hw_rss_sup & IBV_RX_HASH_INNER; - return conv; - } - if (!(rss_hf & ~seen)) - return conv; - } + if ((conv & priv->hw_rss_sup) == conv && !(rss_hf & ~seen)) + return conv; rte_errno = ENOTSUP; return (uint64_t)-1; } -- 2.14.2