Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: jzeeff@internet2.edu
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Split bandwidth equally per IP
Date: Fri, 05 Dec 2003 15:08:11 +0000	[thread overview]
Message-ID: <marc-lartc-107063901127062@msgid-missing> (raw)
In-Reply-To: <marc-lartc-107056586923918@msgid-missing>


Here are my untested (but simple) changes to SFQ to make it "fair" on a per
ip basis.  I believe that this is actually what most people want - equal
bandwidth among a number of users without being tricked by users using many
connections.


In net/sched/sch_sfq.c:

                h = iph->daddr;
                h2 = iph->saddr^iph->protocol;
                if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) &&
                    (iph->protocol = IPPROTO_TCP ||
                     iph->protocol = IPPROTO_UDP ||
                     iph->protocol = IPPROTO_ESP))
                        h2 ^= *(((u32*)iph) + iph->ihl);
                break;

change to:

h = iph->daddr;
                h2 = iph->saddr^iph->protocol;
                if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) &&
                    (iph->protocol = IPPROTO_TCP ||
                     iph->protocol = IPPROTO_UDP ||
                     iph->protocol = IPPROTO_ESP))
                        h2 ^= *(((u32*)iph) + iph->ihl);
                break;

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  parent reply	other threads:[~2003-12-05 15:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-04 18:52 [LARTC] Split bandwidth equally per IP Mihai Vlad
2003-12-04 19:44 ` Stef Coene
2003-12-05 15:08 ` jzeeff [this message]
2003-12-05 15:19 ` jzeeff
2003-12-05 15:57 ` Mihai Vlad
2003-12-05 17:02 ` Martin A. Brown
2003-12-05 17:50 ` jzeeff
2003-12-05 22:45 ` Mihai Vlad
2003-12-07  0:12 ` jzeeff
2003-12-07  6:21 ` 'Martin A. Brown'
2003-12-07  6:23 ` 'Martin A. Brown'
2003-12-07  8:30 ` Mihai Vlad
2003-12-07  9:32 ` Chijioke Kalu
2003-12-07 21:19 ` Nickola Kolev
2003-12-17 16:56 ` Mihai Vlad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-107063901127062@msgid-missing \
    --to=jzeeff@internet2.edu \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox