Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2007 00:09:21 +0100
From:      Volker <volker@vwsoft.com>
To:        Max Laier <max@love2party.net>
Cc:        Greg Hennessy <Greg.Hennessy@nviz.net>, freebsd-pf@freebsd.org
Subject:   Re: ALTQ support for usb NICs?
Message-ID:  <45BFD021.7030101@vwsoft.com>
In-Reply-To: <200701302358.03532.max@love2party.net>
References:  <000301c742ee$ff867500$0201a8c0@d620> <200701300020.52770.max@love2party.net> <000601c744bb$5ee186c0$1ca49440$@Hennessy@nviz.net> <200701302358.03532.max@love2party.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 01/30/07 23:57, Max Laier wrote:
> On Tuesday 30 January 2007 23:09, you wrote:
>>> aue and kue patches added to
>>> http://people.freebsd.org/~mlaier/ALTQ_driver/
>>>
>>> Please test and report back.
>> So far so good.
>>
>> Greg
>>
>>
>> gw2:~ # uname -a
>> FreeBSD gw2.local.net 7.0-CURRENT FreeBSD 7.0-CURRENT #167: Tue Jan 30
>> 15:57:33 GMT 2007     root@gw2.local.net:/usr/obj/usr/src/sys/GH  i386
>> gw2:~ # cat /etc/rc.early
>> /sbin/ifconfig aue0 name outside
>> /sbin/ifconfig em0 name inside
>> /sbin/ifconfig inside polling
> 
> Wow ... so naming really works?  That's news :-)
> 
>> gw2:~ # pfctl -vsq
>> queue root_outside bandwidth 700Kb priority 0 {q_pri, q_def, q_p2p}
>>   [ pkts:          0  bytes:          0  dropped pkts:      0 bytes:   
>>   0 ]
>>   [ qlength:   0/ 50 ]
>> queue  q_pri bandwidth 105Kb qlimit 250 hfsc( realtime 140Kb upperlimit
>> 350Kb )
>>   [ pkts:     118289  bytes:    6735193  dropped pkts:      0 bytes:   
>>   0 ]
>>   [ qlength:   0/250 ]
>> queue  q_def bandwidth 455Kb qlimit 250 hfsc( rio linkshare 350Kb
>> upperlimit 630Kb )
>>   [ pkts:      20710  bytes:    5146240  dropped pkts:      0 bytes:   
>>   0 ]
>>   [ qlength:   0/250 ]
>> queue  q_p2p bandwidth 140Kb qlimit 250 hfsc( rio default upperlimit
>> 630Kb ) [ pkts:       3141  bytes:     140498  dropped pkts:      0
>> bytes:      0 ]
>>   [ qlength:   0/250 ]
>> gw2:~ #
> 
> Can you by any chance run the simple benchmark described at 
> http://people.freebsd.org/~mlaier/ALTQ_driver/ ?  It's good if hfsc 
> works, but the main goal is to make sure that we do not break anything 
> for non-ALTQ users.
> 

Max,

I'm using a RELENG_6 system so your patches did not succeed on my
system. What I did was to manually make the needed modifications
with if_aue.c 1.90.2.6 (cvs RELENG_6).

Following you'll find my patch against RELENG_6.

The interface is working, comes up and traffic goes through. Running
netperf (tcp_range_script) is giving some errors (trimmed at bit):

/usr/local/bin/netperf -l 60 -H 192.168.20.141 -t TCP_STREAM -i 10,2
-I 99,3 -- -m 1 -s 32768 -S 32768

TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
192.168.20.141 (192.168.20.141) port 0 AF_INET : +/-1.5% @ 99% conf.
netperf: cannot shutdown tcp stream socket: Operation not permitted

netperf claims about operation not permitted at least four times
(still running in the background) whereas before the patch has been
installed, netperf showed this message only one single time.

Throughput w/o ALTQ decreases a bit from 5,78 MBit/s (w/o patch) and
5,74 MBit/s (w/ patch, w/o ALTQ enabled for that interface).

As traffic is passing the interface, I would consider this working
but find the "operation not permitted" messages a bit strange.

Next, I'll test w/ ALTQ enabled for that interface but it will take
half an hour (will drop another note to the ML).

FreeBSD bellona.sz.vwsoft.com 6.2-STABLE FreeBSD 6.2-STABLE #6: Tue
Jan 30 23:28:14 CET 2007
root@bellona.sz.vwsoft.com:/usr/obj/usr/src/sys/BELLONA  i386

Greetings,

Volker


Patch for if_aue.c against RELENG_6:
--- if_aue.c.orig       Thu Nov 16 12:50:54 2006
+++ if_aue.c.new        Tue Jan 30 23:20:57 2007
@@ -732,7 +732,10 @@
        ifp->if_start = aue_start;
        ifp->if_watchdog = aue_watchdog;
        ifp->if_init = aue_init;
-       ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
+       IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);
+       ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN;
+       IFQ_SET_READY(&ifp->if_snd);
+

        /*
         * Do MII setup.
@@ -1034,7 +1037,7 @@
        if (!sc->aue_link && mii->mii_media_status & IFM_ACTIVE &&
            IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
                sc->aue_link++;
-               if (ifp->if_snd.ifq_head != NULL)
+               if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
                        aue_start(ifp);
        }

@@ -1106,14 +1109,14 @@
                return;
        }

-       IF_DEQUEUE(&ifp->if_snd, m_head);
+       IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);
        if (m_head == NULL) {
                AUE_UNLOCK(sc);
                return;
        }

        if (aue_encap(sc, m_head, 0)) {
-               IF_PREPEND(&ifp->if_snd, m_head);
+               IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
                ifp->if_drv_flags |= IFF_DRV_OACTIVE;
                AUE_UNLOCK(sc);
                return;
@@ -1350,7 +1353,7 @@
        usbd_get_xfer_status(c->ue_xfer, NULL, NULL, NULL, &stat);
        aue_txeof(c->ue_xfer, c, stat);

-       if (ifp->if_snd.ifq_head != NULL)
+       if (!IFQ_IS_EMPTY(&ifp->if_snd))
                aue_start(ifp);
        AUE_UNLOCK(sc);
        return;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45BFD021.7030101>