Date: Fri, 27 Apr 2012 16:04:00 -0700 From: YongHyeon PYUN <pyunyh@gmail.com> To: Andrey Zonov <andrey@zonov.org> Cc: freebsd-net@freebsd.org, davidch@freebsd.org Subject: Re: bce: jumbo not working since r218423 Message-ID: <20120427230400.GB17009@michelle.cdnetworks.com> In-Reply-To: <CANU_PUGwoLSrPcGE8wT=ga3-=F_n9qN4pPXMJC%2BH72wpS9Mfcw@mail.gmail.com> References: <CANU_PUGwoLSrPcGE8wT=ga3-=F_n9qN4pPXMJC%2BH72wpS9Mfcw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--9zSXsLTf0vkW971A Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Apr 26, 2012 at 03:23:19PM +0400, Andrey Zonov wrote: > Hi, > > I found that jumbo frames don't work after r218423 with bce driver. > This happens because controller doesn't do reinitialization when MTU > is changed. Attached patch solves this problem. > Could you verify whether attached diff addresses the issue? Sorry, I couldn't setup my box yet due to some other reasons so the diff was not tested. > I also don't understand why sysctl hw.bce.loose_rx_mtu doesn't respect > with tunnable hw.bce.strict_rx_mtu. Is there any reason to give them > different names? > It may be an oversight. Personally I don't see any reason except debugging purpose to limit RX frame size to interface MTU. It makes sense when controller send frames but it should be able to receive any sized RX frames(if controller allows it). Dropping RX frames that are bigger than interface MTU would break path MTU discovery of remote host that uses bigger MTU. --9zSXsLTf0vkW971A Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="bce.mtu.diff" Index: sys/dev/bce/if_bce.c =================================================================== --- sys/dev/bce/if_bce.c (revision 234725) +++ sys/dev/bce/if_bce.c (working copy) @@ -6842,6 +6842,8 @@ bcopy(IF_LLADDR(sc->bce_ifp), sc->eaddr, ETHER_ADDR_LEN); bce_set_mac_addr(sc); + if (bce_hdr_split == FALSE) + bce_get_rx_buffer_sizes(sc, ifp->if_mtu); /* * Calculate and program the hardware Ethernet MTU * size. Be generous on the receive if we have room @@ -7436,22 +7438,10 @@ BCE_LOCK(sc); ifp->if_mtu = ifr->ifr_mtu; - - if (bce_hdr_split == FALSE) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - /* - * Because allocation size is used in RX - * buffer allocation, stop controller if - * it is already running. - */ - bce_stop(sc); - } - - bce_get_rx_buffer_sizes(sc, ifp->if_mtu); - + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; bce_init_locked(sc); } - BCE_UNLOCK(sc); break; --9zSXsLTf0vkW971A--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120427230400.GB17009>