From patchwork Fri May 12 15:40:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen-chien Jesse Sung X-Patchwork-Id: 761692 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3wPZ1F3m6Sz9s78; Sat, 13 May 2017 01:40:17 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1d9Cfr-0005rl-8a; Fri, 12 May 2017 15:40:11 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1d9Cfn-0005rL-9O for kernel-team@lists.ubuntu.com; Fri, 12 May 2017 15:40:07 +0000 Received: from 1.general.jesse.uk.vpn ([10.172.197.96] helo=cola.voip.idv.tw) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1d9Cfm-0002mE-GW; Fri, 12 May 2017 15:40:07 +0000 From: Wen-chien Jesse Sung To: kernel-team@lists.ubuntu.com Subject: [Zesty][PATCH] openvswitch: Set internal device max mtu to ETH_MAX_MTU. Date: Fri, 12 May 2017 23:40:03 +0800 Message-Id: <1494603603-28263-1-git-send-email-jesse.sung@canonical.com> X-Mailer: git-send-email 2.7.4 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: Jarno Rajahalme BugLink: https://launchpad.net/bugs/1679823 Commit 91572088e3fd ("net: use core MTU range checking in core net infra") changed the openvswitch internal device to use the core net infra for controlling the MTU range, but failed to actually set the max_mtu as described in the commit message, which now defaults to ETH_DATA_LEN. This patch fixes this by setting max_mtu to ETH_MAX_MTU after ether_setup() call. Fixes: 91572088e3fd ("net: use core MTU range checking in core net infra") Signed-off-by: Jarno Rajahalme Signed-off-by: David S. Miller (cherry picked from commit 425df17ce3a26d98f76e2b6b0af2acf4aeb0b026) Signed-off-by: Wen-chien Jesse Sung --- net/openvswitch/vport-internal_dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c index d5d6cae..695acd2 100644 --- a/net/openvswitch/vport-internal_dev.c +++ b/net/openvswitch/vport-internal_dev.c @@ -151,6 +151,8 @@ static void do_setup(struct net_device *netdev) { ether_setup(netdev); + netdev->max_mtu = ETH_MAX_MTU; + netdev->netdev_ops = &internal_dev_netdev_ops; netdev->priv_flags &= ~IFF_TX_SKB_SHARING;