1. 06 9月, 2009 4 次提交
    • P
      net_sched: reintroduce dev->qdisc for use by sch_api · af356afa
      Patrick McHardy 提交于
      Currently the multiqueue integration with the qdisc API suffers from
      a few problems:
      
      - with multiple queues, all root qdiscs use the same handle. This means
        they can't be exposed to userspace in a backwards compatible fashion.
      
      - all API operations always refer to queue number 0. Newly created
        qdiscs are automatically shared between all queues, its not possible
        to address individual queues or restore multiqueue behaviour once a
        shared qdisc has been attached.
      
      - Dumps only contain the root qdisc of queue 0, in case of non-shared
        qdiscs this means the statistics are incomplete.
      
      This patch reintroduces dev->qdisc, which points to the (single) root qdisc
      from userspace's point of view. Currently it either points to the first
      (non-shared) default qdisc, or a qdisc shared between all queues. The
      following patches will introduce a classful dummy qdisc, which will be used
      as root qdisc and contain the per-queue qdiscs as children.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      af356afa
    • P
      net_sched: remove some unnecessary checks in classful schedulers · 5b9a9ccf
      Patrick McHardy 提交于
      The class argument to the ->graft(), ->leaf(), ->dump(), ->dump_stats() all
      originate from either ->get() or ->walk() and are always valid.
      
      Remove unnecessary checks.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5b9a9ccf
    • P
      net_sched: make cls_ops->change and cls_ops->delete optional · de6d5cdf
      Patrick McHardy 提交于
      Some schedulers don't support creating, changing or deleting classes.
      Make the respective callbacks optionally and consistently return
      -EOPNOTSUPP for unsupported operations, instead of currently either
      -EOPNOTSUPP, -ENOSYS or no error.
      
      In case of sch_prio and sch_multiq, the removed operations additionally
      checked for an invalid class. This is not necessary since the class
      argument can only orginate from ->get() or in case of ->change is 0
      for creation of new classes, in which case ->change() incorrectly
      returned -ENOENT.
      
      As a side-effect, this patch fixes a possible (root-only) NULL pointer
      function call in sch_ingress, which didn't implement a so far mandatory
      ->delete() operation.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de6d5cdf
    • P
      net_sched: make cls_ops->tcf_chain() optional · 71ebe5e9
      Patrick McHardy 提交于
      Some qdiscs don't support attaching filters. Handle this centrally in
      cls_api and return a proper errno code (EOPNOTSUPP) instead of EINVAL.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      71ebe5e9
  2. 05 9月, 2009 32 次提交
  3. 04 9月, 2009 4 次提交