Skip to contentSkip to conversation

ipvlan: set hw_enc_features like macvlan

PATCH Applied Bill Sommerfeld 3 participants 3 messages Aug 15, 2019 – Aug 16, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipvlan: set hw_enc_features like macvlan

Allow encapsulated packets sent to tunnels layered over ipvlan to use offloads rather than forcing SW fallbacks.

Since commit f21e5077010acda73a60 ("macvlan: add offload features for encapsulation"), macvlan has set dev->hw_enc_features to include everything in dev->features; do likewise in ipvlan.

---
 drivers/net/ipvlan/ipvlan_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ipvlan/ipvlan_main.c +1 -0
index 1c96bed5a7c4..887bbba4631e 100644
@@ -126,6 +126,7 @@ static int ipvlan_init(struct net_device *dev)
 		     (phy_dev->state & IPVLAN_STATE_MASK);
 	dev->features = phy_dev->features & IPVLAN_FEATURES;
 	dev->features |= NETIF_F_LLTX | NETIF_F_VLAN_CHALLENGED;
+	dev->hw_enc_features |= dev->features;
 	dev->gso_max_size = phy_dev->gso_max_size;
 	dev->gso_max_segs = phy_dev->gso_max_segs;
 	dev->hard_header_len = phy_dev->hard_header_len;
Signature · 1 line
2.23.0.rc1.153.gdeed80330f-goog
#1 lore raw
Quoted 8 lines · Bill Sommerfeld

Allow encapsulated packets sent to tunnels layered over ipvlan to use offloads rather than forcing SW fallbacks.

Since commit f21e5077010acda73a60 ("macvlan: add offload features for encapsulation"), macvlan has set dev->hw_enc_features to include everything in dev->features; do likewise in ipvlan.

Thanks Bill

Quoted 1 line
Quoted 19 lines
---
 drivers/net/ipvlan/ipvlan_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ipvlan/ipvlan_main.c +1 -1
index 1c96bed5a7c4..887bbba4631e 100644
@@ -126,6 +126,7 @@ static int ipvlan_init(struct net_device *dev)
                     (phy_dev->state & IPVLAN_STATE_MASK);
        dev->features = phy_dev->features & IPVLAN_FEATURES;
        dev->features |= NETIF_F_LLTX | NETIF_F_VLAN_CHALLENGED;
+       dev->hw_enc_features |= dev->features;
        dev->gso_max_size = phy_dev->gso_max_size;
        dev->gso_max_segs = phy_dev->gso_max_segs;
        dev->hard_header_len = phy_dev->hard_header_len;
--

2.23.0.rc1.153.gdeed80330f-goog

maintainer Applied
#2 lore raw
In reply to Bill Sommerfeld

From: Bill Sommerfeld <[email protected]>
Date: Wed, 14 Aug 2019 17:10:43 -0700

Quoted 8 lines

Allow encapsulated packets sent to tunnels layered over ipvlan to use offloads rather than forcing SW fallbacks.

Since commit f21e5077010acda73a60 ("macvlan: add offload features for encapsulation"), macvlan has set dev->hw_enc_features to include everything in dev->features; do likewise in ipvlan.

Applied to net-next.