M. Warner Losh writes:

 > 
 > Well, this converstation needs to take place on the net@ list.  In
 > -current, at least, if_ethersubr.c prevents 'ethernet' drivers from
 > setting the mtu higher.  There's some experimental patches that make

It doesn't prevent anything.  It just sets the mtu to a default of
ETHER_MTU, which is what 98% of ethernet drivers want.  If you want
something higher (or lower) as your default, you just need to reset
the mtu after calling ether_ifattach().

For example, the following code at the bottom of my attach function
has worked fine for years..: (GM_IP_MTU is 9K on some firmware, 4K on
older firmware)

#if (__FreeBSD_version >= 500000)
  ether_ifattach (ifp, sc->is_addr);
#elif (__FreeBSD_version >= 410000)
  ether_ifattach (ifp, ETHER_BPF_SUPPORTED);
#else
  if_attach (ifp);
  ether_ifattach (ifp);
#endif
  /*ether_ifattach resets mtu */
  ifp->if_mtu = GM_IP_MTU;
  return 0;


Drew

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message

Reply via email to