1. 09 7月, 2008 5 次提交
  2. 06 7月, 2008 1 次提交
  3. 28 6月, 2008 1 次提交
  4. 20 6月, 2008 1 次提交
  5. 18 6月, 2008 4 次提交
    • W
      netdevice: Fix promiscuity and allmulti overflow · dad9b335
      Wang Chen 提交于
      Max of promiscuity and allmulti plus positive @inc can cause overflow.
      Fox example: when allmulti=0xFFFFFFFF, any caller give dev_set_allmulti() a
      positive @inc will cause allmulti be off.
      This is not what we want, though it's rare case.
      The fix is that only negative @inc will cause allmulti or promiscuity be off
      and when any caller makes the counters touch the roof, we return error.
      
      Change of v2:
      Change void function dev_set_promiscuity/allmulti to return int.
      So callers can get the overflow error.
      Caller's fix will be done later.
      
      Change of v3:
      1. Since we return error to caller, we don't need to print KERN_ERROR,
      KERN_WARNING is enough.
      2. In dev_set_promiscuity(), if __dev_set_promiscuity() failed, we
      return at once.
      Signed-off-by: NWang Chen <wangchen@cn.fujitsu.com>
      Acked-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dad9b335
    • W
      netdevice: change net_device->promiscuity/allmulti to unsigned int · 9d45abe1
      Wang Chen 提交于
      The comments of dev_set_allmulti/promiscuity() is that "While the count in
      the device remains above zero...". So negative count is useless.
      Fix the type of the counter from "int" to "unsigned int".
      Signed-off-by: NWang Chen <wangchen@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9d45abe1
    • J
      bonding: Allow setting max_bonds to zero · b8a9787e
      Jay Vosburgh 提交于
      	Permit bonding to function rationally if max_bonds is set to
      zero.  This will load the module, but create no master devices (which can
      be created via sysfs).
      
      	Requires some change to bond_create_sysfs; currently, the
      netdev sysfs directory is determined from the first bonding device created,
      but this is no longer possible.  Instead, an interface from net/core is
      created to create and destroy files in net_class.
      
      	Based on a patch submitted by Phil Oester <kernel@linuxaces.com>.
      Modified by Jay Vosburgh to fix the sysfs issue mentioned above and to
      update the documentation.
      Signed-off-by: NPhil Oester <kernel@linuxace.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      b8a9787e
    • O
      net/core: add NETDEV_BONDING_FAILOVER event · c1da4ac7
      Or Gerlitz 提交于
      Add NETDEV_BONDING_FAILOVER event to be used in a successive patch
      by bonding to announce fail-over for the active-backup mode through the
      netdev events notifier chain mechanism. Such an event can be of use for the
      RDMA CM (communication manager) to let native RDMA ULPs (eg NFS-RDMA, iSER)
      always be aligned with the IP stack, in the sense that they use the same
      ports/links as the stack does. More usages can be done to allow monitoring
      tools based on netlink events being aware to bonding fail-over.
      Signed-off-by: NOr Gerlitz <ogerlitz@voltaire.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      c1da4ac7
  6. 23 5月, 2008 1 次提交
  7. 21 5月, 2008 1 次提交
  8. 13 5月, 2008 2 次提交
  9. 12 5月, 2008 1 次提交
    • D
      syncppp: Fix crashes. · 4951704b
      David S. Miller 提交于
      The syncppp layer wants a mid-level netdev private pointer.
      
      It was using netdev->priv but that only worked by accident,
      and thus this scheme was broken when the device private
      allocation strategy changed.
      
      Add a proper mid-layer private pointer for uses like this,
      update syncppp and all users, and remove the HDLC_PPP broken
      tag from drivers/net/wan/Kconfig
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4951704b
  10. 16 4月, 2008 1 次提交
  11. 04 4月, 2008 1 次提交
  12. 31 3月, 2008 1 次提交
  13. 29 3月, 2008 2 次提交
  14. 28 3月, 2008 1 次提交
    • D
      [NET]: Use local_irq_{save,restore}() in napi_complete(). · 50fd4407
      David S. Miller 提交于
      Based upon a lockdep report.
      
      Since ->poll() can be invoked from netpoll with interrupts
      disabled, we must not unconditionally enable interrupts
      in napi_complete().
      
      Instead we must use local_irq_{save,restore}().
      
      Noticed by Peter Zijlstra:
      
      <irqs disabled>
      
        netpoll_poll()
          poll_napi()
            spin_trylock(&napi->poll_lock)
            poll_one_napi()
              napi->poll() := sky2_poll()
                napi_complete()
                  local_irq_disable()
                  local_irq_enable() <--- *BUG*
      
        <irq>
          irq_exit()
            do_softirq()
              net_rx_action()
                spin_lock(&napi->poll_lock) <--- Deadlock!
      
      Because we still hold the lock....
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      50fd4407
  15. 26 3月, 2008 3 次提交
  16. 21 3月, 2008 1 次提交
    • P
      [NET]: Add per-connection option to set max TSO frame size · 82cc1a7a
      Peter P Waskiewicz Jr 提交于
      Update: My mailer ate one of Jarek's feedback mails...  Fixed the
      parameter in netif_set_gso_max_size() to be u32, not u16.  Fixed the
      whitespace issue due to a patch import botch.  Changed the types from
      u32 to unsigned int to be more consistent with other variables in the
      area.  Also brought the patch up to the latest net-2.6.26 tree.
      
      Update: Made gso_max_size container 32 bits, not 16.  Moved the
      location of gso_max_size within netdev to be less hotpath.  Made more
      consistent names between the sock and netdev layers, and added a
      define for the max GSO size.
      
      Update: Respun for net-2.6.26 tree.
      
      Update: changed max_gso_frame_size and sk_gso_max_size from signed to
      unsigned - thanks Stephen!
      
      This patch adds the ability for device drivers to control the size of
      the TSO frames being sent to them, per TCP connection.  By setting the
      netdevice's gso_max_size value, the socket layer will set the GSO
      frame size based on that value.  This will propogate into the TCP
      layer, and send TSO's of that size to the hardware.
      
      This can be desirable to help tune the bursty nature of TSO on a
      per-adapter basis, where one may have 1 GbE and 10 GbE devices
      coexisting in a system, one running multiqueue and the other not, etc.
      
      This can also be desirable for devices that cannot support full 64 KB
      TSO's, but still want to benefit from some level of segmentation
      offloading.
      Signed-off-by: NPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      82cc1a7a
  17. 14 2月, 2008 1 次提交
  18. 13 2月, 2008 1 次提交
  19. 01 2月, 2008 1 次提交
    • C
      [VLAN]: set_rx_mode support for unicast address list · e83a2ea8
      Chris Leech 提交于
      Reuse the existing logic for multicast list synchronization for the
      unicast address list. The core of dev_mc_sync/unsync are split out as
      __dev_addr_sync/unsync and moved from dev_mcast.c to dev.c.  These are
      then used to implement dev_unicast_sync/unsync as well.
      
      I'm working on cleaning up Intel's FCoE stack, which generates new MAC
      addresses from the fibre channel device id assigned by the fabric as
      per the current draft specification in T11.  When using such a
      protocol in a VLAN environment it would be nice to not always be
      forced into promiscuous mode, assuming the underlying Ethernet driver
      supports multiple unicast addresses as well.
      Signed-off-by: NChris Leech <christopher.leech@intel.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      e83a2ea8
  20. 09 1月, 2008 2 次提交
    • D
      [NET]: Add NAPI_STATE_DISABLE. · a0a46196
      David S. Miller 提交于
      Create a bit to signal that a napi_disable() is in progress.
      
      This sets up infrastructure such that net_rx_action() can generically
      break out of the ->poll() loop on a NAPI context that has a pending
      napi_disable() yet is being bombed with packets (and thus would
      otherwise poll endlessly and not allow the napi_disable() to finish).
      
      Now, what napi_disable() does is first set the NAPI_STATE_DISABLE bit
      (to indicate that a disable is pending), then it polls for the
      NAPI_STATE_SCHED bit, and once the NAPI_STATE_SCHED bit is acquired
      the NAPI_STATE_DISABLE bit is cleared.  Here, the test_and_set_bit()
      provides the necessary memory barrier between the various bitops.
      
      napi_schedule_prep() now tests for a pending disable as it's first
      action and won't try to obtain the NAPI_STATE_SCHED bit if a disable
      is pending.
      
      As a result, we can remove the netif_running() check in
      netif_rx_schedule_prep() because the NAPI disable pending state serves
      this purpose.  And, it does so in a NAPI centric manner which is what
      we really want.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a0a46196
    • D
      [NET]: Do not grab device reference when scheduling a NAPI poll. · bdb95b17
      David S. Miller 提交于
      It is pointless, because everything that can make a device go away
      will do a napi_disable() first.
      
      The main impetus behind this is that now we can legally do a NAPI
      completion in generic code like net_rx_action() which a following
      changeset needs to do.  net_rx_action() can only perform actions
      in NAPI centric ways, because there may be a one to many mapping
      between NAPI contexts and network devices (SKY2 is one example).
      
      We also want to get rid of this because it's an extra atomic in the
      NAPI paths, and also because it is one of the last instances where the
      NAPI interfaces care about net devices.
      
      The one remaining netdev detail the NAPI stuff cares about is the
      netif_running() check which will be killed off in a subsequent
      changeset.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bdb95b17
  21. 01 11月, 2007 1 次提交
  22. 26 10月, 2007 1 次提交
  23. 24 10月, 2007 2 次提交
  24. 22 10月, 2007 1 次提交
  25. 18 10月, 2007 2 次提交
  26. 14 10月, 2007 1 次提交
    • R
      net core: fix kernel-doc for new function parameters · c4ea43c5
      Randy Dunlap 提交于
      Fix networking code kernel-doc for newly added parameters.
      
      Warning(linux-2.6.23-git2//net/core/sock.c:879): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:570): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:594): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:617): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:641): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:667): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:722): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:959): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:1195): No description found for parameter 'dev'
      Warning(linux-2.6.23-git2//net/core/dev.c:2105): No description found for parameter 'n'
      Warning(linux-2.6.23-git2//net/core/dev.c:3272): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:3445): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//include/linux/netdevice.h:1301): No description found for parameter 'cpu'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c4ea43c5