1. 01 7月, 2006 2 次提交
  2. 23 6月, 2006 2 次提交
    • H
      [NET]: Add generic segmentation offload · f6a78bfc
      Herbert Xu 提交于
      This patch adds the infrastructure for generic segmentation offload.
      The idea is to tap into the potential savings of TSO without hardware
      support by postponing the allocation of segmented skb's until just
      before the entry point into the NIC driver.
      
      The same structure can be used to support software IPv6 TSO, as well as
      UFO and segmentation offload for other relevant protocols, e.g., DCCP.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f6a78bfc
    • H
      [NET]: Prevent transmission after dev_deactivate · d4828d85
      Herbert Xu 提交于
      The dev_deactivate function has bit-rotted since the introduction of
      lockless drivers.  In particular, the spin_unlock_wait call at the end
      has no effect on the xmit routine of lockless drivers.
      
      With a little bit of work, we can make it much more useful by providing
      the guarantee that when it returns, no more calls to the xmit routine
      of the underlying driver will be made.
      
      The idea is simple.  There are two entry points in to the xmit routine.
      The first comes from dev_queue_xmit.  That one is easily stopped by
      using synchronize_rcu.  This works because we set the qdisc to noop_qdisc
      before the synchronize_rcu call.  That in turn causes all subsequent
      packets sent to dev_queue_xmit to be dropped.  The synchronize_rcu call
      also ensures all outstanding calls leave their critical section.
      
      The other entry point is from qdisc_run.  Since we now have a bit that
      indicates whether it's running, all we have to do is to wait until the
      bit is off.
      
      I've removed the loop to wait for __LINK_STATE_SCHED to clear.  This is
      useless because netif_wake_queue can cause it to be set again.  It is
      also harmless because we've disarmed qdisc_run.
      
      I've also removed the spin_unlock_wait on xmit_lock because its only
      purpose of making sure that all outstanding xmit_lock holders have
      exited is also given by dev_watchdog_down.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d4828d85
  3. 20 6月, 2006 1 次提交
    • H
      [NET]: Prevent multiple qdisc runs · 48d83325
      Herbert Xu 提交于
      Having two or more qdisc_run's contend against each other is bad because
      it can induce packet reordering if the packets have to be requeued.  It
      appears that this is an unintended consequence of relinquinshing the queue
      lock while transmitting.  That in turn is needed for devices that spend a
      lot of time in their transmit routine.
      
      There are no advantages to be had as devices with queues are inherently
      single-threaded (the loopback device is not but then it doesn't have a
      queue).
      
      Even if you were to add a queue to a parallel virtual device (e.g., bolt
      a tbf filter in front of an ipip tunnel device), you would still want to
      process the queue in sequence to ensure that the packets are ordered
      correctly.
      
      The solution here is to steal a bit from net_device to prevent this.
      
      BTW, as qdisc_restart is no longer used by anyone as a module inside the
      kernel (IIRC it used to with netif_wake_queue), I have not exported the
      new __qdisc_run function.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48d83325
  4. 18 6月, 2006 1 次提交
    • H
      [NET]: Add netif_tx_lock · 932ff279
      Herbert Xu 提交于
      Various drivers use xmit_lock internally to synchronise with their
      transmission routines.  They do so without setting xmit_lock_owner.
      This is fine as long as netpoll is not in use.
      
      With netpoll it is possible for deadlocks to occur if xmit_lock_owner
      isn't set.  This is because if a printk occurs while xmit_lock is held
      and xmit_lock_owner is not set can cause netpoll to attempt to take
      xmit_lock recursively.
      
      While it is possible to resolve this by getting netpoll to use
      trylock, it is suboptimal because netpoll's sole objective is to
      maximise the chance of getting the printk out on the wire.  So
      delaying or dropping the message is to be avoided as much as possible.
      
      So the only alternative is to always set xmit_lock_owner.  The
      following patch does this by introducing the netif_tx_lock family of
      functions that take care of setting/unsetting xmit_lock_owner.
      
      I renamed xmit_lock to _xmit_lock to indicate that it should not be
      used directly.  I didn't provide irq versions of the netif_tx_lock
      functions since xmit_lock is meant to be a BH-disabling lock.
      
      This is pretty much a straight text substitution except for a small
      bug fix in winbond.  It currently uses
      netif_stop_queue/spin_unlock_wait to stop transmission.  This is
      unsafe as an IRQ can potentially wake up the queue.  So it is safer to
      use netif_tx_disable.
      
      The hamradio bits used spin_lock_irq but it is unnecessary as
      xmit_lock must never be taken in an IRQ handler.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      932ff279
  5. 17 5月, 2006 1 次提交
  6. 12 5月, 2006 1 次提交
  7. 30 4月, 2006 1 次提交
  8. 25 4月, 2006 1 次提交
  9. 10 4月, 2006 1 次提交
  10. 23 3月, 2006 1 次提交
  11. 21 3月, 2006 8 次提交
  12. 13 3月, 2006 1 次提交
  13. 18 1月, 2006 1 次提交
  14. 17 1月, 2006 1 次提交
  15. 14 1月, 2006 1 次提交
  16. 13 1月, 2006 1 次提交
    • H
      [NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables · 2e4e6a17
      Harald Welte 提交于
      This monster-patch tries to do the best job for unifying the data
      structures and backend interfaces for the three evil clones ip_tables,
      ip6_tables and arp_tables.  In an ideal world we would never have
      allowed this kind of copy+paste programming... but well, our world
      isn't (yet?) ideal.
      
      o introduce a new x_tables module
      o {ip,arp,ip6}_tables depend on this x_tables module
      o registration functions for tables, matches and targets are only
        wrappers around x_tables provided functions
      o all matches/targets that are used from ip_tables and ip6_tables
        are now implemented as xt_FOOBAR.c files and provide module aliases
        to ipt_FOOBAR and ip6t_FOOBAR
      o header files for xt_matches are in include/linux/netfilter/,
        include/linux/netfilter_{ipv4,ipv6} contains compatibility wrappers
        around the xt_FOOBAR.h headers
      
      Based on this patchset we're going to further unify the code,
      gradually getting rid of all the layer 3 specific assumptions.
      Signed-off-by: NHarald Welte <laforge@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e4e6a17
  17. 12 1月, 2006 2 次提交
  18. 10 1月, 2006 7 次提交
  19. 04 1月, 2006 2 次提交
  20. 14 12月, 2005 1 次提交
  21. 21 11月, 2005 1 次提交
  22. 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
  23. 09 11月, 2005 1 次提交