From owner-freebsd-net@FreeBSD.ORG Mon Jan 24 18:25:39 2011 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95D5C106564A for ; Mon, 24 Jan 2011 18:25:39 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 454CB8FC13 for ; Mon, 24 Jan 2011 18:25:38 +0000 (UTC) Received: by vws9 with SMTP id 9so1907448vws.13 for ; Mon, 24 Jan 2011 10:25:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:date:to:cc:subject:message-id:reply-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=ihiSkKTQ6Bu7CdvNGO4CEd51Q10sHEChc9kOc6tf9kE=; b=WRzzcbcMk4y74n+/SLhupKFN/kUaw2Tx9HTiw1d/26khkwHVQxM/lRdzBTym5tKnSR 7mxQtZ4c0IhaMhsJFio/H7Cm1Brm0+PcJcGPWGDwpCJ8uLpZXh1HFmJJ/UNOKRR8eUpl e8AnTehhtY0atXJQTq/LsId4laNFz4U4DMk+M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=ey4f0ZmoxUIp/YCU0v/hIrHQlq2+o8ymAmsHAzs6M8+s7LP8HthN4a47fNfJDC6JPI r6g2BgSp2RNSpy3xYL+koBlpYsrMDD9aSEbq2Rb719k4PLaJawu3/NpJkH+sn4unjMWc Yk1KLh08Ft6E+BGnhz+AjURzlOnoxZ+zQ9MCQ= Received: by 10.220.190.3 with SMTP id dg3mr1217308vcb.254.1295891707375; Mon, 24 Jan 2011 09:55:07 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id f17sm7950552vbv.6.2011.01.24.09.55.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 24 Jan 2011 09:55:05 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 24 Jan 2011 09:55:02 -0800 From: Pyun YongHyeon Date: Mon, 24 Jan 2011 09:55:02 -0800 To: "Huang, Yusheng" Message-ID: <20110124175502.GA5830@michelle.cdnetworks.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: net@freebsd.org Subject: Re: nfe support for jumbo frame X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jan 2011 18:25:39 -0000 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!