Subject: Re: [PATCH v2 1/2] net: Added mtu parameter to dev_forward_skb calls

From: Stephen Hemminger <[email-masked]>
Date: Thu, 11 May 2017 09:01:32 -0700

On Thu, 11 May 2017 15:46:27 +0200
Fredrik Markstrom <[email-masked]> wrote:

> From: Fredrik Markström <[email-masked]>
> 
> 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