From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 8EDFE1B104 for ; Wed, 21 Nov 2018 17:06:33 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C3F8B3084299; Wed, 21 Nov 2018 16:06:32 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7DB9D608E7; Wed, 21 Nov 2018 16:06:31 +0000 (UTC) From: Kevin Traynor To: Rahul Lakkireddy Cc: Martin Weiser , dpdk stable Date: Wed, 21 Nov 2018 16:04:22 +0000 Message-Id: <20181121160440.9014-32-ktraynor@redhat.com> In-Reply-To: <20181121160440.9014-1-ktraynor@redhat.com> References: <20181121160440.9014-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 21 Nov 2018 16:06:33 +0000 (UTC) Subject: [dpdk-stable] patch 'net/cxgbe: announce Rx scatter offload' has been queued to stable release 18.08.1 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: Wed, 21 Nov 2018 16:06:34 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/26/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. Kevin Traynor --- >>From f99541eab075732b123cca75a76a31e97ba69dcc Mon Sep 17 00:00:00 2001 From: Rahul Lakkireddy Date: Mon, 24 Sep 2018 21:35:04 +0530 Subject: [PATCH] net/cxgbe: announce Rx scatter offload [ upstream commit 0f3ff2445da3697f29a9e1be7a8b51273ddceeac ] Scatter Rx is already supported by CXGBE PMD. So, add the missing DEV_RX_OFFLOAD_SCATTER flag to the list of supported Rx offload features. Also, move the macros for supported list of offload features to header file. Fixes: 436125e64174 ("net/cxgbe: update to Rx/Tx offload API") Reported-by: Martin Weiser Signed-off-by: Rahul Lakkireddy --- drivers/net/cxgbe/cxgbe.h | 16 ++++++++++++++++ drivers/net/cxgbe/cxgbe_ethdev.c | 20 +++++++------------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h index 5e6f5c98d..62581abbe 100644 --- a/drivers/net/cxgbe/cxgbe.h +++ b/drivers/net/cxgbe/cxgbe.h @@ -35,4 +35,20 @@ #define CXGBE_RSS_HF_ALL (ETH_RSS_IP | ETH_RSS_TCP | ETH_RSS_UDP) +/* Tx/Rx Offloads supported */ +#define CXGBE_TX_OFFLOADS (DEV_TX_OFFLOAD_VLAN_INSERT | \ + DEV_TX_OFFLOAD_IPV4_CKSUM | \ + DEV_TX_OFFLOAD_UDP_CKSUM | \ + DEV_TX_OFFLOAD_TCP_CKSUM | \ + DEV_TX_OFFLOAD_TCP_TSO) + +#define CXGBE_RX_OFFLOADS (DEV_RX_OFFLOAD_VLAN_STRIP | \ + DEV_RX_OFFLOAD_CRC_STRIP |\ + DEV_RX_OFFLOAD_IPV4_CKSUM | \ + DEV_RX_OFFLOAD_UDP_CKSUM | \ + DEV_RX_OFFLOAD_TCP_CKSUM | \ + DEV_RX_OFFLOAD_JUMBO_FRAME | \ + DEV_RX_OFFLOAD_SCATTER) + + #define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan" #define CXGBE_DEVARG_FORCE_LINK_UP "force_link_up" diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index 4dcad7a23..cde01210e 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -60,17 +60,4 @@ #include "t4_pci_id_tbl.h" -#define CXGBE_TX_OFFLOADS (DEV_TX_OFFLOAD_VLAN_INSERT |\ - DEV_TX_OFFLOAD_IPV4_CKSUM |\ - DEV_TX_OFFLOAD_UDP_CKSUM |\ - DEV_TX_OFFLOAD_TCP_CKSUM |\ - DEV_TX_OFFLOAD_TCP_TSO) - -#define CXGBE_RX_OFFLOADS (DEV_RX_OFFLOAD_VLAN_STRIP |\ - DEV_RX_OFFLOAD_CRC_STRIP |\ - DEV_RX_OFFLOAD_IPV4_CKSUM |\ - DEV_RX_OFFLOAD_JUMBO_FRAME |\ - DEV_RX_OFFLOAD_UDP_CKSUM |\ - DEV_RX_OFFLOAD_TCP_CKSUM) - uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) @@ -342,4 +329,5 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev) { struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private); + struct rte_eth_rxmode *rx_conf = ð_dev->data->dev_conf.rxmode; struct adapter *adapter = pi->adapter; int err = 0, i; @@ -362,4 +350,9 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev) } + if (rx_conf->offloads & DEV_RX_OFFLOAD_SCATTER) + eth_dev->data->scattered_rx = 1; + else + eth_dev->data->scattered_rx = 0; + cxgbe_enable_rx_queues(pi); @@ -408,4 +401,5 @@ void cxgbe_dev_stop(struct rte_eth_dev *eth_dev) */ t4_sge_eth_clear_queues(pi); + eth_dev->data->scattered_rx = 0; } -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-21 15:59:14.439958982 +0000 +++ 0032-net-cxgbe-announce-Rx-scatter-offload.patch 2018-11-21 15:59:13.000000000 +0000 @@ -1,8 +1,10 @@ -From 0f3ff2445da3697f29a9e1be7a8b51273ddceeac Mon Sep 17 00:00:00 2001 +From f99541eab075732b123cca75a76a31e97ba69dcc Mon Sep 17 00:00:00 2001 From: Rahul Lakkireddy Date: Mon, 24 Sep 2018 21:35:04 +0530 Subject: [PATCH] net/cxgbe: announce Rx scatter offload +[ upstream commit 0f3ff2445da3697f29a9e1be7a8b51273ddceeac ] + Scatter Rx is already supported by CXGBE PMD. So, add the missing DEV_RX_OFFLOAD_SCATTER flag to the list of supported Rx offload features. @@ -11,20 +13,19 @@ header file. Fixes: 436125e64174 ("net/cxgbe: update to Rx/Tx offload API") -Cc: stable@dpdk.org Reported-by: Martin Weiser Signed-off-by: Rahul Lakkireddy --- - drivers/net/cxgbe/cxgbe.h | 15 +++++++++++++++ - drivers/net/cxgbe/cxgbe_ethdev.c | 19 +++++++------------ - 2 files changed, 22 insertions(+), 12 deletions(-) + drivers/net/cxgbe/cxgbe.h | 16 ++++++++++++++++ + drivers/net/cxgbe/cxgbe_ethdev.c | 20 +++++++------------- + 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h -index 5e6f5c98d..eb58f8802 100644 +index 5e6f5c98d..62581abbe 100644 --- a/drivers/net/cxgbe/cxgbe.h +++ b/drivers/net/cxgbe/cxgbe.h -@@ -35,4 +35,19 @@ +@@ -35,4 +35,20 @@ #define CXGBE_RSS_HF_ALL (ETH_RSS_IP | ETH_RSS_TCP | ETH_RSS_UDP) +/* Tx/Rx Offloads supported */ @@ -35,6 +36,7 @@ + DEV_TX_OFFLOAD_TCP_TSO) + +#define CXGBE_RX_OFFLOADS (DEV_RX_OFFLOAD_VLAN_STRIP | \ ++ DEV_RX_OFFLOAD_CRC_STRIP |\ + DEV_RX_OFFLOAD_IPV4_CKSUM | \ + DEV_RX_OFFLOAD_UDP_CKSUM | \ + DEV_RX_OFFLOAD_TCP_CKSUM | \ @@ -45,10 +47,10 @@ #define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan" #define CXGBE_DEVARG_FORCE_LINK_UP "force_link_up" diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c -index 117263e2b..b2f83ea37 100644 +index 4dcad7a23..cde01210e 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c -@@ -60,16 +60,4 @@ +@@ -60,17 +60,4 @@ #include "t4_pci_id_tbl.h" -#define CXGBE_TX_OFFLOADS (DEV_TX_OFFLOAD_VLAN_INSERT |\ @@ -58,6 +60,7 @@ - DEV_TX_OFFLOAD_TCP_TSO) - -#define CXGBE_RX_OFFLOADS (DEV_RX_OFFLOAD_VLAN_STRIP |\ +- DEV_RX_OFFLOAD_CRC_STRIP |\ - DEV_RX_OFFLOAD_IPV4_CKSUM |\ - DEV_RX_OFFLOAD_JUMBO_FRAME |\ - DEV_RX_OFFLOAD_UDP_CKSUM |\ @@ -65,13 +68,13 @@ - uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) -@@ -341,4 +329,5 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev) +@@ -342,4 +329,5 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev) { struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private); + struct rte_eth_rxmode *rx_conf = ð_dev->data->dev_conf.rxmode; struct adapter *adapter = pi->adapter; int err = 0, i; -@@ -361,4 +350,9 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev) +@@ -362,4 +350,9 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev) } + if (rx_conf->offloads & DEV_RX_OFFLOAD_SCATTER) @@ -81,7 +84,7 @@ + cxgbe_enable_rx_queues(pi); -@@ -407,4 +401,5 @@ void cxgbe_dev_stop(struct rte_eth_dev *eth_dev) +@@ -408,4 +401,5 @@ void cxgbe_dev_stop(struct rte_eth_dev *eth_dev) */ t4_sge_eth_clear_queues(pi); + eth_dev->data->scattered_rx = 0;