i40e: Add support for MPLS + TSO
Subsystems (2)
PATCH v2 1/1 i40e: Add support for MPLS + TSO
This change adds support for TSO of MPLS packets.
In my tests with tcpdump it seems to work. Note this test setup has a 9000 byte MTU:
MPLS (label 100, exp 0, [S], ttl 64) IP srcip.50086 > dstip.1234:
Flags [P.], seq 593345:644401, ack 0, win 420, options [nop,nop,TS val 45022534 ecr 1722291395], length 51056
IP dstip.1234 > srcip.50086: Flags [.], ack 593345, win 122,
options [nop,nop,TS val 1722291395 ecr 45022534], length 0
IP dstip.1234 > srcip.50086: Flags [.], ack 602289, win 105,
options [nop,nop,TS val 1722291395 ecr 45022534], length 0
IP dstip.1234 > srcip.50086: Flags [.], ack 620177, win 71,
options [nop,nop,TS val 1722291395 ecr 45022534], length 0
MPLS (label 100, exp 0, [S], ttl 64) IP srcip.50086 > dstip.1234:
Flags [P.], seq 644401:655953, ack 0, win 420, options [nop,nop,TS val 45022534 ecr 1722291395], length 11552
IP dstip.1234 > srcip.50086: Flags [.], ack 638065, win 37,
options [nop,nop,TS val 1722291395 ecr 45022534], length 0
IP dstip.1234 > srcip.50086: Flags [.], ack 644401, win 25,
options [nop,nop,TS val 1722291395 ecr 45022534], length 0
IP dstip.1234 > srcip.50086: Flags [.], ack 653345, win 8,
options [nop,nop,TS val 1722291395 ecr 45022534], length 0
IP dstip.1234 > srcip.50086: Flags [.], ack 655953, win 3,
options [nop,nop,TS val 1722291395 ecr 45022534], length 0
v1 -> v2:
- Restore erroneously deleted code from i40e_tso.
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 20 ++++++++++-- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 47 ++++++++++++++++++----------- 2 files changed, 48 insertions(+), 19 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +18 -2
@@ -13473,8 +13473,7 @@ static int i40e_config_netdev(struct i40e_vsi *vsi) np->vsi = vsi; hw_enc_features =NETIF_F_SG | -NETIF_F_IP_CSUM | -NETIF_F_IPV6_CSUM | +NETIF_F_HW_CSUM |NETIF_F_HIGHDMA |NETIF_F_SOFT_FEATURES | NETIF_F_TSO |
@@ -13505,6 +13504,23 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)/* record features VLANs can make use of */ netdev->vlan_features |= hw_enc_features |NETIF_F_TSO_MANGLEID ; +#define I40E_GSO_PARTIAL_FEATURES (NETIF_F_GSO_GRE | \ + NETIF_F_GSO_GRE_CSUM | \ + NETIF_F_GSO_IPXIP4 | \ + NETIF_F_GSO_IPXIP6 | \ + NETIF_F_GSO_UDP_TUNNEL | \ + NETIF_F_GSO_UDP_TUNNEL_CSUM) + + netdev->gso_partial_features =I40E_GSO_PARTIAL_FEATURES ; + netdev->features |=NETIF_F_GSO_PARTIAL | +I40E_GSO_PARTIAL_FEATURES ; + + netdev->mpls_features |=NETIF_F_SG ; + netdev->mpls_features |=NETIF_F_HW_CSUM ; + netdev->mpls_features |=NETIF_F_TSO ; + netdev->mpls_features |=NETIF_F_TSO6 ; + netdev->mpls_features |=I40E_GSO_PARTIAL_FEATURES ; +/* enable macvlan offloads */ netdev->hw_features |=NETIF_F_HW_L2FW_DOFFLOAD ;
drivers/net/ethernet/intel/i40e/i40e_txrx.c +30 -17
109 lines not on this page · raw message
Signature · 1 line
2.7.4
G
PATCH v2 1/1 i40e: Add support for MPLS + TSO
Quoted 49 lines
-----Original Message-----
From: Joe Damato <[email protected]>
Sent: Thursday, March 3, 2022 6:59 AM
To: jdamato at fastly.com; Brandeburg, Jesse <[email protected]>; Nguyen, Anthony L <[email protected]>; Kubalewski, Arkadiusz <[email protected]>; kuba at kernel.org; intel-wired- lan at lists.osuosl.org
Cc: Mike Gallo <[email protected]>
Subject: [next-queue v2] i40e: Add support for MPLS + TSOThis change adds support for TSO of MPLS packets.
In my tests with tcpdump it seems to work. Note this test setup has a 9000 byte MTU:
MPLS (label 100, exp 0, [S], ttl 64) IP srcip.50086 > dstip.1234:
Flags [P.], seq 593345:644401, ack 0, win 420, options [nop,nop,TS val 45022534 ecr 1722291395], length 51056IP dstip.1234 > srcip.50086: Flags [.], ack 593345, win 122,
options [nop,nop,TS val 1722291395 ecr 45022534], length 0IP dstip.1234 > srcip.50086: Flags [.], ack 602289, win 105,
options [nop,nop,TS val 1722291395 ecr 45022534], length 0IP dstip.1234 > srcip.50086: Flags [.], ack 620177, win 71,
options [nop,nop,TS val 1722291395 ecr 45022534], length 0MPLS (label 100, exp 0, [S], ttl 64) IP srcip.50086 > dstip.1234:
Flags [P.], seq 644401:655953, ack 0, win 420, options [nop,nop,TS val 45022534 ecr 1722291395], length 11552IP dstip.1234 > srcip.50086: Flags [.], ack 638065, win 37,
options [nop,nop,TS val 1722291395 ecr 45022534], length 0IP dstip.1234 > srcip.50086: Flags [.], ack 644401, win 25,
options [nop,nop,TS val 1722291395 ecr 45022534], length 0IP dstip.1234 > srcip.50086: Flags [.], ack 653345, win 8,
options [nop,nop,TS val 1722291395 ecr 45022534], length 0IP dstip.1234 > srcip.50086: Flags [.], ack 655953, win 3,
options [nop,nop,TS val 1722291395 ecr 45022534], length 0v1 -> v2:
- Restore erroneously deleted code fromi40e_tso.
Quoted 9 lines
Signed-off-by Joe Damato <[email protected]>Co-developed-by Mike Gallo <[email protected]>Signed-off-by Mike Gallo <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_main.c | 20 ++++++++++-- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 47 ++++++++++++++++++----- ------ 2 files changed, 48 insertions(+), 19 deletions(-)