* [PATCH] vlan: propagate gso_min_segs
@ 2016-03-23 1:35 Haishuang Yan
2016-03-23 2:33 ` Eric Dumazet
0 siblings, 1 reply; 4+ messages in thread
From: Haishuang Yan @ 2016-03-23 1:35 UTC (permalink / raw)
To: Patrick McHardy, David S. Miller, Nicolas Dichtel
Cc: netdev, linux-kernel, Haishuang Yan
vlan drivers lack proper propagation of gso_min_segs from lower device.
Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
---
drivers/net/ipvlan/ipvlan_main.c | 2 ++
drivers/net/macvlan.c | 1 +
net/8021q/vlan.c | 1 +
net/8021q/vlan_dev.c | 1 +
4 files changed, 5 insertions(+)
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
index 57941d3..72a2517 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -120,6 +120,7 @@ static int ipvlan_init(struct net_device *dev)
dev->features |= NETIF_F_LLTX;
dev->gso_max_size = phy_dev->gso_max_size;
dev->gso_max_segs = phy_dev->gso_max_segs;
+ dev->gso_min_segs = phy_dev->gso_min_segs;
dev->hard_header_len = phy_dev->hard_header_len;
ipvlan_set_lockdep_class(dev);
@@ -594,6 +595,7 @@ static int ipvlan_device_event(struct notifier_block *unused,
ipvlan->dev->features = dev->features & IPVLAN_FEATURES;
ipvlan->dev->gso_max_size = dev->gso_max_size;
ipvlan->dev->gso_max_segs = dev->gso_max_segs;
+ ipvlan->dev->gso_min_segs = dev->gso_min_segs;
netdev_features_change(ipvlan->dev);
}
break;
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 2bcf1f3..72991e9 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -1534,6 +1534,7 @@ static int macvlan_device_event(struct notifier_block *unused,
list_for_each_entry(vlan, &port->vlans, list) {
vlan->dev->gso_max_size = dev->gso_max_size;
vlan->dev->gso_max_segs = dev->gso_max_segs;
+ vlan->dev->gso_min_segs = dev->gso_min_segs;
netdev_update_features(vlan->dev);
}
break;
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index a1e273a..01a4de1 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -312,6 +312,7 @@ static void vlan_transfer_features(struct net_device *dev,
vlandev->gso_max_size = dev->gso_max_size;
vlandev->gso_max_segs = dev->gso_max_segs;
+ vlandev->gso_min_segs = dev->gso_min_segs;
if (vlan_hw_offload_capable(dev->features, vlan->vlan_proto))
vlandev->hard_header_len = dev->hard_header_len;
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index e7e6257..752263d 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -552,6 +552,7 @@ static int vlan_dev_init(struct net_device *dev)
NETIF_F_GSO_SOFTWARE;
dev->gso_max_size = real_dev->gso_max_size;
dev->gso_max_segs = real_dev->gso_max_segs;
+ dev->gso_min_segs = real_dev->gso_min_segs;
if (dev->features & NETIF_F_VLAN_FEATURES)
netdev_warn(real_dev, "VLAN features are set incorrectly. Q-in-Q configurations may not work correctly.\n");
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] vlan: propagate gso_min_segs
2016-03-23 1:35 [PATCH] vlan: propagate gso_min_segs Haishuang Yan
@ 2016-03-23 2:33 ` Eric Dumazet
2016-03-23 18:25 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2016-03-23 2:33 UTC (permalink / raw)
To: Haishuang Yan
Cc: Patrick McHardy, David S. Miller, Nicolas Dichtel, netdev,
linux-kernel
On Wed, 2016-03-23 at 09:35 +0800, Haishuang Yan wrote:
> vlan drivers lack proper propagation of gso_min_segs from lower device.
>
> Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
> ---
The plan was to get rid of gso_min_segs, as nothing uses it.
Otherwise I would have included this in my recent patches...
For such a rare 'issue' , we believe ndo_features_check() is better,
because it does not slow down the fast path.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] vlan: propagate gso_min_segs
2016-03-23 2:33 ` Eric Dumazet
@ 2016-03-23 18:25 ` David Miller
2016-03-23 18:34 ` Eric Dumazet
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2016-03-23 18:25 UTC (permalink / raw)
To: eric.dumazet; +Cc: yanhaishuang, kaber, nicolas.dichtel, netdev, linux-kernel
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 22 Mar 2016 19:33:52 -0700
> On Wed, 2016-03-23 at 09:35 +0800, Haishuang Yan wrote:
>> vlan drivers lack proper propagation of gso_min_segs from lower device.
>>
>> Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
>> ---
>
> The plan was to get rid of gso_min_segs, as nothing uses it.
>
> Otherwise I would have included this in my recent patches...
>
> For such a rare 'issue' , we believe ndo_features_check() is better,
> because it does not slow down the fast path.
I'm not aplpying this.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] vlan: propagate gso_min_segs
2016-03-23 18:25 ` David Miller
@ 2016-03-23 18:34 ` Eric Dumazet
0 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2016-03-23 18:34 UTC (permalink / raw)
To: David Miller; +Cc: yanhaishuang, kaber, nicolas.dichtel, netdev, linux-kernel
On Wed, 2016-03-23 at 14:25 -0400, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Tue, 22 Mar 2016 19:33:52 -0700
>
> > On Wed, 2016-03-23 at 09:35 +0800, Haishuang Yan wrote:
> >> vlan drivers lack proper propagation of gso_min_segs from lower device.
> >>
> >> Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
> >> ---
> >
> > The plan was to get rid of gso_min_segs, as nothing uses it.
> >
> > Otherwise I would have included this in my recent patches...
> >
> > For such a rare 'issue' , we believe ndo_features_check() is better,
> > because it does not slow down the fast path.
>
> I'm not aplpying this.
I am adding to my TODO list a revert, when net-next opens again.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-23 18:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-23 1:35 [PATCH] vlan: propagate gso_min_segs Haishuang Yan
2016-03-23 2:33 ` Eric Dumazet
2016-03-23 18:25 ` David Miller
2016-03-23 18:34 ` Eric Dumazet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox