Hello Tom,
  I recieve the answer on my question from Patrick McHardy which discuss
'cls_flow' module on 'http://kerneltrap.org/mailarchive/search/@subject+%22%5BNET_SCHED+00/04%5D:+External+SFQ+classifiers/flow+classifier%22/linux-netdev'. May be his answer help you to understand as we can use this module.

  Regards,
  Alex
--- Begin Message ---
alex wrote:
  Hello Patrick!
I bag your pardon for disturb but i need your help very much. I found your
letter on 'http://lwn.net/Articles/236200/' page.
  I use one from many Linux firewalls - Shorewall (http://shorewall.net).
With many other usefull things, it allow configure traffic shaping. But you,
of course, know that would be better if we would be allowed to allocate
bandwidth fairly per source IP rather than per connection when we use traffic
shaping ability. At this moment i know about two facilities that allow do
that: ESFQ and "Flexible SFQ flow classification" (cls_flow). ESFQ are not
included in vanilla kernel and in Shorewall maillist (Shorewall Users
<shorewall-users@lists.sourceforge.net>) we discuss theme of using 'cls_flow'
module for this purposes but don't understand how.
  Could you help with explanation way of using this module or may be advise
where we can found answer on our question?

You simply attach the classifier as with any other qdisc and
configure the flow keys. I don't have an SFQ or ESFQ example,
just one for the DRR scheduler in the current kernel (which
is a replacement for ESFQ):

drr_hierarchy 140:1 1400: 1024
tc filter add dev eth0 protocol ip pref 1 parent 1400: handle 1 \
flow hash keys src,dst divisor 1024 perturb 30
with:

function drr_hierarchy()
{
        parent=$1
        handle=$2
        classes=$3

        tc qdisc add dev eth0 $Q_ESTIMATOR parent $parent handle $handle \
                drr

        for ((i = 1; i <= $classes; i++)); do
                classid=$handle$(printf %x $i)
tc class add dev eth0 $CL_ESTIMATOR parent $handle classid $classid \
                        drr
                tc qdisc add dev eth0 parent $classid pfifo limit 40
        done
}

HTH.

--- End Message ---
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Shorewall-users mailing list
Shorewall-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to