On Thu, Jan 10, 2019 at 6:21 AM Andrew Lunn <and...@lunn.ch> wrote: > > On Thu, Jan 10, 2019 at 02:26:55PM +0100, Fredrik Gustavsson wrote: > > commit affede4a779420bd8510ab937251a3796d3228df > > Author: Fredrik Gustavsson <gustf...@gmail.com> > > Date: Tue Jan 8 11:21:39 2019 +0100 > > > > veth: Do not drop packets larger then the mtu set on the receiving side > > > > Currently veth drops all packets larger then the mtu set on the receiving > > end of the pair. This is inconsistent with most hardware ethernet drivers > > that happily receives packets up the the ethernet MTU independent of the > > configured MTU. > > I agree with your argument, but i wonder if there could be a better > implementation. > > ____dev_forward_skb() is on the hot path, so your additional check is > going to slow down packet forwarding for everybody, not just veth. > is_skb_forwardable() also does some additional checks which you are > now skipping. Is that O.K? > > Since we are talking about a veth pair here, you have access to both > ends of the link. Maybe consider if the mtu is changed on one end, you > also change it on the other? > > Lets see what others think of that. >
adding a IFF_VETH just for this seems like an overkill. especially when there are other ways to indicate a virtual device type like rtnetlink kind. Also, its best to keep such checks local to veth, maybe with something along the lines of what Andrew suggests above.