On 2012/11/23 17:46, Christian Weisgerber wrote:
> Stuart Henderson <[email protected]> wrote:
> 
> > This adds an ioctl to retrieve if_hardmtu, and adds code to
> > display it via ifconfig hwfeatures.
> 
> I'm worried that our drivers don't set this or that the value doesn't
> accurately reflect the capabilities of chip/driver.

In some cases (especially 100Mb chips which support baby jumbos)
I know that they don't reflect the capability of the chip.

For ethernet devices, except in the case of oce(4), if the driver
doesn't set hardmtu, the mtu can't be raised above ETHER_MTU.
(in most cases this is checked in ether_subr.c; oce and ix have
their own check in the driver).

BTW my use cases for this are,

- showing the maximum size I can use on pfsync between
two directly-connected machines

- identifying interface types that I can use to run
tunnels/pppoe containing packets with 1500 MTU

It's possible to check driver source for this of course, but in
some cases like bge(4) it needs a bit of digging to work out
which chip family you have.

Reply via email to