From nobody@FreeBSD.org  Mon Jan 20 13:34:53 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 2217AAA1
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 20 Jan 2014 13:34:53 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 0EA4F109B
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 20 Jan 2014 13:34:53 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id s0KDYq0K021141
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 20 Jan 2014 13:34:52 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id s0KDYq7Z021140;
	Mon, 20 Jan 2014 13:34:52 GMT
	(envelope-from nobody)
Message-Id: <201401201334.s0KDYq7Z021140@oldred.freebsd.org>
Date: Mon, 20 Jan 2014 13:34:52 GMT
From: Aurelien Rougemont <beorn@binaries.fr>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ALTQ activation problem
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         185909
>Category:       kern
>Synopsis:       [altq] [patch] ALTQ activation problem
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    glebius
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 20 13:40:00 UTC 2014
>Closed-Date:    Tue Mar 11 15:17:20 UTC 2014
>Last-Modified:  Tue Mar 11 15:20:01 UTC 2014
>Originator:     Aurelien Rougemont
>Release:        freebsd10 svn://svn0.eu.freebsd.org/base/stable/10  r260830
>Organization:
>Environment:
FreeBSD syklone2.colorz.lan 10.0-PRERELEASE FreeBSD 10.0-PRERELEASE #1 r260504: Fri Jan 10 12:45:34 UTC 2014     root@syklone2.colorz.lan:/usr/obj/usr/src/sys/COLORZ  amd64

>Description:
I am trying to build a kernel and its klm with ALTQ support.

I did build an amd64 kernel with the good options (cf how to repeat the problem for the exact configuration). The kernel is booting up but pfctl -f /etc/pf.conf reports : 

  # pfctl -f /etc/pf.conf
  pfctl: igb0: driver does not support altq


I dug a bit in the driver code and found this written in the /usr/src/sys/modules/igb/Makefile :

  # 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

I Did try to build the kernel with this CFLAG (at the make.conf level, then modifiying the Makefile just in case).

The build failed with this :


>How-To-Repeat:
Create a kernelconfig like this :

  include GENERIC
  ident COLORZ
  
  options         ALTQ
  options         ALTQ_CBQ        # Class Based Queuing (CBQ)
  options         ALTQ_RED        # Random Early Detection (RED)
  options         ALTQ_RIO        # RED In/Out
  options         ALTQ_HFSC       # Hierarchical Packet Scheduler (HFSC)
  options         ALTQ_PRIQ       # Priority Queuing (PRIQ)
  options         ALTQ_NOPCC      # Required for SMP build

and buildkernel gives :

  # make -s -j5 buildkernel

  [...]
  /usr/src/sys/modules/igb/../../dev/e1000/if_igb.c:2383:19: error: unused variable 'txr' [-Werror,-Wunused-variable]
          struct tx_ring          *txr = adapter->tx_rings;
                                 ^
  1 error generated.
>Fix:
N/A

>Release-Note:
>Audit-Trail:

From: Aurelien ROUGEMONT <beorn@gandi.net>
To: bug-followup@FreeBSD.org, beorn@binaries.fr
Cc:  
Subject: Re: kern/185909: ALTQ activation problem
Date: Mon, 20 Jan 2014 14:53:23 +0100

 This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
 ------enig2KQEGCXTGRSLOUMXPCAFX
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 To make myself clear.
 
 The build error comes with : CFLAGS +=3D -DIGB_LEGACY_TX
 --=20
  Aurelien                                  Domain Name Registrar
    \o/                                     Hosting For Geeks and more...
     Gandi.net                                  No Bullshit !
 
 
 ------enig2KQEGCXTGRSLOUMXPCAFX
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 Comment: Using GnuPG with Icedove - http://www.enigmail.net/
 
 iQEcBAEBAgAGBQJS3SpVAAoJEJYcW5i7sL03vqYH/A8OUpKxz+/3SGkxNbMqrHcr
 CXGtDpOeiBb7umxjcIGugUTnpRvAyiO9C1fKAaFmw0a/jwj888naGGmmit3Ankug
 DhxsKxbPXLSH9zN0pQzPjFRgg/rSBbGyhHZDzXd5cGD6Oy9wnK0o+ALZdc7DCisD
 nVC/IUbvhgmQTYxEMBXBrw7qEtsEhPxW8YRkTwor4iWWcSKTwp8GBVFHnfMvS6jh
 nStorPWhMgpReizymetHpuNKtSi+3sV4YMb/ibXfsQCMkW/um5uh7Iffaaa1BVEO
 WRuPP+dhFh+uYxas64uReMivOnhFFAqDDrym37S+JeY071FTY2NK4rcPHcglV9o=
 =vwxE
 -----END PGP SIGNATURE-----
 
 ------enig2KQEGCXTGRSLOUMXPCAFX--

