# igb driver problem/bug with altq and FreeBSD 9.1



## saznik (Jul 9, 2013)

Hi guys,

I have a problem with one FreeBSD machine after the upgrade from 9.0 to 9.1. Actually I'm running 9.1-RELEASE p4. 


```
FreeBSD XXX 9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4 #0: Tue Jul  9 08:51:25 CEST 2013     root@XXX:/usr/obj/usr/src/sys/XXX  amd64
```

On this machine I use altq with HFSC. _The n_etwork _c_ard is an Intel Quad Port Server Adapter with the IntelÂ® 82576 Gigabit Ethernet Controller. Under 9.1 my pf.conf isn't working anymore. When I try to load the config I got this: 
	
	



```
pfctl: igb0: driver does not support altq
```

After some googling I found another one in the mailing list having the same problem http://lists.freebsd.org/pipermail/freebsd-net/2013-April/thread.html#35119. So it seems to be a problem/bug in the igb driver. I have buil_t_ a custom kernel and all necessary options for altq are set.


```
options         ALTQ
options         ALTQ_CBQ        # Class Bases 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
```

_Has_ anybody fixed this problem? Should I try to use the newest _d_river available on the Intel _s_ite? Maybe it's fixed in the new version?

Thanks for help!


----------



## SirDice (Jul 9, 2013)

I would suggest trying 9-STABLE. Bug fixes unfortunately don't usually find their way back into a RELEASE. If it's a known problem it's quite likely fixed in -STABLE.


----------



## saznik (Jul 10, 2013)

Now I have tested it with 9-STABLE. Unfortunately same result.


----------



## SirDice (Jul 10, 2013)

Then I'm afraid there's nothing else left to do but to file a Problem Report.


----------



## quintessence (Jul 10, 2013)

Hello, fixed since rev. 248906: http://svnweb.freebsd.org/base?view=revision&revision=248906, also
http://svnweb.freebsd.org/base?view=revision&revision=249339.


----------



## SirDice (Jul 10, 2013)

Ok, so it's fixed in -CURRENT already. And it should be MFC'ed soon.


----------



## saznik (Jul 12, 2013)

In the meantime I found a bug report which describes the problem.

Go_o_d to know that it should be fixed soon in STABLE. Does someone have a suggestion how I can track when the changes are merged into STABLE? Will the bug report get closed when the changes go into STABLE?


----------



## krzysiekb81 (Jul 23, 2013)

When can MFC be expected?


----------



## SirDice (Jul 23, 2013)

Looks like it was already fixed in -STABLE:
http://lists.freebsd.org/pipermail/svn-src-stable/2013-July/019491.html

So it should be included in the upcoming 9.2-RELEASE.


----------



## krzysiekb81 (Jul 23, 2013)

OK, so after `svn update -r 252899` should I add 
	
	



```
CFLAGS  += -DIGB_LEGACY_TX
```
 to /usr/src/sys/modules/igb/Makefile in order to use the igb driver together with ALTQ?

Thanks!


----------



## krzysiekb81 (Jul 25, 2013)

OK, I just recompiled my kernel (FreeBSD 9.1-STABLE #0 r252899 amd64), without changing anything in source files, and the problem still exists:

```
pfctl: igb0: driver does not support altq
```

Thanks in advance for any help!


----------



## SirDice (Jul 25, 2013)

krzysiekb81 said:
			
		

> OK, I just recompiled my kernel (FreeBSD 9.1-STABLE #0 r252899 amd64),


Update your sources, 9-STABLE is currently 9.2-BETA1:

```
dice@molly:~> uname -a
FreeBSD molly.dicelan.home 9.2-BETA1 FreeBSD 9.2-BETA1 #0 r253614: Wed Jul 24 22:05:27 CEST 2013     root@molly.dicelan.home:/usr/obj/usr/src/sys/MOLLY  amd64
```


----------



## krzysiekb81 (Jul 26, 2013)

OK, I've rebuilt my kernel and world:

```
FreeBSD 9.2-BETA1 (AMD64) #1 r253646: Thu Jul 25 12:13:34 CEST 2013
```
but still, trying to load pf.conf with ALTQ configuration I get: 

```
pfctl: igb0: driver does not support altq
```


----------



## adiposity (Oct 2, 2014)

Reading this thread I would have thought FreeBSD 9.3 would have fixed this.  I just built 9.3 from source and I still cannot use altq:


```
$pfctl -f /etc/pf.conf
pfctl: igb1: driver does not support altq
```

I compiled in altq support in the kernel.  Is this still an issue, and is there any reason to think it would be fixed by going to 10.0?

edit: no, upgrading to FreeBSD 10.0 did not help.


----------



## adiposity (Oct 3, 2014)

After trying the various patches out there that supposedly enable ALTQ for igb, it still does not work.  I made the changes in the patch below:


```
Index: sys/modules/igb/Makefile
===================================================================
--- sys/modules/igb/Makefile    (revision 272394)
+++ sys/modules/igb/Makefile    (working copy)
@@ -21,7 +21,7 @@
 # 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
+CFLAGS  += -DIGB_LEGACY_TX

 .if !defined(KERNBUILDDIR)
 .if ${MK_INET_SUPPORT} != "no"
Index: sys/dev/e1000/if_igb.c
===================================================================
--- sys/dev/e1000/if_igb.c      (revision 272394)
+++ sys/dev/e1000/if_igb.c      (working copy)
@@ -2380,7 +2380,9 @@
 {
        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 */
```

Unfortunately, it seems a lot of the patches discussed in this thread:

http://lists.freebsd.org/pipermail/free ... 35078.html

have not been integrated into even 10-stable.  It also sounded like they may not be ready for production use.  Is ALTQ on igb dead forever?  I have been using it for years, but now I cannot.


----------

