Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Nov 2012 14:15:56 -0500
From:      Karim <fodillemlinkarim@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   em/igb if_transmit (drbr) and ALTQ
Message-ID:  <50A14AEC.2040303@gmail.com>

next in thread | raw e-mail | index | archive | help
Hi all,

I have been following the current discussions on igb tx/rx locking with 
great interest and I though I would point out (as it was before pointed 
out in kern/138392) that any driver setting if_start to NULL and using 
if_transmit (multi-queue or not) will effectively break ALTQ.

The reason for this can be found in tbr_timeout() in altq_subr.c where 
the token bucket regulator goes through all ALTQ registered interface 
and tries to 'kick' them into sending through if_start().

tbr_timeout() :

...

         for (ifp = TAILQ_FIRST(&V_ifnet); ifp;
             ifp = TAILQ_NEXT(ifp, if_list)) {
             /* read from if_snd unlocked */
             if (!TBR_IS_ENABLED(&ifp->if_snd))
                 continue;
             active++;
             if (!IFQ_IS_EMPTY(&ifp->if_snd) &&
                 ifp->if_start != NULL)                     /* if_start 
is NULL if if_transmit is used in em/igb driver */
                 (*ifp->if_start)(ifp);
         }

...

As you can see if_start is NULL on those new multi-queue enabled drivers 
which has for net effect to 'break' ALTQ's token bucket regulator.

I am writing this because I am interested in your comments on how this 
can be fixed properly looking forward. The whole range of suggestions; 
from 'don't compile with EM_MULTIQUEUE defined' to 'here is how you can 
make ALTQ use drbr' will help.

Thanks you,

Karim.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50A14AEC.2040303>