PF ALTQ not supported on igb on FreeBSD 10.1-RC1

adiposity

New Member


Messages: 16

I hesitate to repost this issue, but the other thread that referenced it suggests it is limited to 9.1 (by the title), and would be fixed in 9.2 (by the comments). Contrary to that, it continued in 9.3, 10.0, and now 10.1-RC1. Below you can see my system configuration. I compiled ALTQ into a custom kernel. I modified the Makefile for igb, to enable legacy mode, which is supposed to re-enable queuing, but doesn't seem to.

But pf still reports:

Code:
$pfctl -f /etc/pf.conf
pfctl: igb1: driver does not support altq
Code:
FreeBSD bsd.server.com 10.1-RC1 FreeBSD 10.1-RC1 #0 r272480M: Fri Oct  3 12:40:22 PDT 2014     adiposity@server.com:/usr/obj/usr/src/sys/iemkernel  amd64
Code:
  8 options         ALTQ
  9 options         ALTQ_CBQ        # Class Bases Queuing (CBQ)
 10 options         ALTQ_RED        # Random Early Detection (RED)
 11 options         ALTQ_RIO        # RED In/Out
 12 options         ALTQ_HFSC       # Hierarchical Packet Scheduler (HFSC)
 13 options         ALTQ_PRIQ       # Priority Queuing (PRIQ)
 14 options         ALTQ_NOPCC      # Required for SMP build
Code:
$cd /usr/src/
$svn diff
Index: sys/modules/igb/Makefile
===================================================================
--- sys/modules/igb/Makefile    (revision 272488)
+++ 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"
 
OP
OP
A

adiposity

New Member


Messages: 16

Thanks to ncrogers on bugzilla, I now have a working patch:

Code:
Index: sys/dev/e1000/if_igb.c
===================================================================
--- sys/dev/e1000/if_igb.c      (revision 272488)
+++ sys/dev/e1000/if_igb.c      (working copy)
@@ -33,6 +33,8 @@
 /*$FreeBSD$*/


+#define IGB_LEGACY_TX
+
 #include "opt_inet.h"
 #include "opt_inet6.h"

Index: sys/dev/e1000/if_igb.h
===================================================================
--- sys/dev/e1000/if_igb.h      (revision 272488)
+++ sys/dev/e1000/if_igb.h      (working copy)
@@ -35,6 +35,8 @@
 #ifndef _IGB_H_DEFINED_
 #define _IGB_H_DEFINED_

+#define IGB_LEGACY_TX
+
 /* Tunables */

 /*
It's a pity there isn't a better way to do this, yet.
 
OP
OP
A

adiposity

New Member


Messages: 16

Code:
Index: sys/conf/options
===================================================================
--- sys/conf/options    (revision 272659)
+++ sys/conf/options    (working copy)
@@ -405,6 +405,7 @@
 ETHER_8023             opt_ef.h
 ETHER_II               opt_ef.h
 ETHER_SNAP             opt_ef.h
+IGB_LEGACY_TX          opt_igb.h
 INET                   opt_inet.h
 INET6                  opt_inet6.h
 IPDIVERT
Index: sys/dev/e1000/if_igb.c
===================================================================
--- sys/dev/e1000/if_igb.c      (revision 272659)
+++ sys/dev/e1000/if_igb.c      (working copy)
@@ -33,6 +33,8 @@
 /*$FreeBSD$*/


+#include "opt_igb.h"
+
 #include "opt_inet.h"
 #include "opt_inet6.h"

Index: sys/dev/e1000/if_igb.h
===================================================================
--- sys/dev/e1000/if_igb.h      (revision 272659)
+++ sys/dev/e1000/if_igb.h      (working copy)
@@ -35,6 +35,8 @@
 #ifndef _IGB_H_DEFINED_
 #define _IGB_H_DEFINED_

+#include "opt_igb.h"
+
 /* Tunables */

 /*
I created this patch to allow the user to set IGB_LEGACY_TX in the kernel options file.
 
Top