From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932378AbdEKQCC (ORCPT ); Thu, 11 May 2017 12:02:02 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:32848 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757842AbdEKQB7 (ORCPT ); Thu, 11 May 2017 12:01:59 -0400 Date: Thu, 11 May 2017 09:01:32 -0700 From: Stephen Hemminger To: Fredrik Markstrom Cc: Eric Dumazet , "David S. Miller" , Alexei Starovoitov , Daniel Borkmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org Subject: Re: [PATCH v2 1/2] net: Added mtu parameter to dev_forward_skb calls Message-ID: <20170511090132.79fdbf12@xeon-e3> In-Reply-To: <20170511134629.139528-2-fredrik.markstrom@gmail.com> References: <20170511134629.139528-1-fredrik.markstrom@gmail.com> <20170511134629.139528-2-fredrik.markstrom@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v4BG2Cmr032299 On Thu, 11 May 2017 15:46:27 +0200 Fredrik Markstrom wrote: > From: Fredrik Markström > > is_skb_forwardable() currently checks if the packet size is <= mtu of > the receiving interface. This is not consistent with most of the hardware > ethernet drivers that happily receives packets larger then MTU. Wrong. Hardware interfaces are free to drop any packet greater than MTU (actually MTU + VLAN). The actual limit is a function of the hardware. Some hardware can only limit by power of 2; some can only limit frames larger than 1500; some have no limiting at all. Any application that should: * not expect packets larger than MTU to be received * not send packets larger than MTU * check actual receive size. IP protocols will do truncation of padded packets