From patchwork Thu Mar 22 22:07:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 889681 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="doc1zjW2"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 406gt40ZNHz9s0y for ; Fri, 23 Mar 2018 09:13:32 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id E008CF32; Thu, 22 Mar 2018 22:08:12 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id C8EECEF2 for ; Thu, 22 Mar 2018 22:08:06 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 870455E1 for ; Thu, 22 Mar 2018 22:08:06 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id f10so3651037pgs.9 for ; Thu, 22 Mar 2018 15:08:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AufApuBB0WfX3SAnyQuxVEEWcyC/M4Uw2H8Z210vWBY=; b=doc1zjW2xCGR4q738L3L5ccDs9ktl4KJU4k4FrwGHPRue8hLoxXWfOU6qSnzxOJmMG zVJ98WESMgqyyZNG+S9gDZVClTAiFF2DnAyF9uKCnFt90onFX63rc50SoMS7JM3TcaUv vAXKwyJF2s5T7qXUBHQweprEsGwuehyUp/+S9ChJ+k83M2w2A+6ITEUnVbnCiZoYYROk FfCntRSoEPFhM6o/+gfjzXQnKUXLo3hTQ5alaR/mWVjSYdS/ZShkGLghgWL5bbCH+Pxc pGSRyWV9tQYqeioZpeJ9xPhPSAwaa47eSG5kmsHpiFf4d1WUtB9Yt96lqW9sVYxdrnXY yvKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AufApuBB0WfX3SAnyQuxVEEWcyC/M4Uw2H8Z210vWBY=; b=qG6IaqP7XoCCvxQDvTgiYTYKf+p2MsAYGk1781z9i73VkfGBOYC8LGllgr8yVCUsBJ s/g8OsuqgISccNYMTleXHPOZT3ZeLvFxYhQsfFrmLl7QM4PQXaR6U37iK1eq04KxFCRP Nu+fnD30viwvV/x9pxBc9A6IRsNs/3zyKfuIoOUfz0+GYptI8/WYZ7E6/GhNnCouIxM8 LwkFtqxHpRrI7qXgCUkY7xF6n4EYVQMSA9ZGSCg0vUadytC1TTMF/Wm9LEh23tM8Ts/Q KeEsUsrP08gFbrl54BaZ1LNqjKniV2IpZWM9SAR7/xKnljA+qJYvAgCuoOWBh55cs5ea Fmsg== X-Gm-Message-State: AElRT7E+s3w7ATeutpkIHIQKuIJzoxF1Z2644erxPrY4s488qEv3oVZ8 nKkK9UTgpf3x44yZi65ULC33pA== X-Google-Smtp-Source: AG47ELsFUoBzpcpMb35fRvGPqk2MOUu8rEAkA9tSoACx3kIrXi/chOfDWss8bDDoh+n6c2w6lIq2Vw== X-Received: by 10.99.171.72 with SMTP id k8mr19510182pgp.355.1521756485719; Thu, 22 Mar 2018 15:08:05 -0700 (PDT) Received: from gizo.domain (184-100-240-187.ptld.qwest.net. [184.100.240.187]) by smtp.gmail.com with ESMTPSA id 4sm2280775pfn.32.2018.03.22.15.08.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Mar 2018 15:08:04 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Thu, 22 Mar 2018 15:07:29 -0700 Message-Id: <1521756461-3870-14-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1521756461-3870-1-git-send-email-gvrose8192@gmail.com> References: <1521756461-3870-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Xin Long Subject: [ovs-dev] [ERSPAN RFC 13/25] ip_gre: remove the incorrect mtu limit for ipgre tap X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Xin Long Upstream commit: commit cfddd4c33c254954927942599d299b3865743146 Author: Xin Long Date: Mon Dec 18 14:24:35 2017 +0800 ip_gre: remove the incorrect mtu limit for ipgre tap ipgre tap 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 ipgre tap device to not be greater than 1500, this limit value is not correct for ipgre tap device. Besides, it's .change_mtu already does the right check. So this patch is just to set max_mtu as 0, and leave the check to it's .change_mtu. Fixes: 61e84623ace3 ("net: centralize net_device min/max MTU checking") Reported-by: Jianlin Shi Signed-off-by: Xin Long Signed-off-by: David S. Miller Cc: Xin Long Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 9863dd7..7cd35a3 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/linux/compat/ip_gre.c @@ -290,11 +290,11 @@ static int gre_rcv(struct sk_buff *skb, const struct tnl_ptk_info *unused_tpi) if (unlikely(tpi.proto == htons(ETH_P_ERSPAN))) { if (erspan_rcv(skb, &tpi, hdr_len) == PACKET_RCVD) return 0; + goto drop; } if (ipgre_rcv(skb, &tpi) == PACKET_RCVD) return 0; - drop: kfree_skb(skb); @@ -867,6 +867,7 @@ static const struct net_device_ops erspan_netdev_ops = { static void ipgre_tap_setup(struct net_device *dev) { ether_setup(dev); + dev->max_mtu = 0; dev->netdev_ops = &gre_tap_netdev_ops; dev->priv_flags |= IFF_LIVE_ADDR_CHANGE; ip_tunnel_setup(dev, gre_tap_net_id);