1. 20 5月, 2011 1 次提交
  2. 05 4月, 2011 1 次提交
  3. 24 2月, 2011 1 次提交
    • E
      net_sched: SFB flow scheduler · e13e02a3
      Eric Dumazet 提交于
      This is the Stochastic Fair Blue scheduler, based on work from :
      
      W. Feng, D. Kandlur, D. Saha, K. Shin. Blue: A New Class of Active Queue
      Management Algorithms. U. Michigan CSE-TR-387-99, April 1999.
      
      http://www.thefengs.com/wuchang/blue/CSE-TR-387-99.pdf
      
      This implementation is based on work done by Juliusz Chroboczek
      
      General SFB algorithm can be found in figure 14, page 15:
      
      B[l][n] : L x N array of bins (L levels, N bins per level)
      enqueue()
      Calculate hash function values h{0}, h{1}, .. h{L-1}
      Update bins at each level
      for i = 0 to L - 1
         if (B[i][h{i}].qlen > bin_size)
            B[i][h{i}].p_mark += p_increment;
         else if (B[i][h{i}].qlen == 0)
            B[i][h{i}].p_mark -= p_decrement;
      p_min = min(B[0][h{0}].p_mark ... B[L-1][h{L-1}].p_mark);
      if (p_min == 1.0)
          ratelimit();
      else
          mark/drop with probabilty p_min;
      
      I did the adaptation of Juliusz code to meet current kernel standards,
      and various changes to address previous comments :
      
      http://thread.gmane.org/gmane.linux.network/90225
      http://thread.gmane.org/gmane.linux.network/90375
      
      Default flow classifier is the rxhash introduced by RPS in 2.6.35, but
      we can use an external flow classifier if wanted.
      
      tc qdisc add dev $DEV parent 1:11 handle 11:  \
              est 0.5sec 2sec sfb limit 128
      
      tc filter add dev $DEV protocol ip parent 11: handle 3 \
              flow hash keys dst divisor 1024
      
      Notes:
      
      1) SFB default child qdisc is pfifo_fast. It can be changed by another
      qdisc but a child qdisc MUST not drop a packet previously queued. This
      is because SFB needs to handle a dequeued packet in order to maintain
      its virtual queue states. pfifo_head_drop or CHOKe should not be used.
      
      2) ECN is enabled by default, unlike RED/CHOKe/GRED
      
      With help from Patrick McHardy & Andi Kleen
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      CC: Juliusz Chroboczek <Juliusz.Chroboczek@pps.jussieu.fr>
      CC: Stephen Hemminger <shemminger@vyatta.com>
      CC: Patrick McHardy <kaber@trash.net>
      CC: Andi Kleen <andi@firstfloor.org>
      CC: John W. Linville <linville@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e13e02a3
  4. 03 2月, 2011 1 次提交
    • S
      sched: CHOKe flow scheduler · 45e14433
      stephen hemminger 提交于
      CHOKe ("CHOose and Kill" or "CHOose and Keep") is an alternative
      packet scheduler based on the Random Exponential Drop (RED) algorithm.
      
      The core idea is:
        For every packet arrival:
        	Calculate Qave
      	if (Qave < minth)
      	     Queue the new packet
      	else
      	     Select randomly a packet from the queue
      	     if (both packets from same flow)
      	     then Drop both the packets
      	     else if (Qave > maxth)
      	          Drop packet
      	     else
      	       	  Admit packet with proability p (same as RED)
      
      See also:
        Rong Pan, Balaji Prabhakar, Konstantinos Psounis, "CHOKe: a stateless active
         queue management scheme for approximating fair bandwidth allocation",
        Proceeding of INFOCOM'2000, March 2000.
      
      Help from:
           Eric Dumazet <eric.dumazet@gmail.com>
           Patrick McHardy <kaber@trash.net>
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      45e14433
  5. 20 1月, 2011 1 次提交
    • J
      net_sched: implement a root container qdisc sch_mqprio · b8970f0b
      John Fastabend 提交于
      This implements a mqprio queueing discipline that by default creates
      a pfifo_fast qdisc per tx queue and provides the needed configuration
      interface.
      
      Using the mqprio qdisc the number of tcs currently in use along
      with the range of queues alloted to each class can be configured. By
      default skbs are mapped to traffic classes using the skb priority.
      This mapping is configurable.
      
      Configurable parameters,
      
      struct tc_mqprio_qopt {
      	__u8    num_tc;
      	__u8    prio_tc_map[TC_BITMASK + 1];
      	__u8    hw;
      	__u16   count[TC_MAX_QUEUE];
      	__u16   offset[TC_MAX_QUEUE];
      };
      
      Here the count/offset pairing give the queue alignment and the
      prio_tc_map gives the mapping from skb->priority to tc.
      
      The hw bit determines if the hardware should configure the count
      and offset values. If the hardware bit is set then the operation
      will fail if the hardware does not implement the ndo_setup_tc
      operation. This is to avoid undetermined states where the hardware
      may or may not control the queue mapping. Also minimal bounds
      checking is done on the count/offset to verify a queue does not
      exceed num_tx_queues and that queue ranges do not overlap. Otherwise
      it is left to user policy or hardware configuration to create
      useful mappings.
      
      It is expected that hardware QOS schemes can be implemented by
      creating appropriate mappings of queues in ndo_tc_setup().
      
      One expected use case is drivers will use the ndo_setup_tc to map
      queue ranges onto 802.1Q traffic classes. This provides a generic
      mechanism to map network traffic onto these traffic classes and
      removes the need for lower layer drivers to know specifics about
      traffic types.
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b8970f0b
  6. 14 1月, 2011 1 次提交
    • P
      netfilter: fix Kconfig dependencies · c7066f70
      Patrick McHardy 提交于
      Fix dependencies of netfilter realm match: it depends on NET_CLS_ROUTE,
      which itself depends on NET_SCHED; this dependency is missing from netfilter.
      
      Since matching on realms is also useful without having NET_SCHED enabled and
      the option really only controls whether the tclassid member is included in
      route and dst entries, rename the config option to IP_ROUTE_CLASSID and move
      it outside of traffic scheduling context to get rid of the NET_SCHED dependeny.
      Reported-by: NVladis Kletnieks <Valdis.Kletnieks@vt.edu>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      c7066f70
  7. 16 11月, 2010 1 次提交
    • M
      Docs/Kconfig: Update: osdl.org -> linuxfoundation.org · c996d8b9
      Michael Witten 提交于
      Some of the documentation refers to web pages under
      the domain `osdl.org'. However, `osdl.org' now
      redirects to `linuxfoundation.org'.
      
      Rather than rely on redirections, this patch updates
      the addresses appropriately; for the most part, only
      documentation that is meant to be current has been
      updated.
      
      The patch should be pretty quick to scan and check;
      each new web-page url was gotten by trying out the
      original URL in a browser and then simply copying the
      the redirected URL (formatting as necessary).
      
      There is some conflict as to which one of these domain
      names is preferred:
      
        linuxfoundation.org
        linux-foundation.org
      
      So, I wrote:
      
        info@linuxfoundation.org
      
      and got this reply:
      
        Message-ID: <4CE17EE6.9040807@linuxfoundation.org>
        Date: Mon, 15 Nov 2010 10:41:42 -0800
        From: David Ames <david@linuxfoundation.org>
      
        ...
      
        linuxfoundation.org is preferred. The canonical name for our web site is
        www.linuxfoundation.org. Our list site is actually
        lists.linux-foundation.org.
      
        Regarding email linuxfoundation.org is preferred there are a few people
        who choose to use linux-foundation.org for their own reasons.
      
      Consequently, I used `linuxfoundation.org' for web pages and
      `lists.linux-foundation.org' for mailing-list web pages and email addresses;
      the only personal email address I updated from `@osdl.org' was that of
      Andrew Morton, who prefers `linux-foundation.org' according `git log'.
      Signed-off-by: NMichael Witten <mfwitten@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      c996d8b9
  8. 24 8月, 2010 1 次提交
  9. 20 8月, 2010 1 次提交
    • G
      net/sched: add ACT_CSUM action to update packets checksums · eb4d4065
      Grégoire Baron 提交于
      net/sched: add ACT_CSUM action to update packets checksums
      
      ACT_CSUM can be called just after ACT_PEDIT in order to re-compute some
      altered checksums in IPv4 and IPv6 packets. The following checksums are
      supported by this patch:
       - IPv4: IPv4 header, ICMP, IGMP, TCP, UDP & UDPLite
       - IPv6: ICMPv6, TCP, UDP & UDPLite
      It's possible to request in the same action to update different kind of
      checksums, if the packets flow mix TCP, UDP and UDPLite, ...
      
      An example of usage is done in the associated iproute2 patch.
      
      Version 3 changes:
       - remove useless goto instructions
       - improve IPv6 hop options decoding
      
      Version 2 changes:
       - coding style correction
       - remove useless arguments of some functions
       - use stack in tcf_csum_dump()
       - add tcf_csum_skb_nextlayer() to factor code
      Signed-off-by: NGregoire Baron <baronchon@n7mm.org>
      Acked-by: Njamal <hadi@cyberus.ca>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eb4d4065
  10. 24 3月, 2010 1 次提交
    • B
      cgroups: net_cls as module · 8e039d84
      Ben Blum 提交于
      Allows the net_cls cgroup subsystem to be compiled as a module
      
      This patch modifies net/sched/cls_cgroup.c to allow the net_cls subsystem
      to be optionally compiled as a module instead of builtin.  The
      cgroup_subsys struct is moved around a bit to allow the subsys_id to be
      either declared as a compile-time constant by the cgroup_subsys.h include
      in cgroup.h, or, if it's a module, initialized within the struct by
      cgroup_load_subsys.
      Signed-off-by: NBen Blum <bblum@andrew.cmu.edu>
      Acked-by: NLi Zefan <lizf@cn.fujitsu.com>
      Cc: Paul Menage <menage@google.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8e039d84
  11. 09 2月, 2010 1 次提交
  12. 30 12月, 2008 1 次提交
  13. 20 11月, 2008 1 次提交
  14. 08 11月, 2008 1 次提交
    • T
      pkt_sched: Control group classifier · f4009237
      Thomas Graf 提交于
      The classifier should cover the most common use case and will work
      without any special configuration.
      
      The principle of the classifier is to directly access the
      task_struct via get_current(). In order for this to work,
      classification requests from softirqs must be ignored. This is
      not a problem because the vast majority of packets in softirq
      context are not assigned to a task anyway. For this to work, a
      mechanism is needed to trace softirq context. 
      
      This repost goes back to the method of relying on the number of
      nested bh disable calls for the sake of not adding too much
      complexity and the option to come up with something more reliable
      if actually needed.
      Signed-off-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f4009237
  15. 13 9月, 2008 2 次提交
  16. 28 6月, 2008 1 次提交
  17. 01 2月, 2008 2 次提交
    • P
      [NET_SCHED]: Add flow classifier · e5dfb815
      Patrick McHardy 提交于
      Add new "flow" classifier, which is meant to extend the SFQ hashing
      capabilities without hard-coding new hash functions and also allows
      deterministic mappings of keys to classes, replacing some out of tree
      iptables patches like IPCLASSIFY (maps IPs to classes), IPMARK (maps
      IPs to marks, with fw filters to classes), ...
      
      Some examples:
      
      - Classic SFQ hash:
      
        tc filter add ... flow hash \
        	keys src,dst,proto,proto-src,proto-dst divisor 1024
      
      - Classic SFQ hash, but using information from conntrack to work properly in
        combination with NAT:
      
        tc filter add ... flow hash \
        	keys nfct-src,nfct-dst,proto,nfct-proto-src,nfct-proto-dst divisor 1024
      
      - Map destination IPs of 192.168.0.0/24 to classids 1-257:
      
        tc filter add ... flow map \
        	key dst addend -192.168.0.0 divisor 256
      
      - alternatively:
      
        tc filter add ... flow map \
        	key dst and 0xff
      
      - similar, but reverse ordered:
      
        tc filter add ... flow map \
        	key dst and 0xff xor 0xff
      
      Perturbation is currently not supported because we can't reliable kill the
      timer on destruction.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e5dfb815
    • P
      [NET_SCHED]: sch_ingress: remove netfilter support · 72eb7bd2
      Patrick McHardy 提交于
      Since the old policer code is gone, TC actions are needed for policing.
      The ingress qdisc can get packets directly from netif_receive_skb()
      in case TC actions are enabled or through netfilter otherwise, but
      since without TC actions there is no policer the only thing it actually
      does is count packets.
      
      Remove the netfilter support and always require TC actions.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Acked-by: NJamal Hadi Salim <hadi@cyberus.ca>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      72eb7bd2
  18. 29 1月, 2008 3 次提交
  19. 19 10月, 2007 1 次提交
  20. 11 10月, 2007 1 次提交
    • H
      [PKT_SCHED]: Add stateless NAT · b4219952
      Herbert Xu 提交于
      Stateless NAT is useful in controlled environments where restrictions are
      placed on through traffic such that we don't need connection tracking to
      correctly NAT protocol-specific data.
      
      In particular, this is of interest when the number of flows or the number
      of addresses being NATed is large, or if connection tracking information
      has to be replicated and where it is not practical to do so.
      
      Previously we had stateless NAT functionality which was integrated into
      the IPv4 routing subsystem.  This was a great solution as long as the NAT
      worked on a subnet to subnet basis such that the number of NAT rules was
      relatively small.  The reason is that for SNAT the routing based system
      had to perform a linear scan through the rules.
      
      If the number of rules is large then major renovations would have take
      place in the routing subsystem to make this practical.
      
      For the time being, the least intrusive way of achieving this is to use
      the u32 classifier written by Alexey Kuznetsov along with the actions
      infrastructure implemented by Jamal Hadi Salim.
      
      The following patch is an attempt at this problem by creating a new nat
      action that can be invoked from u32 hash tables which would allow large
      number of stateless NAT rules that can be used/updated in constant time.
      
      The actual NAT code is mostly based on the previous stateless NAT code
      written by Alexey.  In future we might be able to utilise the protocol
      NAT code from netfilter to improve support for other protocols.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b4219952
  21. 18 7月, 2007 1 次提交
  22. 15 7月, 2007 1 次提交
  23. 11 7月, 2007 2 次提交
  24. 26 4月, 2007 1 次提交
  25. 03 12月, 2006 2 次提交
  26. 01 7月, 2006 1 次提交
  27. 21 3月, 2006 1 次提交
  28. 14 1月, 2006 1 次提交
  29. 12 1月, 2006 1 次提交
  30. 18 11月, 2005 1 次提交
    • R
      [NET]: Sanitize NET_SCHED protection in /net/sched/Kconfig · 05b8b0fa
      Roman Zippel 提交于
      On Thu, 17 Nov 2005, David Gómez wrote:
      
      > I found out that if i select NET_CLS_ROUTE4, save my changes and exit
      > menuconfig, execute again make menuconfig and go to QoS options, then the new
      > available options are visible. So menuconfig has some problem refreshing
      > contents :?
      
      No, they were there before too, but you have to go up one level to see 
      them.
      
      It's better in 2.6.15-rc1-git5, but the menu structure is still a little 
      messed up, the patch below properly indents all menu entries.
      Signed-off-by: NRoman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      05b8b0fa
  31. 03 11月, 2005 1 次提交
  32. 14 10月, 2005 1 次提交
  33. 30 8月, 2005 1 次提交
  34. 12 7月, 2005 1 次提交
    • S
      [NET]: move config options out to individual protocols · 6a2e9b73
      Sam Ravnborg 提交于
      Move the protocol specific config options out to the specific protocols.
      With this change net/Kconfig now starts to become readable and serve as a
      good basis for further re-structuring.
      
      The menu structure is left almost intact, except that indention is
      fixed in most cases. Most visible are the INET changes where several
      "depends on INET" are replaced with a single ifdef INET / endif pair.
      
      Several new files were created to accomplish this change - they are
      small but serve the purpose that config options are now distributed
      out where they belongs.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6a2e9b73