[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dc and hme drivers: no way to set MTU?
- To: Kim D <iNVAD3RKiM@flexcheck.net>
- Subject: Re: dc and hme drivers: no way to set MTU?
- From: Kurt Raschke <kurt@raschke.net>
- Date: Sun, 1 Jun 2003 16:21:15 -0400
- Cc: tech@openbsd.org
- Content-Disposition: inline
- References: <53EF5651DA7F35418B56C99A259723B528E293@mail.2.168.192.in-addr.arpa>
- User-Agent: Mutt/1.4i
On Sat, May 31, 2003 at 10:25:29PM -0400, Kim D wrote:
>
> >Different error, but same result...the MTU is still unchanged. Is
> >there anything else I can do lower an interface's MTU, or is it just a
> >problem in those drivers? If it is a problem in the drivers, can it
> >be resolved? Is a fix in the works?
> >
> >-Kurt
>
>
> /usr/src/sys/dev/ic/dc.c
>
>
> $ cat -b dc.c | grep MTU
> 1475 ifp->if_mtu = ETHERMTU;
> 1486 ifp->if_capabilities = IFCAP_VLAN_MTU;
>
> this took a lil digging, but i found the definition of ETHERMTU
>
> # pwd
> /usr/src/sys/netinet
>
> # cat -b if_ether.h | grep ETHERMTU
> 79 #define ETHERMTU (ETHER_MAX_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN)
>
> maybe try statically setting ifp->if_mtu = some_constant_number
>
> I know this is...not ideal, but if ifconfig doesn't let you change it then it's probably for a good reason. So, the only thing i know to do is set it statically, recompile it, and see what happens. Hopefully it doesn't hose up your system.
Thanks for the suggestion. I wonder if it might be possible to transplant the appropriate code
into dc_ioctl to handle SIOCSIFMTU...then ifconfig would permit
changing it. I have seen information suggesting that there are many
drivers without support for changing the MTU, and that there is no
reason why they can't be hacked to support it. So I'll try that and
see how it goes.
-Kurt