1. 05 Apr, 2011 8 commits
    • Tom Herbert's avatar
      net: Allow no-cache copy from user on transmit · c6e1a0d1
      Tom Herbert authored
      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: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c6e1a0d1
    • stephen hemminger's avatar
      bridge: range check STP parameters · 14f98f25
      stephen hemminger authored
      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: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      14f98f25
    • stephen hemminger's avatar
      bridge: allow creating bridge devices with netlink · bb900b27
      stephen hemminger authored
      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: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bb900b27
    • stephen hemminger's avatar
      bridge: allow creating/deleting fdb entries via netlink · 36fd2b63
      stephen hemminger authored
      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: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      36fd2b63
    • stephen hemminger's avatar
      bridge: add netlink notification on forward entry changes · b078f0df
      stephen hemminger authored
      This allows applications to query and monitor bridge forwarding
      table in the same method used for neighbor table. The forward table
      entries are returned in same structure format as used by the ioctl.
      If more information is desired in future, the netlink method is
      extensible.
      
      Example (using bridge extensions to iproute2)
        # br monitor
      Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b078f0df
    • stephen hemminger's avatar
      bridge: split rcu and no-rcu cases of fdb lookup · 664de48b
      stephen hemminger authored
      In some cases, look up of forward database entry is done with RCU;
      and for others no RCU is needed because of locking. Split the two
      cases into two differnt loops (and take off inline).
      Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      664de48b
    • stephen hemminger's avatar
      bridge: track last used time in forwarding table · 7cd8861a
      stephen hemminger authored
      Adds tracking the last used time in forwarding table.
      Rename ageing_timer to updated to better describe it.
      Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7cd8861a
    • stephen hemminger's avatar
      bridge: change arguments to fdb_create · 03e9b64b
      stephen hemminger authored
      Later patch provides ability to create non-local static entry.
      To make this easier move the updating of the flag values to
      after the code that creates entry.
      Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      03e9b64b
  2. 04 Apr, 2011 6 commits
  3. 03 Apr, 2011 2 commits
  4. 02 Apr, 2011 13 commits
  5. 01 Apr, 2011 5 commits
  6. 31 Mar, 2011 6 commits