netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] macvlan: add offload features for encapsulation
@ 2017-08-16 21:34 Dimitris Michailidis
  2017-08-18 23:07 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Dimitris Michailidis @ 2017-08-16 21:34 UTC (permalink / raw)
  To: davem; +Cc: netdev

Currently macvlan devices do not set their hw_enc_features making
encapsulated Tx packets resort to SW fallbacks. Add encapsulation GSO
offloads to ->features as is done for the other GSOs and set
->hw_enc_features.

Signed-off-by: Dimitris Michailidis <dmichail@google.com>
---
 drivers/net/macvlan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index ca35c6ba7947..d2aea961e0f4 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -835,7 +835,7 @@ static struct lock_class_key macvlan_netdev_addr_lock_key;
 
 #define ALWAYS_ON_OFFLOADS \
 	(NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE | \
-	 NETIF_F_GSO_ROBUST)
+	 NETIF_F_GSO_ROBUST | NETIF_F_GSO_ENCAP_ALL)
 
 #define ALWAYS_ON_FEATURES (ALWAYS_ON_OFFLOADS | NETIF_F_LLTX)
 
@@ -874,6 +874,7 @@ static int macvlan_init(struct net_device *dev)
 	dev->hw_features	|= NETIF_F_LRO;
 	dev->vlan_features	= lowerdev->vlan_features & MACVLAN_FEATURES;
 	dev->vlan_features	|= ALWAYS_ON_OFFLOADS;
+	dev->hw_enc_features    |= dev->features;
 	dev->gso_max_size	= lowerdev->gso_max_size;
 	dev->gso_max_segs	= lowerdev->gso_max_segs;
 	dev->hard_header_len	= lowerdev->hard_header_len;
-- 
2.14.1.480.gb18f417b89-goog

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] macvlan: add offload features for encapsulation
  2017-08-16 21:34 [PATCH net-next] macvlan: add offload features for encapsulation Dimitris Michailidis
@ 2017-08-18 23:07 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-08-18 23:07 UTC (permalink / raw)
  To: dmichail; +Cc: netdev

From: Dimitris Michailidis <dmichail@google.com>
Date: Wed, 16 Aug 2017 14:34:46 -0700

> Currently macvlan devices do not set their hw_enc_features making
> encapsulated Tx packets resort to SW fallbacks. Add encapsulation GSO
> offloads to ->features as is done for the other GSOs and set
> ->hw_enc_features.
> 
> Signed-off-by: Dimitris Michailidis <dmichail@google.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-18 23:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-16 21:34 [PATCH net-next] macvlan: add offload features for encapsulation Dimitris Michailidis
2017-08-18 23:07 ` 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).