From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= <olivier@cochard.me>
To: bug-followup@freebsd.org, beorn@binaries.fr
Cc:  
Subject: Re: kern/185909: ALTQ activation problem
Date: Fri, 24 Jan 2014 00:51:03 +0100

 --001a11c2c3fa431dc104f0abebea
 Content-Type: multipart/alternative; boundary=001a11c2c3fa431dbd04f0abebe8
 
 --001a11c2c3fa431dbd04f0abebe8
 Content-Type: text/plain; charset=ISO-8859-1
 
 Here is a patch (write on FreeBSD 10.0) for fixing this problem.
 
 --001a11c2c3fa431dbd04f0abebe8
 Content-Type: text/html; charset=ISO-8859-1
 
 <div dir="ltr">Here is a patch (write on FreeBSD 10.0) for fixing this problem.<br></div>
 
 --001a11c2c3fa431dbd04f0abebe8--
 --001a11c2c3fa431dc104f0abebea
 Content-Type: text/plain; charset=US-ASCII; name="Patch-IGB_LEGACY_TX.txt"
 Content-Disposition: attachment; filename="Patch-IGB_LEGACY_TX.txt"
 Content-Transfer-Encoding: base64
 X-Attachment-Id: f_hqsobon80
 
 SW5kZXg6IHN5cy9kZXYvZTEwMDAvaWZfaWdiLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL2Rldi9lMTAw
 MC9pZl9pZ2IuYwkocmV2aXNpb24gMjYwODA5KQorKysgc3lzL2Rldi9lMTAwMC9pZl9pZ2IuYwko
 d29ya2luZyBjb3B5KQpAQCAtMjM4MCw3ICsyMzgwLDkgQEAKIHsKIAlkZXZpY2VfdAkJZGV2ID0g
 YWRhcHRlci0+ZGV2OwogCXN0cnVjdCBpZ2JfcXVldWUJKnF1ZSA9IGFkYXB0ZXItPnF1ZXVlczsK
 KyNpZm5kZWYgSUdCX0xFR0FDWV9UWAogCXN0cnVjdCB0eF9yaW5nCQkqdHhyID0gYWRhcHRlci0+
 dHhfcmluZ3M7CisjZW5kaWYKIAlpbnQJCQllcnJvciwgcmlkID0gMDsKIAogCS8qIFR1cm4gb2Zm
 IGFsbCBpbnRlcnJ1cHRzICovCg==
 --001a11c2c3fa431dc104f0abebea--
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Jan 24 01:06:14 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=185909 
State-Changed-From-To: open->patched 
State-Changed-By: glebius 
State-Changed-When: Sat Jan 25 20:39:27 UTC 2014 
State-Changed-Why:  
Committed, thanks! 


Responsible-Changed-From-To: freebsd-net->glebius 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Sat Jan 25 20:39:27 UTC 2014 
Responsible-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=185909 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/185909: commit references a PR
Date: Sat, 25 Jan 2014 20:39:31 +0000 (UTC)

 Author: glebius
 Date: Sat Jan 25 20:39:23 2014
 New Revision: 261169
 URL: http://svnweb.freebsd.org/changeset/base/261169
 
 Log:
   Fix compilation with IGB_LEGACY_TX defined.
   
   PR:		185909
   Submitted by:	Aurelien Rougemont <beorn binaries.fr>
 
 Modified:
   head/sys/dev/e1000/if_igb.c
 
 Modified: head/sys/dev/e1000/if_igb.c
 ==============================================================================
 --- head/sys/dev/e1000/if_igb.c	Sat Jan 25 19:58:53 2014	(r261168)
 +++ head/sys/dev/e1000/if_igb.c	Sat Jan 25 20:39:23 2014	(r261169)
 @@ -2381,7 +2381,9 @@ igb_allocate_legacy(struct adapter *adap
  {
  	device_t		dev = adapter->dev;
  	struct igb_queue	*que = adapter->queues;
 +#ifndef IGB_LEGACY_TX
  	struct tx_ring		*txr = adapter->tx_rings;
 +#endif
  	int			error, rid = 0;
  
  	/* Turn off all interrupts */
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: glebius 
State-Changed-When: Tue Mar 11 15:14:20 UTC 2014 
State-Changed-Why:  
Merged to stable/10. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=185909 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/185909: commit references a PR
Date: Tue, 11 Mar 2014 15:17:12 +0000 (UTC)

 Author: glebius
 Date: Tue Mar 11 15:17:04 2014
 New Revision: 263025
 URL: http://svnweb.freebsd.org/changeset/base/263025
 
 Log:
   Merge r261169: Fix compilation with IGB_LEGACY_TX defined.
   
   PR:		185909
 
 Modified:
   stable/10/sys/dev/e1000/if_igb.c
 Directory Properties:
   stable/10/   (props changed)
 
 Modified: stable/10/sys/dev/e1000/if_igb.c
 ==============================================================================
 --- stable/10/sys/dev/e1000/if_igb.c	Tue Mar 11 14:59:34 2014	(r263024)
 +++ stable/10/sys/dev/e1000/if_igb.c	Tue Mar 11 15:17:04 2014	(r263025)
 @@ -2380,7 +2380,9 @@ igb_allocate_legacy(struct adapter *adap
  {
  	device_t		dev = adapter->dev;
  	struct igb_queue	*que = adapter->queues;
 +#ifndef IGB_LEGACY_TX
  	struct tx_ring		*txr = adapter->tx_rings;
 +#endif
  	int			error, rid = 0;
  
  	/* Turn off all interrupts */
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
