Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3061218ybn; Fri, 27 Sep 2019 00:01:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxD0veYAiX9E/9hS65inRtCJwEUxU1xfrn9LxGvUZhTbxEzZdmkn2mG7U6TtTGq9oOZkjJV X-Received: by 2002:aa7:d508:: with SMTP id y8mr2770485edq.171.1569567665978; Fri, 27 Sep 2019 00:01:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569567665; cv=none; d=google.com; s=arc-20160816; b=GCblake7dlTRnGxYgDVdEf9u0aWN6Rs5XaqSSfpexxRbekIQ4SdgIpUXZwgcehr9qJ 6Ix+swA0DT6O88mXoUCjwG2y9pgmrkTZt6ljQuL+ZdGgu3MLQxA46/pmBgS0us3zeGIs tY3l1o49Zgmz+AI0Irk3HAdPjgmJ6HPgpqNffCi9yv/8nZeMLMEOw0qOn/zTFO9/Nlta ryLyo9EO8DDDJuXszMWoCprNxykZ+xL42y0dIrw8S3c4yAkQZCHcBaIFUUqJFzOzaKjj se8pJq0OAYKyLoaY8Q/TFYuucGXsAPx+PeYrivaW87AYZPg+YlvB6ae2u/xWLjZJLvNg vP0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=pEYOfcXq1NBlPFYujBxSxPegn8191xDa0BOKOCnNRyY=; b=ILE3SbKmMGsr5f8vyUE42gcbf9AWS0VV6INld216SSXKDcBgbUm/qQzuYVIynjbGLo RvFa7fvw+6RyBl/D7PJ+cGPYOr+jbK9XlgTXmh6GOzhuSnnhGdOWBRz5NAv9sZ0NpdRJ 6tW69eYkHrZzwhjWWUG/J8OiLOh+mjBcbn1IwhNrtvAs8kmUDdGk+DdzXq6G10xfEEen pI7pKgwEqdCIHQfm/R470cKdV4t64LTcDbR8huyW2ZXdmwUUpAv8QqzuntSWL1WP64gq asZEAI7zBEglLfkaUXHAz3g8a63TIhVgql7RTWvjrewYixxBFnuzhpn7/LIplxyBIDKN uu9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l26si1012035edb.258.2019.09.27.00.00.41; Fri, 27 Sep 2019 00:01:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726203AbfI0G6k (ORCPT + 99 others); Fri, 27 Sep 2019 02:58:40 -0400 Received: from cmccmta3.chinamobile.com ([221.176.66.81]:2978 "EHLO cmccmta3.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725804AbfI0G6j (ORCPT ); Fri, 27 Sep 2019 02:58:39 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.1]) by rmmx-syy-dmz-app09-12009 (RichMail) with SMTP id 2ee95d8db31394c-3d6ea; Fri, 27 Sep 2019 14:58:27 +0800 (CST) X-RM-TRANSID: 2ee95d8db31394c-3d6ea X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost (unknown[223.105.0.241]) by rmsmtp-syy-appsvr01-12001 (RichMail) with SMTP id 2ee15d8db3129b4-a04e8; Fri, 27 Sep 2019 14:58:27 +0800 (CST) X-RM-TRANSID: 2ee15d8db3129b4-a04e8 From: Haishuang Yan To: "David S. Miller" Cc: William Tu , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Haishuang Yan Subject: [PATCH] erspan: remove the incorrect mtu limit for erspan Date: Fri, 27 Sep 2019 14:58:20 +0800 Message-Id: <1569567500-20113-1-git-send-email-yanhaishuang@cmss.chinamobile.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org erspan driver calls ether_setup(), after commit 61e84623ace3 ("net: centralize net_device min/max MTU checking"), the range of mtu is [min_mtu, max_mtu], which is [68, 1500] by default. It causes the dev mtu of the erspan device to not be greater than 1500, this limit value is not correct for ipgre tap device. Tested: Before patch: # ip link set erspan0 mtu 1600 Error: mtu greater than device maximum. After patch: # ip link set erspan0 mtu 1600 # ip -d link show erspan0 21: erspan0@NONE: mtu 1600 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 0 Fixes: 61e84623ace3 ("net: centralize net_device min/max MTU checking") Signed-off-by: Haishuang Yan --- net/ipv4/ip_gre.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index a53a543..52690bb 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -1446,6 +1446,7 @@ static void erspan_setup(struct net_device *dev) struct ip_tunnel *t = netdev_priv(dev); ether_setup(dev); + dev->max_mtu = 0; dev->netdev_ops = &erspan_netdev_ops; dev->priv_flags &= ~IFF_TX_SKB_SHARING; dev->priv_flags |= IFF_LIVE_ADDR_CHANGE; -- 1.8.3.1