Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Nov 2014 12:19:53 -0800
From:      Nick Rogers <ncrogers@gmail.com>
Cc:        freebsd-pf@freebsd.org
Subject:   Re: pfctl ... driver does not support altq
Message-ID:  <CAKOb=YY=CxN2eLJCLDif7L%2BCFt%2BwyVuOnqxBCeyknB6K8RT3Fw@mail.gmail.com>
In-Reply-To: <20141104075307.79740@smtp.new-ukraine.org>
References:  <20141104075307.79740@smtp.new-ukraine.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 3, 2014 at 9:53 PM, Zeus Panchenko <zeus@ibs.dn.ua> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> greetings,
>
> I see, in list the issue appears from time to time but I was not able to
> find the solution for my case, please help me to get working altq on my
> igb(4) if it is possible at all
>
> I was trying igb(4) original OS drivers and the one from Intel but the
> result is the same
>

You have to compile the igb driver with the IGB_LEGACY_TX path enabled for
ALTQ to work.

see 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

If you are going to rebuild the kernel and not just the module, changing
CFLAGS in the module Makefile or anywhere else that I've tried will NOT
work. The only way I've found to work is to add a #define to if_igb.h and
if_igb.c directly.
You can do this by defining IGB_LEGACY_TX in sys/dev/e1000/if_igb.c
and sys/dev/e1000/if_igb.h.
I use the following little shell script to do this:
echo 'Performing IGB_LEGACY_TX mod'
cd /usr/src/sys/dev/e1000
for ext in c h
do
    echo '#define IGB_LEGACY_TX' > if_igb.$ext.new
    cat if_igb.$ext >> if_igb.$ext.new
    mv -v if_igb.$ext.new if_igb.$ext
done
echo

FreeBSD really needs to add some official documentation on how to use ALTQ
with igb and ixgbe, as it has been a persistent issue for myself and others
since 8.x.

There is a bug/PR to make the IGB_LEGACY_TX path a proper kernel option,
instead of having to modify the driver directly.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194197.

Maybe you would have some luck trying that patch and adding the options to
your kernel conf and rebuilding.


> bellow are my details:
>
>
> > uname -a
> FreeBSD 10.0-RELEASE-p11 #2 r273597 and64
>
>
> > dmesg
> - ---[ quotation start ]-------------------------------------------
>
> igb3: <Intel(R) PRO/1000 Network Connection version - 2.4.2> port
> 0xa000-0xa01f mem 0xf7100000-0xf717ffff,0xf7180000-0xf7183fff irq 19 at
> device 0.0 on pci7
> igb3: Using MSIX interrupts with 5 vectors
> igb3: Ethernet address: 00:25:90:d1:dc:6b
> igb3: Bound queue 0 to cpu 0
> igb3: Bound queue 1 to cpu 1
> igb3: Bound queue 2 to cpu 2
> igb3: Bound queue 3 to cpu 3
>
> - ---[ quotation end   ]-------------------------------------------
>
>
> > pciconf -l
> igb3@pci0:7:0:0:        class=0x020000 card=0x153315d9 chip=0x15338086
> rev=0x03 hdr=0x00
>     vendor     = 'Intel Corporation'
>     device     = 'I210 Gigabit Network Connection'
>     class      = network
>     subclass   = ethernet
>
>
> > /boot/loader.conf
> - ---[ quotation start ]-------------------------------------------
>
> hw.igb.rxd=4096
> hw.igb.txd=4096
> hw.igb.rx_process_limit="-1"
> hw.igb.num_queues=0
> hw.igb.max_interrupt_rate=32000
>
> net.isr.defaultqlimit=4096
> net.isr.bindthreads=1
> net.isr.maxthreads=4
> net.isr.maxqlimit=32768
>
> - ---[ quotation end   ]-------------------------------------------
>
>
> > /usr/src/sys/amd64/conf/MY_KERNEL
> - ---[ quotation start ]-------------------------------------------
>
> options ALTQ
> options ALTQ_CBQ
> options ALTQ_RED
> options ALTQ_RIO
> options ALTQ_HFSC
> options ALTQ_CDNR
> options ALTQ_PRIQ
> options ALTQ_NOPCC
> options ALTQ_DEBUG
>
> - ---[ quotation end   ]-------------------------------------------
>
>
> > /etc/pf.conf
> - ---[ quotation start ]-------------------------------------------
>
> altq on igb3 cbq bandwidth 1000Mb queue { wan_rest, wan_viber }
>      queue wan_viber bandwidth 5Mb priority 0
>      queue wan_rest bandwidth 995Mb cbq(default)
>
> - ---[ quotation end   ]-------------------------------------------
>
>
> > service pf check && service pf reload
> Checking pf rules.
> Reloading pf rules.
> pfctl: igb3: driver does not support altq
>
> - --
> Zeus V. Panchenko                               jid:zeus@im.ibs.dn.ua
> IT Dpt., I.B.S. LLC                                       GMT+2 (EET)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
>
> iEYEARECAAYFAlRYacMACgkQr3jpPg/3oyp1iwCgxQCBIWoYa5b0yKAQxVODSGNb
> NSYAn15io3G83u46pHN+BwRcN2ywsNIZ
> =waxI
> -----END PGP SIGNATURE-----
> _______________________________________________
> freebsd-pf@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-pf
> To unsubscribe, send any mail to "freebsd-pf-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKOb=YY=CxN2eLJCLDif7L%2BCFt%2BwyVuOnqxBCeyknB6K8RT3Fw>