From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 74163322C for ; Fri, 30 Nov 2018 00:13:55 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Nov 2018 01:19:45 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id wATNCW7k032075; Fri, 30 Nov 2018 01:13:50 +0200 From: Yongseok Koh To: Alejandro Lucero Cc: dpdk stable Date: Thu, 29 Nov 2018 15:10:40 -0800 Message-Id: <20181129231202.30436-46-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181129231202.30436-1-yskoh@mellanox.com> References: <20181129231202.30436-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'net/nfp: fix RSS' has been queued to LTS release 17.11.5 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, 29 Nov 2018 23:13:55 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/01/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Yongseok --- >>From eb2fd8681b6df35676d123d96d0e06cf20192dfa Mon Sep 17 00:00:00 2001 From: Alejandro Lucero Date: Wed, 26 Sep 2018 14:45:50 +0100 Subject: [PATCH] net/nfp: fix RSS [ upstream commit f14a51689894dc226f6af4ab39f7439e4384a06b ] Three problems are fixed in this patch: - RSS capabilities not advertised properly - RSS configuration just done for some RSS types - RSS hash match reported for just some RSS types Fixes: 934e4c60fbff ("nfp: add RSS") Signed-off-by: Alejandro Lucero --- drivers/net/nfp/nfp_net.c | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index db6f3f465..cf9d345c0 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -1236,8 +1236,10 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) ETH_TXQ_FLAGS_NOOFFLOADS, }; - dev_info->flow_type_rss_offloads = ETH_RSS_NONFRAG_IPV4_TCP | + dev_info->flow_type_rss_offloads = ETH_RSS_IPV4 | + ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_NONFRAG_IPV6_UDP; @@ -1919,6 +1921,18 @@ nfp_net_set_hash(struct nfp_net_rxq *rxq, struct nfp_net_rx_desc *rxd, case NFP_NET_RSS_IPV6_EX: mbuf->packet_type |= RTE_PTYPE_INNER_L3_IPV6_EXT; break; + case NFP_NET_RSS_IPV4_TCP: + mbuf->packet_type |= RTE_PTYPE_INNER_L3_IPV6_EXT; + break; + case NFP_NET_RSS_IPV6_TCP: + mbuf->packet_type |= RTE_PTYPE_INNER_L3_IPV6_EXT; + break; + case NFP_NET_RSS_IPV4_UDP: + mbuf->packet_type |= RTE_PTYPE_INNER_L3_IPV6_EXT; + break; + case NFP_NET_RSS_IPV6_UDP: + mbuf->packet_type |= RTE_PTYPE_INNER_L3_IPV6_EXT; + break; default: mbuf->packet_type |= RTE_PTYPE_INNER_L4_MASK; } @@ -2494,14 +2508,22 @@ nfp_net_rss_hash_update(struct rte_eth_dev *dev, } if (rss_hf & ETH_RSS_IPV4) - cfg_rss_ctrl |= NFP_NET_CFG_RSS_IPV4 | - NFP_NET_CFG_RSS_IPV4_TCP | - NFP_NET_CFG_RSS_IPV4_UDP; + cfg_rss_ctrl |= NFP_NET_CFG_RSS_IPV4; + + if (rss_hf & ETH_RSS_NONFRAG_IPV4_TCP) + cfg_rss_ctrl |= NFP_NET_CFG_RSS_IPV4_TCP; + + if (rss_hf & ETH_RSS_NONFRAG_IPV4_UDP) + cfg_rss_ctrl |= NFP_NET_CFG_RSS_IPV4_UDP; if (rss_hf & ETH_RSS_IPV6) - cfg_rss_ctrl |= NFP_NET_CFG_RSS_IPV6 | - NFP_NET_CFG_RSS_IPV6_TCP | - NFP_NET_CFG_RSS_IPV6_UDP; + cfg_rss_ctrl |= NFP_NET_CFG_RSS_IPV6; + + if (rss_hf & ETH_RSS_NONFRAG_IPV6_TCP) + cfg_rss_ctrl |= NFP_NET_CFG_RSS_IPV6_TCP; + + if (rss_hf & ETH_RSS_NONFRAG_IPV6_UDP) + cfg_rss_ctrl |= NFP_NET_CFG_RSS_IPV6_UDP; cfg_rss_ctrl |= NFP_NET_CFG_RSS_MASK; cfg_rss_ctrl |= NFP_NET_CFG_RSS_TOEPLITZ; -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 15:01:47.266576787 -0800 +++ 0046-net-nfp-fix-RSS.patch 2018-11-29 15:01:45.094961000 -0800 @@ -1,8 +1,10 @@ -From f14a51689894dc226f6af4ab39f7439e4384a06b Mon Sep 17 00:00:00 2001 +From eb2fd8681b6df35676d123d96d0e06cf20192dfa Mon Sep 17 00:00:00 2001 From: Alejandro Lucero Date: Wed, 26 Sep 2018 14:45:50 +0100 Subject: [PATCH] net/nfp: fix RSS +[ upstream commit f14a51689894dc226f6af4ab39f7439e4384a06b ] + Three problems are fixed in this patch: - RSS capabilities not advertised properly @@ -10,7 +12,6 @@ - RSS hash match reported for just some RSS types Fixes: 934e4c60fbff ("nfp: add RSS") -Cc: stable@dpdk.org Signed-off-by: Alejandro Lucero --- @@ -18,11 +19,11 @@ 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c -index 170b5d611..4d6a797b0 100644 +index db6f3f465..cf9d345c0 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c -@@ -1198,8 +1198,10 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) - .tx_rs_thresh = DEFAULT_TX_RSBIT_THRESH, +@@ -1236,8 +1236,10 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) + ETH_TXQ_FLAGS_NOOFFLOADS, }; - dev_info->flow_type_rss_offloads = ETH_RSS_NONFRAG_IPV4_TCP | @@ -33,7 +34,7 @@ ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_NONFRAG_IPV6_UDP; -@@ -1876,6 +1878,18 @@ nfp_net_set_hash(struct nfp_net_rxq *rxq, struct nfp_net_rx_desc *rxd, +@@ -1919,6 +1921,18 @@ nfp_net_set_hash(struct nfp_net_rxq *rxq, struct nfp_net_rx_desc *rxd, case NFP_NET_RSS_IPV6_EX: mbuf->packet_type |= RTE_PTYPE_INNER_L3_IPV6_EXT; break; @@ -52,8 +53,8 @@ default: mbuf->packet_type |= RTE_PTYPE_INNER_L4_MASK; } -@@ -2457,14 +2471,22 @@ nfp_net_rss_hash_write(struct rte_eth_dev *dev, - rss_hf = rss_conf->rss_hf; +@@ -2494,14 +2508,22 @@ nfp_net_rss_hash_update(struct rte_eth_dev *dev, + } if (rss_hf & ETH_RSS_IPV4) - cfg_rss_ctrl |= NFP_NET_CFG_RSS_IPV4 |