Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jan 2011 09:55:02 -0800
From:      Pyun YongHyeon <pyunyh@gmail.com>
To:        "Huang, Yusheng" <yusheng.huang@bluecoat.com>
Cc:        net@freebsd.org
Subject:   Re: nfe support for jumbo frame
Message-ID:  <20110124175502.GA5830@michelle.cdnetworks.com>
In-Reply-To: <B583FBF374231F4A89607B4D08578A4308BA3C86@bcs-mail03.internal.cacheflow.com>
References:  <B583FBF374231F4A89607B4D08578A4308BA3C86@bcs-mail03.internal.cacheflow.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 24, 2011 at 09:05:48AM -0800, Huang, Yusheng wrote:
> Hi all,
> 
> We have ported nfe driver to our product and when we try to set mtu to 9000 on nfe interface, it does not work. No jumbo frame buffer were allocated. Looking at the code, we found the following:
> 
> In nfe_ioctl:
> 
> 	else {
> 		NFE_LOCK(sc);
> 		ifp->if_mtu = ifr->ifr_mtu;
> 		if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) ==> if IFF_DRV_RUNNING is set, call nfe_init_locked
> 			nfe_init_locked(sc);
> 		NFE_UNLOCK(sc);
> 	}
> However, in nfe_init_locked, it has the following test:
> 
> 
> 	NFE_LOCK_ASSERT(sc);
> 
> 	mii = device_get_softc(sc->nfe_miibus);
> 
> 	if (ifp->if_drv_flags & IFF_DRV_RUNNING) ==> if IFF_DRV_RUNNING is set, return
> 
> 		return;
> 
> 	nfe_stop(ifp);
> 
> 	sc->nfe_framesize = ifp->if_mtu + NFE_RX_HEADERS;
> 
> So it ends up doing nothing.
> 
> Is there something we missed totally on changing the mtu?
> 

No you're right. Fixed in HEAD(r217794).
Thanks for reporting!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110124175502.GA5830>