Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753552AbcCWBf2 (ORCPT ); Tue, 22 Mar 2016 21:35:28 -0400 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:2415 "EHLO cmccmta2.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753431AbcCWBfX (ORCPT ); Tue, 22 Mar 2016 21:35:23 -0400 X-RM-TRANSID: 2ee856f1f2d2dfa-9e106 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee356f1f2d11de-ac3c6 From: Haishuang Yan To: Patrick McHardy , "David S. Miller" , Nicolas Dichtel Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Haishuang Yan Subject: [PATCH] vlan: propagate gso_min_segs Date: Wed, 23 Mar 2016 09:35:14 +0800 Message-Id: <1458696914-16088-1-git-send-email-yanhaishuang@cmss.chinamobile.com> X-Mailer: git-send-email 2.5.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2690 Lines: 70 vlan drivers lack proper propagation of gso_min_segs from lower device. Signed-off-by: Haishuang Yan --- 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