1. 16 4月, 2011 2 次提交
  2. 15 4月, 2011 3 次提交
    • R
      Phonet: convert bound sockets hash list to RCU · 44f4d5a2
      Rémi Denis-Courmont 提交于
      This gets rid of the last spinlock in the Phonet stack proper.
      Signed-off-by: NRémi Denis-Courmont <remi.denis-courmont@nokia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      44f4d5a2
    • A
      ethtool: allow custom interval for physical identification · fce55922
      Allan, Bruce W 提交于
      When physical identification of an adapter is done by toggling the
      mechanism on and off through software utilizing the set_phys_id operation,
      it is done with a fixed duration for both on and off states.  Some drivers
      may want to set a custom duration for the on/off intervals.  This patch
      changes the API so the return code from the driver's entry point when it
      is called with ETHTOOL_ID_ACTIVE can specify the frequency at which to
      cycle the on/off states, and updates the drivers that have already been
      converted to use the new set_phys_id and use the synchronous method for
      identifying an adapter.
      
      The physical identification frequency set in the updated drivers is based
      on how it was done prior to the introduction of set_phys_id.
      
      Compile tested only.  Also fixes a compiler warning in sfc.
      
      v2: drivers do not return -EINVAL for ETHOOL_ID_ACTIVE
      v3: fold patchset into single patch and cleanup per Ben's feedback
      Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: Sathya Perla <sathya.perla@emulex.com>
      Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com>
      Cc: Ajit Khaparde <ajit.khaparde@emulex.com>
      Cc: Michael Chan <mchan@broadcom.com>
      Cc: Eilon Greenstein <eilong@broadcom.com>
      Cc: Divy Le Ray <divy@chelsio.com>
      Cc: Don Fry <pcnet32@frontier.com>
      Cc: Jon Mason <jdmason@kudzu.us>
      Cc: Solarflare linux maintainers <linux-net-drivers@solarflare.com>
      Cc: Steve Hodgson <shodgson@solarflare.com>
      Cc: Stephen Hemminger <shemminger@linux-foundation.org>
      Cc: Matt Carlson <mcarlson@broadcom.com>
      Acked-by: NJon Mason <jdmason@kudzu.us>
      Acked-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fce55922
    • D
      ipv4: Call fib_select_default() only when actually necessary. · 21d8c49e
      David S. Miller 提交于
      fib_select_default() is a complete NOP, and completely pointless
      to invoke, when we have no more than 1 default route installed.
      
      And this is far and away the common case.
      
      So remember how many prefixlen==0 routes we have in the routing
      table, and elide the call when we have no more than one of those.
      
      This cuts output route creation time by 157 cycles on Niagara2+.
      
      In order to add the new int to fib_table, we have to correct the type
      of ->tb_data[] to unsigned long, otherwise the private area will be
      unaligned on 64-bit systems.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Reviewed-by: NEric Dumazet <eric.dumazet@gmail.com>
      21d8c49e
  3. 14 4月, 2011 2 次提交
  4. 13 4月, 2011 4 次提交
  5. 12 4月, 2011 7 次提交
  6. 11 4月, 2011 2 次提交
  7. 08 4月, 2011 5 次提交
  8. 07 4月, 2011 4 次提交
  9. 06 4月, 2011 2 次提交
  10. 05 4月, 2011 9 次提交
    • G
      Bluetooth: Don't use spin_lock_bh in user context · 1322901d
      Gustavo F. Padovan 提交于
      spin_lock() and spin_unlock() are more apropiated for user context.
      Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
      1322901d
    • S
      Bluetooth: Use kthread API in cmtp · fada4ac3
      Szymon Janc 提交于
      kernel_thread() is a low-level implementation detail and
      EXPORT_SYMBOL(kernel_thread) is scheduled for removal.
      Use the <linux/kthread.h> API instead.
      Signed-off-by: NSzymon Janc <szymon.janc@tieto.com>
      Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
      fada4ac3
    • S
      Bluetooth: Use kthread API in bnep · f4d7cd4a
      Szymon Janc 提交于
      kernel_thread() is a low-level implementation detail and
      EXPORT_SYMBOL(kernel_thread) is scheduled for removal.
      Use the <linux/kthread.h> API instead.
      Signed-off-by: NSzymon Janc <szymon.janc@tieto.com>
      Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
      f4d7cd4a
    • S
      Bluetooth: Use kthread API in hidp · aabf6f89
      Szymon Janc 提交于
      kernel_thread() is a low-level implementation detail and
      EXPORT_SYMBOL(kernel_thread) is scheduled for removal.
      Use the <linux/kthread.h> API instead.
      Signed-off-by: NSzymon Janc <szymon.janc@tieto.com>
      Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
      aabf6f89
    • B
      ethtool: Change ETHTOOL_PHYS_ID implementation to allow dropping RTNL · 68f512f2
      Ben Hutchings 提交于
      The ethtool ETHTOOL_PHYS_ID command runs for an arbitrarily long
      period of time, holding the RTNL lock.  This blocks routing updates,
      device enumeration, and various important operations that one might
      want to keep running while hunting for the flashing LED.
      
      We need to drop the RTNL lock during this operation, but currently the
      core implementation is a thin wrapper around a driver operation and
      drivers may well depend upon holding the lock.
      
      Define a new driver operation 'set_phys_id' with an argument that sets
      the ID indicator on/off/inactive/active (the last optional, for any
      driver or firmware that prefers to handle blinking asynchronously).
      When this is defined, the ethtool core drops the lock while waiting
      and only acquires it around calls to this operation.
      
      Deprecate the 'phys_id' operation in favour of this.  It can be
      removed once all in-tree drivers are converted.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      68f512f2
    • T
      net: Allow no-cache copy from user on transmit · c6e1a0d1
      Tom Herbert 提交于
      This patch uses __copy_from_user_nocache on transmit to bypass data
      cache for a performance improvement.  skb_add_data_nocache and
      skb_copy_to_page_nocache can be called by sendmsg functions to use
      this feature, initial support is in tcp_sendmsg.  This functionality is
      configurable per device using ethtool.
      
      Presumably, this feature would only be useful when the driver does
      not touch the data.  The feature is turned on by default if a device
      indicates that it does some form of checksum offload; it is off by
      default for devices that do no checksum offload or indicate no checksum
      is necessary.  For the former case copy-checksum is probably done
      anyway, in the latter case the device is likely loopback in which case
      the no cache copy is probably not beneficial.
      
      This patch was tested using 200 instances of netperf TCP_RR with
      1400 byte request and one byte reply.  Platform is 16 core AMD x86.
      
      No-cache copy disabled:
         672703 tps, 97.13% utilization
         50/90/99% latency:244.31 484.205 1028.41
      
      No-cache copy enabled:
         702113 tps, 96.16% utilization,
         50/90/99% latency 238.56 467.56 956.955
      
      Using 14000 byte request and response sizes demonstrate the
      effects more dramatically:
      
      No-cache copy disabled:
         79571 tps, 34.34 %utlization
         50/90/95% latency 1584.46 2319.59 5001.76
      
      No-cache copy enabled:
         83856 tps, 34.81% utilization
         50/90/95% latency 2508.42 2622.62 2735.88
      
      Note especially the effect on latency tail (95th percentile).
      
      This seems to provide a nice performance improvement and is
      consistent in the tests I ran.  Presumably, this would provide
      the greatest benfits in the presence of an application workload
      stressing the cache and a lot of transmit data happening.
      Signed-off-by: NTom Herbert <therbert@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c6e1a0d1
    • S
      bridge: range check STP parameters · 14f98f25
      stephen hemminger 提交于
      Apply restrictions on STP parameters based 802.1D 1998 standard.
         * Fixes missing locking in set path cost ioctl
         * Uses common code for both ioctl and sysfs
      
      This is based on an earlier patch Sasikanth V but with overhaul.
      
      Note:
      1. It does NOT enforce the restriction on the relationship max_age and
         forward delay or hello time because in existing implementation these are
         set as independant operations.
      
      2. If STP is disabled, there is no restriction on forward delay
      
      3. No restriction on holding time because users use Linux code to act
         as hub or be sticky.
      
      4. Although standard allow 0-255, Linux only allows 0-63 for port priority
         because more bits are reserved for port number.
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      14f98f25
    • S
      bridge: allow creating bridge devices with netlink · bb900b27
      stephen hemminger 提交于
      Add netlink device ops to allow creating bridge device via netlink.
      This works in a manner similar to vlan, macvlan and bonding.
      
      Example:
        # ip link add link dev br0 type bridge
        # ip link del dev br0
      
      The change required rearranging initializtion code to deal with
      being called by create link. Most of the initialization happens
      in br_dev_setup, but allocation of stats is done in ndo_init callback
      to deal with allocation failure. Sysfs setup has to wait until
      after the network device kobject is registered.
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bb900b27
    • S
      bridge: allow creating/deleting fdb entries via netlink · 36fd2b63
      stephen hemminger 提交于
      Use RTM_NEWNEIGH and RTM_DELNEIGH to allow updating of entries
      in bridge forwarding table. This allows manipulating static entries
      which is not possible with existing tools.
      
      Example (using bridge extensions to iproute2)
         # br fdb add 00:02:03:04:05:06 dev eth0
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      36fd2b63