Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp189772ybp; Thu, 3 Oct 2019 12:05:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/NcwFDWNYjY5vnuaPbTDr+u1PdfzXAhLwQFLTTFlIaOa1XhYeTe5x7wATLuNJxpJN4tAu X-Received: by 2002:a17:907:2042:: with SMTP id pg2mr7554804ejb.97.1570129510055; Thu, 03 Oct 2019 12:05:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570129510; cv=none; d=google.com; s=arc-20160816; b=nMAiyVTWWXsYNmHZwjinsE5FwDB3R5QmuQbyfJDAuIzKlbNZvFvZ9mc7xnhhyyXuey K3HUNs165gDULKtUe8iXC1p6/66gZpeoXgbQpoT9SYJFc0imB/G47TKIRq9elbSZPWbj VnRwC3iWl8avE4bT/E/GqczPUxuNnF1SyjFF0EYTDEwYxa9LaELR+r9Zo7uk0RWMfh2g /MppcflqCprzp1Jp2Qs9BmV4Y92652OGlM0RfErzXfygbd9iE9ygxH8mTyWCqXUomxKF PS3ygqDxg+audbxTjyhOoXOkilSvPweXahgfr+YN6LHwQcBumW/aM8yPE/51UmYNBGLR h1ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xVOsopYF/M0SJfUpw8uzTPzjhSyoEQWnL9exPjNMiDw=; b=xQRPa7EI8/EYaGmR0bXlLJqovg9baBtC4UPX3bvVmTw1mKA6nCX8i8IFWT1bJFxfgs nO9Au8hhExQlQtE8jtvAz3ne8YZqzfInu7feaFeqzBOD7AL0NQFVkhGBq3CvVS5NLHq3 reT3yN23TRdqfOZbFe/YPXCDueX1PY0s+6VdlDmkZvKThyyO6JQm7kP4RGDWAmOI2KyO MxWXOjM7rQHX4dEN8f4zDYZ2vMer57vffL4yx+GhW0cE+zXUzWRikHo12yn2DTY2JmeF j4BaF4jKu8cCiLPSDDMNzTWnSlPRCnzW6t17U/YG7yPUE7vjo95s0+qT91gtWEbSAIo3 vD1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XLaFwylB; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12si2082053edc.279.2019.10.03.12.04.45; Thu, 03 Oct 2019 12:05:10 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XLaFwylB; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388620AbfJCSaD (ORCPT + 99 others); Thu, 3 Oct 2019 14:30:03 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:40420 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729199AbfJCSaD (ORCPT ); Thu, 3 Oct 2019 14:30:03 -0400 Received: by mail-qk1-f195.google.com with SMTP id y144so3351788qkb.7; Thu, 03 Oct 2019 11:30:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xVOsopYF/M0SJfUpw8uzTPzjhSyoEQWnL9exPjNMiDw=; b=XLaFwylBl/MAH8vjX4IguuG9kZGDMB4N9fOgEQVAXLrT9Xl7fgwOUB+B+2EpzsmsNT H1bIyY1OITdXl4uaQu03SpChBfJJx5T3yuG19pFhuy3xPpcUqC95xmYRzCkHTsWl3dK6 h68au5Ur+XNlpF9Knu+RH+2tzlt2LlOzOfpc76FZ6f7Q5UTDFre69380BcfqiOYTsW3h PDsPPL+BK4cmutWjd+O/Gd09cAFap6SgcJKOKVuO9F1tpP2VApBEMBJs36c66OBXZdKO tDrvfM7jh0//NjI4vuy/l8dnX8bxtz0NZV5IS9O22fN6NKrrJwbZjdqGFENbNJgLc3ix jmDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xVOsopYF/M0SJfUpw8uzTPzjhSyoEQWnL9exPjNMiDw=; b=LrtGotheP4m5PS3g8wL+W/0dMWY/g4yBeP9Lu462hNJif6D9vQsZs0EnYNTDFp24S7 wFb/7bIdknFlmaLUt6W8/bAgrZ6O/Dx6yZAkd1UcJADdn+A1DllzZjQG9TUS3XLUHwnS dXBXST7xJQeit0xVniDObjbx/Wk/UPgSDSBFsUDdh2/sf446YH59+1rDDwX0Zhx3dwss ALcj7+0YqP98dDcestCdrAvDF0Jn2RD+u71c4IFNBvn2KF+0I0xezKwUuPpj3SW7OwwX g+0Vnc3S7XRFgWWVy9YJoG+1yDOqliz8yAllisJk4RV3JQU5lDE81y+LKtSCu3Yo0L9N OrHw== X-Gm-Message-State: APjAAAVuvTf7uB4lGHWLsCUfU2rkrSwz+/KoU6JiQhU3VoD4bnz4TgoS ZGgyJ28ajgEKPDF6tI4ikx4KEq/wh+YEIHIsSb8= X-Received: by 2002:a37:a586:: with SMTP id o128mr5829769qke.147.1570127401853; Thu, 03 Oct 2019 11:30:01 -0700 (PDT) MIME-Version: 1.0 References: <1569567500-20113-1-git-send-email-yanhaishuang@cmss.chinamobile.com> In-Reply-To: <1569567500-20113-1-git-send-email-yanhaishuang@cmss.chinamobile.com> From: William Tu Date: Thu, 3 Oct 2019 11:29:24 -0700 Message-ID: Subject: Re: [PATCH] erspan: remove the incorrect mtu limit for erspan To: Haishuang Yan Cc: "David S. Miller" , Linux Kernel Network Developers , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 26, 2019 at 11:59 PM Haishuang Yan wrote: > > 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 > --- Thanks for the patch! Acked-by: William Tu > 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 > > >