From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v2 1/2] net: Added mtu parameter to dev_forward_skb calls Date: Thu, 11 May 2017 12:44:54 -0700 Message-ID: <20170511124454.473dd56e@xeon-e3> References: <20170511134629.139528-1-fredrik.markstrom@gmail.com> <20170511134629.139528-2-fredrik.markstrom@gmail.com> <20170511090132.79fdbf12@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Eric Dumazet , Daniel Borkmann , netdev@vger.kernel.org, bridge@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Alexei Starovoitov , "David S. Miller" To: Fredrik =?UTF-8?B?TWFya3N0csO2bQ==?= Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: bridge-bounces@lists.linux-foundation.org Errors-To: bridge-bounces@lists.linux-foundation.org List-Id: netdev.vger.kernel.org On Thu, 11 May 2017 21:10:11 +0200 Fredrik Markstr=C3=B6m wrote: > On Thu, May 11, 2017 at 6:01 PM, Stephen Hemminger > wrote: > > On Thu, 11 May 2017 15:46:27 +0200 > > Fredrik Markstrom wrote: > > =20 > >> From: Fredrik Markstr=C3=B6m > >> > >> is_skb_forwardable() currently checks if the packet size is <=3D mtu of > >> the receiving interface. This is not consistent with most of the hardw= are > >> ethernet drivers that happily receives packets larger then MTU. =20 > > > > Wrong. =20 >=20 > What is "Wrong" ? I was initially skeptical to implement this patch, > since it feels odd to have different MTU:s set on the two sides of a > link. After consulting some IP people and the RFC:s I kind of changed > my mind and thought I'd give it a shot. In the RFCs I couldn't find > anything that defined when and when not a received packet should be > dropped. >=20 > > > > Hardware interfaces are free to drop any packet greater than MTU (actua= lly 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 l= imiting at all. =20 >=20 > Agreed. The purpose of these patches is to be able to configure an > veth interface to mimic these different behaviors. Non of the Ethernet > interfaces I have access to drops packets due to them being larger > then the configured MTU like veth does. >=20 > Being able to mimic real Ethernet hardware is useful when > consolidating hardware using containers/namespaces. >=20 > In a reply to a comment from David Miller in my previous version of > the patch I attached the example below to demonstrate the case in > detail. >=20 > This works with all ethernet hardware setups I have access to: >=20 Why not just use an iptables rule to enforce what ever semantic you want?