Thread (10 messages) 10 messages, 4 authors, 2020-01-07

Re: [PATCH v2 net-next 3/4] ionic: restrict received packets to mtu size

From: Vladimir Oltean <olteanv@gmail.com>
Date: 2020-01-07 21:30:23

Hi Andrew,

On Tue, 7 Jan 2020 at 21:46, Andrew Lunn [off-list ref] wrote:
quoted
Hi Andrew,
Hi Shannon
quoted
In my experience the driver typically tells the NIC about the current
max_frame size (e.g. MTU + ETH_HLEN), the NIC only copies max_frame bytes,
and the NIC returns an error indication on a packets that had more than
max_frame.
Having played around with a few different NICs for DSA, it seems more
like 75% don't care about the 'MRU' and will happily accept bigger
frames.

Anyway, it does not hurt to drop received frames bigger than what you
can transmit.
In the general case, would we want a knob in Linux for the MRU, or is
it ok to go ahead with patches such as this one, and e.g. set up port
policers for limiting the frame length at the value of the MTU?
Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
-Vladimir
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help