From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Marina Varshaver <marinav@mellanox.com>,
Avihu Hagag <avihuh@mellanox.com>, Aya Levin <ayal@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>
Subject: [net-next v2 8/8] net/mlx5e: Support TSO and TX checksum offloads for IP-in-IP tunnels
Date: Wed, 28 Aug 2019 18:57:55 +0000 [thread overview]
Message-ID: <20190828185720.2300-9-saeedm@mellanox.com> (raw)
In-Reply-To: <20190828185720.2300-1-saeedm@mellanox.com>
From: Marina Varshaver <marinav@mellanox.com>
Add TX offloads support for IP-in-IP tunneled packets by reporting
the needed netdev features.
Signed-off-by: Marina Varshaver <marinav@mellanox.com>
Signed-off-by: Avihu Hagag <avihuh@mellanox.com>
Reviewed-by: Aya Levin <ayal@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 327c90d936e9..9ff28e2d72cd 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -4243,6 +4243,8 @@ static netdev_features_t mlx5e_tunnel_features_check(struct mlx5e_priv *priv,
switch (proto) {
case IPPROTO_GRE:
+ case IPPROTO_IPIP:
+ case IPPROTO_IPV6:
return features;
case IPPROTO_UDP:
udph = udp_hdr(skb);
@@ -4903,6 +4905,15 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev)
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->gso_partial_features |= NETIF_F_GSO_UDP_L4;
netdev->hw_features |= NETIF_F_GSO_UDP_L4;
--
2.21.0
next prev parent reply other threads:[~2019-08-28 18:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-28 18:57 [pull request][net-next v2 0/8] Mellanox, mlx5 updates 2019-08-22 Saeed Mahameed
2019-08-28 18:57 ` [net-next v2 1/8] net/mlx5e: ethtool, Fix a typo in WOL function names Saeed Mahameed
2019-08-28 18:57 ` [net-next v2 2/8] net/mlx5e: Expose new function for TIS destroy loop Saeed Mahameed
2019-08-28 18:57 ` [net-next v2 3/8] net/mlx5e: Support LAG TX port affinity distribution Saeed Mahameed
2019-08-28 18:57 ` [net-next v2 4/8] net/mlx5e: Add device out of buffer counter Saeed Mahameed
2019-08-28 18:57 ` [net-next v2 5/8] net/mlx5e: Change function's position to a more fitting file Saeed Mahameed
2019-08-28 18:57 ` [net-next v2 6/8] net/mlx5e: Support RSS for IP-in-IP and IPv6 tunneled packets Saeed Mahameed
2019-08-28 18:57 ` [net-next v2 7/8] net/mlx5e: Improve stateless offload capability check Saeed Mahameed
2019-08-28 18:57 ` Saeed Mahameed [this message]
2019-08-29 0:19 ` [pull request][net-next v2 0/8] Mellanox, mlx5 updates 2019-08-22 Jakub Kicinski
2019-08-30 0:25 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190828185720.2300-9-saeedm@mellanox.com \
--to=saeedm@mellanox.com \
--cc=avihuh@mellanox.com \
--cc=ayal@mellanox.com \
--cc=davem@davemloft.net \
--cc=marinav@mellanox.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox