* [dpdk-stable] [PATCH] net/cxgbe: add missing DEV_RX_OFFLOAD_SCATTER flag
@ 2018-09-24 16:05 Rahul Lakkireddy
2018-09-25 14:49 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: Rahul Lakkireddy @ 2018-09-24 16:05 UTC (permalink / raw)
To: dev; +Cc: martin.weiser, indranil, nirranjan, stable
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")
Cc: stable@dpdk.org
Reported-by: Martin Weiser <martin.weiser@allegro-packets.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
drivers/net/cxgbe/cxgbe.h | 15 +++++++++++++++
drivers/net/cxgbe/cxgbe_ethdev.c | 19 +++++++------------
2 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
index 5e6f5c98d..eb58f8802 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -34,6 +34,21 @@
ETH_RSS_IPV6_UDP_EX)
#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_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 117263e2b..b2f83ea37 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -59,18 +59,6 @@
*/
#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_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)
{
@@ -340,6 +328,7 @@ void cxgbe_dev_close(struct rte_eth_dev *eth_dev)
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;
@@ -360,6 +349,11 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
goto out;
}
+ 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);
err = setup_rss(pi);
@@ -406,6 +400,7 @@ void cxgbe_dev_stop(struct rte_eth_dev *eth_dev)
* have been disabled
*/
t4_sge_eth_clear_queues(pi);
+ eth_dev->data->scattered_rx = 0;
}
int cxgbe_dev_configure(struct rte_eth_dev *eth_dev)
--
2.18.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-stable] [PATCH] net/cxgbe: add missing DEV_RX_OFFLOAD_SCATTER flag
2018-09-24 16:05 [dpdk-stable] [PATCH] net/cxgbe: add missing DEV_RX_OFFLOAD_SCATTER flag Rahul Lakkireddy
@ 2018-09-25 14:49 ` Ferruh Yigit
0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2018-09-25 14:49 UTC (permalink / raw)
To: Rahul Lakkireddy, dev; +Cc: martin.weiser, indranil, nirranjan, stable
On 9/24/2018 5:05 PM, Rahul Lakkireddy wrote:
> 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")
> Cc: stable@dpdk.org
>
> Reported-by: Martin Weiser <martin.weiser@allegro-packets.com>
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-25 14:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-24 16:05 [dpdk-stable] [PATCH] net/cxgbe: add missing DEV_RX_OFFLOAD_SCATTER flag Rahul Lakkireddy
2018-09-25 14:49 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).