From owner-freebsd-net@FreeBSD.ORG Tue Apr 2 16:15:08 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CF4D8B76 for ; Tue, 2 Apr 2013 16:15:08 +0000 (UTC) (envelope-from ncrogers@gmail.com) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx1.freebsd.org (Postfix) with ESMTP id 90E98DD7 for ; Tue, 2 Apr 2013 16:15:08 +0000 (UTC) Received: by mail-ve0-f180.google.com with SMTP id c13so719291vea.11 for ; Tue, 02 Apr 2013 09:15:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=iNwVs70K4mkPmcNJqfxyUObQunk71/r8C87saBHmU9k=; b=D6xkXoB8XwKnqZnl/98BzZkYS5+a6kvpIaqlSxthqi+Fuw9EcRH43qPLaD3T2Pw7I4 X8eroL4Lejz+0Y3eYOarTkwrB/IqjLaHx3vwHyjvfucHTC/1V1DyM7BkGB852Dg/sB89 7pDsu8DodYyz/YiILVJyfaqvIjtlK7Oq23uNi8rMsNM2KHPNSv9zWB6OwTvg/FNjr0Dp Ea9cIsR5S51jG/dAQ6y3kSxqXR5ApEXnoN3+GubO55ENLdXTVEd+Clh6QTK9CXTXXITU AMRXZviaO4LwXQUS2uuhqB4nujtiWM5Qk1sNyX607zqnhaD6kLAAnX0FtnulVEm6Xq+a REsA== MIME-Version: 1.0 X-Received: by 10.220.103.7 with SMTP id i7mr13179990vco.7.1364919301843; Tue, 02 Apr 2013 09:15:01 -0700 (PDT) Received: by 10.52.176.131 with HTTP; Tue, 2 Apr 2013 09:15:01 -0700 (PDT) In-Reply-To: <515AE933.7020806@gmail.com> References: <1355177348.71087.YahooMailClassic@web121601.mail.ne1.yahoo.com> <50C6656E.3020601@gmail.com> <20121211075853.GU48639@FreeBSD.org> <5159AB72.1050202@gmail.com> <515ADACD.8010108@gmail.com> <515AE933.7020806@gmail.com> Date: Tue, 2 Apr 2013 09:15:01 -0700 Message-ID: Subject: Re: igb and ALTQ in 9.1-rc3 From: Nick Rogers To: Karim Fodil-Lemelin Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Apr 2013 16:15:08 -0000 On Tue, Apr 2, 2013 at 7:20 AM, Karim Fodil-Lemelin wrote: > Hi Nick, > > You need to set the ALTQF_READY flag inside the igb driver. Make sure you > have something like this in if_igb.c: > > ifp->if_start = igb_start; > IFQ_SET_MAXLEN(&ifp->if_snd, adapter->num_tx_desc - 1); > ifp->if_snd.ifq_drv_maxlen = adapter->num_tx_desc - 1; > IFQ_SET_READY(&ifp->if_snd); > > The call to IFQ_SET_READY() is what will enable ALTQ on your device. OK, thanks. As far as I can tell the call to IFQ_SET_READY is happening. If you look at this commit Jack made: http://svnweb.freebsd.org/base/head/sys/dev/e1000/if_igb.c?r1=248906&r2=248905&pathrev=248906 If IGB_LEGACY_TX is defined, then IFQ_SET_READY is called. In modules/igb/Makefile I have: +# IGB_LEGACY_TX will override the stack if_transmit path and +# instead use the older if_start non-multiqueue capable interface. +# This might be desireable for testing, or to enable the use of +# ALTQ. +CFLAGS += -DIGB_LEGACY_TX > > Regards, > > Karim. > > > On 02/04/2013 9:58 AM, Nick Rogers wrote: >> >> On Tuesday, April 2, 2013, Karim Fodil-Lemelin wrote: >> >>> Hi Nick, >>> >>> Can you verify that you have at least one of those options in your kernel >>> config file: >>> >>> ALTQ_CBQ >>> ALTQ_PRIQ >>> ALTQ_HFSC >> >> >> Yes I have hfsc included in the kernel. I have other machines using altq >> with em(4) interfaces and similar pf configurations on the same kernel >> that >> work fine. >> >> >>> Regards, >>> >>> Karim. >>> >>> On 01/04/2013 8:22 PM, Nick Rogers wrote: >>> >>> On Mon, Apr 1, 2013 at 8:44 AM, Karim Fodil-Lemelin >>> wrote: >>> >>> Hi Jack, >>> >>> I think this would help M. Rogers case as we have done something similar >>> here to circumvent the issue and it seems to work well. I would also add >>> that when using ALTQ we found it much more stable to set the number of >>> queues to 1: >>> >>> static int igb_num_queues = 1; >>> >>> Our approach consisted in keeping igb_start() defined and using >>> igb_mq_start_locked() inside it instead of igb_start_locked(). >>> >>> Regards, >>> >>> Karim. >>> >>> Thanks for the pointer. >>> >>> I've been working with Jack to get a fix for this in that downgrades >>> the stack to the older if_start/non-multiqueue interface. See the >>> following two commits he made to HEAD. >>> >>> http://svnweb.freebsd.org/**base/head/sys/dev/e1000/if_** >>> >>> igb.c?revision=248906&view=**markup >>> http://svnweb.freebsd.org/**base/head/sys/dev/e1000/if_** >>> >>> igb.h?revision=248908&view=**markup >>> >>> >>> I've applied these changes to latest 9.1-STABLE src and included the >>> IGB_LEGACY_TX in the e1000 Makefile. So far I am not having any luck >>> getting pfctl to think igb is supported. >>> >>> i.e. I am still getting the following when loading my PF config: >>> pfctl -f /etc/pf.conf >>> pfctl: igb0: driver does not support altq >>> >>> Can anyone comment on if the above referenced changes that Jack made >>> should be sufficient to get ALTQ working with igb? >>> >>> The error is coming from src/contrib/pf/pfctl/pfctl.c. There seems to >>> be a function that checks if the driver is supported or not but I >>> cannot figure out why the ioctl is not returning a device. >>> >>> Here is the device check code for reference: >>> >>> int >>> pfctl_add_altq(struct pfctl *pf, struct pf_altq *a) >>> { >>> if (altqsupport && >>> (loadopt & PFCTL_FLAG_ALTQ) != 0) { >>> memcpy(&pf->paltq->altq, a, sizeof(struct pf_altq)); >>> if ((pf->opts & PF_OPT_NOACTION) == 0) { >>> if (ioctl(pf->dev, DIOCADDALTQ, pf->paltq)) { >>> if (errno == ENXIO) >>> errx(1, "qtype not >>> configured"); >>> else if (errno == ENODEV) >>> errx(1, "%s: driver does not >>> support " >>> "altq", a->ifname); >>> else >>> err(1, "DIOCADDALTQ"); >>> } >>> } >>> pfaltq_store(&pf->paltq->altq)**; >>> >>> } >>> return (0); >>> } >>> >>> >>> >>> >>> >>> On 28/03/2013 7:16 PM, Jack Vogel wrote: >>> >>> Have been kept fairly busy with other matters, one thing I could do short >>> term is >>> change the defines in igb the way I did in the em driver so you could >>> still >>> define >>> the older if_start entry. Right now those are based on OS version and so >>> you will >>> automatically get if_transmit, but I could change it to be IGB_LEGACY_TX >>> or >>> so, >>> and that could be defined in the Makefile. >>> >>> Would this help? >>> >>> Jack >>> >>> >>> On Thu, Mar 28, 2013 at 2:31 PM, Nick Rogers wrote: >>> >>> On Tue, Dec 11, 2012 at 1:09 AM, Jack Vogel wrote: >>> >>> On Mon, Dec 10, 2012 at 11:58 PM, Gleb Smirnoff >>> >>> wrote: >>> >>> On Mon, Dec 10, 2012 at 03:31:19PM -0800, Jack Vogel wrote: >>> J> UH, maybe asking the owner of the driver would help :) >>> J> >>> J> ... and no, I've never been aware of doing anything to stop >>> >>> supporting >>> >>> >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > >