* [net PATCH] mlx4e: Do not attempt to offload VXLAN ports that are unrecognized
@ 2016-06-15 21:42 Alexander Duyck
2016-06-16 15:09 ` Tariq Toukan
2016-06-16 21:25 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Alexander Duyck @ 2016-06-15 21:42 UTC (permalink / raw)
To: eugenia, netdev; +Cc: davem, alexander.duyck
The mlx4e driver does not support more than one port for VXLAN offload. As
such expecting the hardware to offload other ports is invalid since it
appears the parsing logic is used to perform Tx checksum and segmentation
offloads. Use the vxlan_port number to determine in which cases we can
apply the offload and in which cases we can not.
Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
---
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 973391bfe286..2221403b65e4 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -2447,9 +2447,14 @@ static netdev_features_t mlx4_en_features_check(struct sk_buff *skb,
* strip that feature if this is an IPv6 encapsulated frame.
*/
if (skb->encapsulation &&
- (skb->ip_summed == CHECKSUM_PARTIAL) &&
- (ip_hdr(skb)->version != 4))
- features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+ (skb->ip_summed == CHECKSUM_PARTIAL)) {
+ struct mlx4_en_priv *priv = netdev_priv(dev);
+
+ if (!priv->vxlan_port ||
+ (ip_hdr(skb)->version != 4) ||
+ (udp_hdr(skb)->dest != priv->vxlan_port))
+ features &= ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+ }
return features;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [net PATCH] mlx4e: Do not attempt to offload VXLAN ports that are unrecognized
2016-06-15 21:42 [net PATCH] mlx4e: Do not attempt to offload VXLAN ports that are unrecognized Alexander Duyck
@ 2016-06-16 15:09 ` Tariq Toukan
2016-06-16 21:25 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Tariq Toukan @ 2016-06-16 15:09 UTC (permalink / raw)
To: Alexander Duyck, eugenia, netdev; +Cc: davem, alexander.duyck
> The mlx4e driver does not support more than one port for VXLAN offload. As
> such expecting the hardware to offload other ports is invalid since it
> appears the parsing logic is used to perform Tx checksum and segmentation
> offloads. Use the vxlan_port number to determine in which cases we can
> apply the offload and in which cases we can not.
>
> Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Looks good to me. Thanks Alex!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [net PATCH] mlx4e: Do not attempt to offload VXLAN ports that are unrecognized
2016-06-15 21:42 [net PATCH] mlx4e: Do not attempt to offload VXLAN ports that are unrecognized Alexander Duyck
2016-06-16 15:09 ` Tariq Toukan
@ 2016-06-16 21:25 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-06-16 21:25 UTC (permalink / raw)
To: aduyck; +Cc: eugenia, netdev, alexander.duyck
From: Alexander Duyck <aduyck@mirantis.com>
Date: Wed, 15 Jun 2016 14:42:11 -0700
> The mlx4e driver does not support more than one port for VXLAN offload. As
> such expecting the hardware to offload other ports is invalid since it
> appears the parsing logic is used to perform Tx checksum and segmentation
> offloads. Use the vxlan_port number to determine in which cases we can
> apply the offload and in which cases we can not.
>
> Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-16 21:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-15 21:42 [net PATCH] mlx4e: Do not attempt to offload VXLAN ports that are unrecognized Alexander Duyck
2016-06-16 15:09 ` Tariq Toukan
2016-06-16 21:25 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).