nfe support for jumbo frame

Huang, Yusheng yusheng.huang at bluecoat.com
Mon Jan 24 17:16:51 UTC 2011


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?

-yusheng


More information about the freebsd-net mailing list