Blame SOURCES/0047-netdrv-net-mlx5e-Support-TSO-and-TX-checksum-offload.patch

d8f823
From 4570a8510cd01423160448fa0d0362c1b605d07f Mon Sep 17 00:00:00 2001
d8f823
From: Alaa Hleihel <ahleihel@redhat.com>
d8f823
Date: Sun, 10 May 2020 14:52:19 -0400
d8f823
Subject: [PATCH 047/312] [netdrv] net/mlx5e: Support TSO and TX checksum
d8f823
 offloads for IP-in-IP tunnels
d8f823
d8f823
Message-id: <20200510145245.10054-57-ahleihel@redhat.com>
d8f823
Patchwork-id: 306597
d8f823
Patchwork-instance: patchwork
d8f823
O-Subject: [RHEL8.3 BZ 1789378 v2 56/82] net/mlx5e: Support TSO and TX checksum offloads for IP-in-IP tunnels
d8f823
Bugzilla: 1789378
d8f823
RH-Acked-by: Kamal Heib <kheib@redhat.com>
d8f823
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
d8f823
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
d8f823
RH-Acked-by: Jonathan Toppins <jtoppins@redhat.com>
d8f823
d8f823
Bugzilla: http://bugzilla.redhat.com/1789378
d8f823
Upstream: v5.4-rc1
d8f823
d8f823
commit 25948b87dda284664edeb3b3dab689df0a7dc889
d8f823
Author: Marina Varshaver <marinav@mellanox.com>
d8f823
Date:   Tue Aug 20 04:59:11 2019 +0300
d8f823
d8f823
    net/mlx5e: Support TSO and TX checksum offloads for IP-in-IP
d8f823
    tunnels
d8f823
d8f823
    Add TX offloads support for IP-in-IP tunneled packets by reporting
d8f823
    the needed netdev features.
d8f823
d8f823
    Signed-off-by: Marina Varshaver <marinav@mellanox.com>
d8f823
    Signed-off-by: Avihu Hagag <avihuh@mellanox.com>
d8f823
    Reviewed-by: Aya Levin <ayal@mellanox.com>
d8f823
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
d8f823
d8f823
Signed-off-by: Alaa Hleihel <ahleihel@redhat.com>
d8f823
Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
d8f823
---
d8f823
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 11 +++++++++++
d8f823
 1 file changed, 11 insertions(+)
d8f823
d8f823
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
d8f823
index afe24002987d..7d9a526c6017 100644
d8f823
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
d8f823
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
d8f823
@@ -4225,6 +4225,8 @@ static netdev_features_t mlx5e_tunnel_features_check(struct mlx5e_priv *priv,
d8f823
 
d8f823
 	switch (proto) {
d8f823
 	case IPPROTO_GRE:
d8f823
+	case IPPROTO_IPIP:
d8f823
+	case IPPROTO_IPV6:
d8f823
 		return features;
d8f823
 	case IPPROTO_UDP:
d8f823
 		udph = udp_hdr(skb);
d8f823
@@ -4877,6 +4879,15 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev)
d8f823
 						NETIF_F_GSO_GRE_CSUM;
d8f823
 	}
d8f823
 
d8f823
+	if (mlx5e_tunnel_proto_supported(mdev, IPPROTO_IPIP)) {
d8f823
+		netdev->hw_features |= NETIF_F_GSO_IPXIP4 |
d8f823
+				       NETIF_F_GSO_IPXIP6;
d8f823
+		netdev->hw_enc_features |= NETIF_F_GSO_IPXIP4 |
d8f823
+					   NETIF_F_GSO_IPXIP6;
d8f823
+		netdev->gso_partial_features |= NETIF_F_GSO_IPXIP4 |
d8f823
+						NETIF_F_GSO_IPXIP6;
d8f823
+	}
d8f823
+
d8f823
 	netdev->hw_features	                 |= NETIF_F_GSO_PARTIAL;
d8f823
 	netdev->gso_partial_features             |= NETIF_F_GSO_UDP_L4;
d8f823
 	netdev->hw_features                      |= NETIF_F_GSO_UDP_L4;
d8f823
-- 
d8f823
2.13.6
d8f823