1. 29 1月, 2008 31 次提交
  2. 21 12月, 2007 1 次提交
  3. 14 11月, 2007 1 次提交
    • P
      [PKT_SCHED]: Check subqueue status before calling hard_start_xmit · 5f1a485d
      Peter P Waskiewicz Jr 提交于
      The only qdiscs that check subqueue state before dequeue'ing are PRIO
      and RR.  The other qdiscs, including the default pfifo_fast qdisc,
      will allow traffic bound for subqueue 0 through to hard_start_xmit.
      The check for netif_queue_stopped() is done above in pkt_sched.h, so
      it is unnecessary for qdisc_restart().  However, if the underlying
      driver is multiqueue capable, and only sets queue states on subqueues,
      this will allow packets to enter the driver when it's currently unable
      to process packets, resulting in expensive requeues and driver
      entries.  This patch re-adds the check for the subqueue status before
      calling hard_start_xmit, so we can try and avoid the driver entry when
      the queues are stopped.
      Signed-off-by: NPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5f1a485d
  4. 11 11月, 2007 1 次提交
  5. 07 11月, 2007 2 次提交
    • R
      [PKT_SCHED] CLS_U32: Fix endianness problem with u32 classifier hash masks. · 543821c6
      Radu Rendec 提交于
      While trying to implement u32 hashes in my shaping machine I ran into
      a possible bug in the u32 hash/bucket computing algorithm
      (net/sched/cls_u32.c).
      
      The problem occurs only with hash masks that extend over the octet
      boundary, on little endian machines (where htonl() actually does
      something).
      
      Let's say that I would like to use 0x3fc0 as the hash mask. This means
      8 contiguous "1" bits starting at b6. With such a mask, the expected
      (and logical) behavior is to hash any address in, for instance,
      192.168.0.0/26 in bucket 0, then any address in 192.168.0.64/26 in
      bucket 1, then 192.168.0.128/26 in bucket 2 and so on.
      
      This is exactly what would happen on a big endian machine, but on
      little endian machines, what would actually happen with current
      implementation is 0x3fc0 being reversed (into 0xc03f0000) by htonl()
      in the userspace tool and then applied to 192.168.x.x in the u32
      classifier. When shifting right by 16 bits (rank of first "1" bit in
      the reversed mask) and applying the divisor mask (0xff for divisor
      256), what would actually remain is 0x3f applied on the "168" octet of
      the address.
      
      One could say is this can be easily worked around by taking endianness
      into account in userspace and supplying an appropriate mask (0xfc03)
      that would be turned into contiguous "1" bits when reversed
      (0x03fc0000). But the actual problem is the network address (inside
      the packet) not being converted to host order, but used as a
      host-order value when computing the bucket.
      
      Let's say the network address is written as n31 n30 ... n0, with n0
      being the least significant bit. When used directly (without any
      conversion) on a little endian machine, it becomes n7 ... n0 n8 ..n15
      etc in the machine's registers. Thus bits n7 and n8 would no longer be
      adjacent and 192.168.64.0/26 and 192.168.128.0/26 would no longer be
      consecutive.
      
      The fix is to apply ntohl() on the hmask before computing fshift,
      and in u32_hash_fold() convert the packet data to host order before
      shifting down by fshift.
      
      With helpful feedback from Jamal Hadi Salim and Jarek Poplawski.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      543821c6
    • E
      [PKT_SCHED]: Fix OOPS when removing devices from a teql queuing discipline · 4f9f8311
      Evgeniy Polyakov 提交于
      tecl_reset() is called from deactivate and qdisc is set to noop already,
      but subsequent teql_xmit does not know about it and dereference private
      data as teql qdisc and thus oopses.
      not catch it first :)
      Signed-off-by: NEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4f9f8311
  6. 26 10月, 2007 1 次提交
  7. 24 10月, 2007 1 次提交
  8. 22 10月, 2007 2 次提交