Skip to contentSkip to conversation

net/enic: add support for TSO

PATCH Superseded John Daley 2 participants 5 messages Jan 7, 2017 – Jan 10, 2017 Network drivers

lore
Share & tools
lore

John Daley

author
#0 lore raw

PATCH 1/1 net/enic: add support for TSO

The enic TSO implementation requires that the length of the Eth/IP/TCP headers be passed to the NIC. Other than that, it's just a matter of setting the mss and offload mode on a per packet basis.

In TSO mode, IP and TCP checksums are offloaded even if not requested with mb->ol_flags.

---
 drivers/net/enic/enic_ethdev.c |  3 +-
 drivers/net/enic/enic_rxtx.c   | 93 ++++++++++++++++++++++++++++++++++++------
 2 files changed, 83 insertions(+), 13 deletions(-)
drivers/net/enic/enic_ethdev.c +2 -1
index e5ceb98..c3ba2aa 100644
@@ -475,7 +475,8 @@ static void enicpmd_dev_info_get(struct rte_eth_dev *eth_dev,
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_IPV4_CKSUM  |
 		DEV_TX_OFFLOAD_UDP_CKSUM   |
-		DEV_TX_OFFLOAD_TCP_CKSUM;
+		DEV_TX_OFFLOAD_TCP_CKSUM   |
+		DEV_TX_OFFLOAD_TCP_TSO;
 	device_info->default_rxconf = (struct rte_eth_rxconf) {
 		.rx_free_thresh = ENIC_DEFAULT_RX_FREE_THRESH
 	};
drivers/net/enic/enic_rxtx.c +81 -12

139 lines not on this page · raw message

Signature · 1 line
2.10.0
#1 lore raw

Hi John,

Quoted 8 lines · John Daley

The enic TSO implementation requires that the length of the Eth/IP/TCP headers be passed to the NIC. Other than that, it's just a matter of setting the mss and offload mode on a per packet basis.

In TSO mode, IP and TCP checksums are offloaded even if not requested with mb->ol_flags.

Can you please update doc/guides/nics/features/enic.ini to document the TSO feature in this patch?

Thanks,
ferruh

Quoted 1 line

---

<...>

author
#2 lore raw

PATCH v2 1/1 net/enic: add support for TSO

The enic TSO implementation requires that the length of the Eth/IP/TCP headers be passed to the NIC. Other than that, it's just a matter of setting the mss and offload mode on a per packet basis.

In TSO mode, IP and TCP checksums are offloaded even if not requested with mb->ol_flags.

---
v2: document TSO feature for enic

 doc/guides/nics/features/enic.ini |  1 +
 drivers/net/enic/enic_ethdev.c    |  3 +-
 drivers/net/enic/enic_rxtx.c      | 93 ++++++++++++++++++++++++++++++++++-----
 3 files changed, 84 insertions(+), 13 deletions(-)
doc/guides/nics/features/enic.ini +1 -0
index 86576a7..51b330f 100644
@@ -10,6 +10,7 @@ Queue start/stop     = Y
 MTU update           = Y
 Jumbo frame          = Y
 Scattered Rx         = Y
+TSO                  = Y
 Promiscuous mode     = Y
 Unicast MAC filter   = Y
 Multicast MAC filter = Y
drivers/net/enic/enic_ethdev.c +2 -1
index e5ceb98..c3ba2aa 100644
@@ -475,7 +475,8 @@ static void enicpmd_dev_info_get(struct rte_eth_dev *eth_dev,
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_IPV4_CKSUM  |
 		DEV_TX_OFFLOAD_UDP_CKSUM   |
-		DEV_TX_OFFLOAD_TCP_CKSUM;
+		DEV_TX_OFFLOAD_TCP_CKSUM   |
+		DEV_TX_OFFLOAD_TCP_TSO;
 	device_info->default_rxconf = (struct rte_eth_rxconf) {
 		.rx_free_thresh = ENIC_DEFAULT_RX_FREE_THRESH
 	};
drivers/net/enic/enic_rxtx.c +81 -12

139 lines not on this page · raw message

Signature · 1 line
2.10.0
author
#3 lore raw

PATCH v3 1/1 net/enic: add support for TSO

In reply to Ferruh Yigit

The enic TSO implementation requires that the length of the Eth/IP/TCP headers be passed to the NIC. Other than that, it's just a matter of setting the mss and offload mode on a per packet basis.

In TSO mode, IP and TCP checksums are offloaded even if not requested with mb->ol_flags.

---
v2: document TSO feature for enic
v3: initialize enic mss field on every packet

 doc/guides/nics/features/enic.ini |  1 +
 drivers/net/enic/enic_ethdev.c    |  3 +-
 drivers/net/enic/enic_rxtx.c      | 90 ++++++++++++++++++++++++++++++++++-----
 3 files changed, 83 insertions(+), 11 deletions(-)
doc/guides/nics/features/enic.ini +1 -0
index 86576a7..51b330f 100644
@@ -10,6 +10,7 @@ Queue start/stop     = Y
 MTU update           = Y
 Jumbo frame          = Y
 Scattered Rx         = Y
+TSO                  = Y
 Promiscuous mode     = Y
 Unicast MAC filter   = Y
 Multicast MAC filter = Y
drivers/net/enic/enic_ethdev.c +2 -1
index e5ceb98..c3ba2aa 100644
@@ -475,7 +475,8 @@ static void enicpmd_dev_info_get(struct rte_eth_dev *eth_dev,
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_IPV4_CKSUM  |
 		DEV_TX_OFFLOAD_UDP_CKSUM   |
-		DEV_TX_OFFLOAD_TCP_CKSUM;
+		DEV_TX_OFFLOAD_TCP_CKSUM   |
+		DEV_TX_OFFLOAD_TCP_TSO;
 	device_info->default_rxconf = (struct rte_eth_rxconf) {
 		.rx_free_thresh = ENIC_DEFAULT_RX_FREE_THRESH
 	};
drivers/net/enic/enic_rxtx.c +80 -10

127 lines not on this page · raw message

Signature · 1 line
2.10.0
Applied
#4 lore raw
Quoted 8 lines · John Daley

The enic TSO implementation requires that the length of the Eth/IP/TCP headers be passed to the NIC. Other than that, it's just a matter of setting the mss and offload mode on a per packet basis.

In TSO mode, IP and TCP checksums are offloaded even if not requested with mb->ol_flags.

Applied to dpdk-next-net/master, thanks.