Commit 25948b87 authored by Marina Varshaver's avatar Marina Varshaver Committed by Saeed Mahameed

net/mlx5e: Support TSO and TX checksum offloads for IP-in-IP

tunnels

Add TX offloads support for IP-in-IP tunneled packets by reporting
the needed netdev features.
Signed-off-by: default avatarMarina Varshaver <marinav@mellanox.com>
Signed-off-by: default avatarAvihu Hagag <avihuh@mellanox.com>
Reviewed-by: default avatarAya Levin <ayal@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent e3a53bc5
...@@ -4243,6 +4243,8 @@ static netdev_features_t mlx5e_tunnel_features_check(struct mlx5e_priv *priv, ...@@ -4243,6 +4243,8 @@ static netdev_features_t mlx5e_tunnel_features_check(struct mlx5e_priv *priv,
switch (proto) { switch (proto) {
case IPPROTO_GRE: case IPPROTO_GRE:
case IPPROTO_IPIP:
case IPPROTO_IPV6:
return features; return features;
case IPPROTO_UDP: case IPPROTO_UDP:
udph = udp_hdr(skb); udph = udp_hdr(skb);
...@@ -4903,6 +4905,15 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev) ...@@ -4903,6 +4905,15 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev)
NETIF_F_GSO_GRE_CSUM; NETIF_F_GSO_GRE_CSUM;
} }
if (mlx5e_tunnel_proto_supported(mdev, IPPROTO_IPIP)) {
netdev->hw_features |= NETIF_F_GSO_IPXIP4 |
NETIF_F_GSO_IPXIP6;
netdev->hw_enc_features |= NETIF_F_GSO_IPXIP4 |
NETIF_F_GSO_IPXIP6;
netdev->gso_partial_features |= NETIF_F_GSO_IPXIP4 |
NETIF_F_GSO_IPXIP6;
}
netdev->hw_features |= NETIF_F_GSO_PARTIAL; netdev->hw_features |= NETIF_F_GSO_PARTIAL;
netdev->gso_partial_features |= NETIF_F_GSO_UDP_L4; netdev->gso_partial_features |= NETIF_F_GSO_UDP_L4;
netdev->hw_features |= NETIF_F_GSO_UDP_L4; netdev->hw_features |= NETIF_F_GSO_UDP_L4;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment