1. 19 7月, 2008 1 次提交
    • D
      pkt_sched: Manage qdisc list inside of root qdisc. · 30723673
      David S. Miller 提交于
      Idea is from Patrick McHardy.
      
      Instead of managing the list of qdiscs on the device level, manage it
      in the root qdisc of a netdev_queue.  This solves all kinds of
      visibility issues during qdisc destruction.
      
      The way to iterate over all qdiscs of a netdev_queue is to visit
      the netdev_queue->qdisc, and then traverse it's list.
      
      The only special case is to ignore builting qdiscs at the root when
      dumping or doing a qdisc_lookup().  That was not needed previously
      because builtin qdiscs were not added to the device's qdisc_list.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30723673
  2. 18 7月, 2008 6 次提交
  3. 09 7月, 2008 9 次提交
  4. 06 7月, 2008 1 次提交
  5. 02 7月, 2008 1 次提交
  6. 15 4月, 2008 1 次提交
    • J
      [NET_SCHED] sch_api: fix qdisc_tree_decrease_qlen() loop · 066a3b5b
      Jarek Poplawski 提交于
      TC_H_MAJ(parentid) for root classes is the same as for ingress, and if
      ingress qdisc is created qdisc_lookup() returns its pointer (without
      ingress NULL is returned). After this all qdisc_lookups give the same,
      and we get endless loop. (I don't know how this could hide for so long
      - it should trigger with every leaf class deleted if it's qdisc isn't
      empty.)
      
      After this fix qdisc_lookup() is omitted both for ingress and root
      parents, but looking for root is only wasting a little time here...
      Many thanks to Enrico Demarin for finding a test for catching this
      bug, which probably bothered quite a lot of admins.
       
      Reported-by: Enrico Demarin <enrico@superclick.com>,
      Signed-off-by: NJarek Poplawski <jarkao2@gmail.com>
      Acked-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      066a3b5b
  7. 26 3月, 2008 1 次提交
  8. 29 1月, 2008 7 次提交
  9. 11 10月, 2007 3 次提交
    • P
      [NET_SCHED]: Show timer resolution instead of clock resolution in /proc/net/psched · 3c0cfc13
      Patrick McHardy 提交于
      The fourth parameter of /proc/net/psched is supposed to show the timer
      resultion and is used by HTB userspace to calculate the necessary
      burst rate. Currently we show the clock resolution, which results in a
      too low burst rate when the two differ.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3c0cfc13
    • E
      [NET]: Make the device list and device lookups per namespace. · 881d966b
      Eric W. Biederman 提交于
      This patch makes most of the generic device layer network
      namespace safe.  This patch makes dev_base_head a
      network namespace variable, and then it picks up
      a few associated variables.  The functions:
      dev_getbyhwaddr
      dev_getfirsthwbytype
      dev_get_by_flags
      dev_get_by_name
      __dev_get_by_name
      dev_get_by_index
      __dev_get_by_index
      dev_ioctl
      dev_ethtool
      dev_load
      wireless_process_ioctl
      
      were modified to take a network namespace argument, and
      deal with it.
      
      vlan_ioctl_set and brioctl_set were modified so their
      hooks will receive a network namespace argument.
      
      So basically anthing in the core of the network stack that was
      affected to by the change of dev_base was modified to handle
      multiple network namespaces.  The rest of the network stack was
      simply modified to explicitly use &init_net the initial network
      namespace.  This can be fixed when those components of the network
      stack are modified to handle multiple network namespaces.
      
      For now the ifindex generator is left global.
      
      Fundametally ifindex numbers are per namespace, or else
      we will have corner case problems with migration when
      we get that far.
      
      At the same time there are assumptions in the network stack
      that the ifindex of a network device won't change.  Making
      the ifindex number global seems a good compromise until
      the network stack can cope with ifindex changes when
      you change namespaces, and the like.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      881d966b
    • E
      [NET]: Make /proc/net per network namespace · 457c4cbc
      Eric W. Biederman 提交于
      This patch makes /proc/net per network namespace.  It modifies the global
      variables proc_net and proc_net_stat to be per network namespace.
      The proc_net file helpers are modified to take a network namespace argument,
      and all of their callers are fixed to pass &init_net for that argument.
      This ensures that all of the /proc/net files are only visible and
      usable in the initial network namespace until the code behind them
      has been updated to be handle multiple network namespaces.
      
      Making /proc/net per namespace is necessary as at least some files
      in /proc/net depend upon the set of network devices which is per
      network namespace, and even more files in /proc/net have contents
      that are relevant to a single network namespace.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      457c4cbc
  10. 31 7月, 2007 1 次提交
  11. 15 7月, 2007 2 次提交
    • P
      [NET_SCHED]: act_api: qdisc internal reclassify support · 73ca4918
      Patrick McHardy 提交于
      The behaviour of NET_CLS_POLICE for TC_POLICE_RECLASSIFY was to return
      it to the qdisc, which could handle it internally or ignore it. With
      NET_CLS_ACT however, tc_classify starts over at the first classifier
      and never returns it to the qdisc. This makes it impossible to support
      qdisc-internal reclassification, which in turn makes it impossible to
      remove the old NET_CLS_POLICE code without breaking compatibility since
      we have two qdiscs (CBQ and ATM) that support this.
      
      This patch adds a tc_classify_compat function that handles
      reclassification the old way and changes CBQ and ATM to use it.
      
      This again is of course not fully backwards compatible with the previous
      NET_CLS_ACT behaviour. Unfortunately there is no way to fully maintain
      compatibility *and* support qdisc internal reclassification with
      NET_CLS_ACT, but this seems like the better choice over keeping the two
      incompatible options around forever.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      73ca4918
    • P
      [NET_SCHED]: Revert "avoid transmit softirq on watchdog wakeup" optimization · 0621ed2e
      Patrick McHardy 提交于
      As noticed by Ranko Zivojnovic <ranko@spidernet.net>, calling qdisc_run
      from the timer handler can result in deadlock:
      
      > CPU#0
      >
      > qdisc_watchdog() fires and gets dev->queue_lock
      > qdisc_run()...qdisc_restart()...
      > -> releases dev->queue_lock and enters dev_hard_start_xmit()
      >
      > CPU#1
      >
      > tc del qdisc dev ...
      > qdisc_graft()...dev_graft_qdisc()...dev_deactivate()...
      > -> grabs dev->queue_lock ...
      >
      > qdisc_reset()...{cbq,hfsc,htb,netem,tbf}_reset()...qdisc_watchdog_cancel()...
      > -> hrtimer_cancel() - waiting for the qdisc_watchdog() to exit, while still
      >		        holding dev->queue_lock
      >
      > CPU#0
      >
      > dev_hard_start_xmit() returns ...
      > -> wants to get dev->queue_lock(!)
      >
      > DEADLOCK!
      
      The entire optimization is a bit questionable IMO, it moves potentially
      large parts of NET_TX_SOFTIRQ work to TIMER_SOFTIRQ/HRTIMER_SOFTIRQ,
      which kind of defeats the separation of them.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Acked-by: NRanko Zivojnovic <ranko@spidernet.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0621ed2e
  12. 11 7月, 2007 2 次提交
  13. 04 5月, 2007 1 次提交
  14. 26 4月, 2007 4 次提交