1. 31 Oct, 2012 11 commits
    • Willem de Bruijn's avatar
      net: compute skb->rxhash if nic hash may be 3-tuple · ecd5cf5d
      Willem de Bruijn authored
      Network device drivers can communicate a Toeplitz hash in skb->rxhash,
      but devices differ in their hashing capabilities. All compute a 5-tuple
      hash for TCP over IPv4, but for other connection-oriented protocols,
      they may compute only a 3-tuple. This breaks RPS load balancing, e.g.,
      for TCP over IPv6 flows. Additionally, for GRE and other tunnels,
      the kernel computes a 5-tuple hash over the inner packet if possible,
      but devices do not.
      
      This patch recomputes the rxhash in software in all cases where it
      cannot be certain that a 5-tuple was computed. Device drivers can avoid
      recomputation by setting the skb->l4_rxhash flag.
      
      Recomputing adds cycles to each packet when RPS is enabled or the
      packet arrives over a tunnel. A comparison of 200x TCP_STREAM between
      two servers running unmodified netnext with rxhash computation
      in hardware vs software (using ethtool -K eth0 rxhash [on|off]) shows
      how much time is spent in __skb_get_rxhash in this worst case:
      
           0.03%          swapper  [kernel.kallsyms]     [k] __skb_get_rxhash
           0.03%          swapper  [kernel.kallsyms]     [k] __skb_get_rxhash
           0.05%          swapper  [kernel.kallsyms]     [k] __skb_get_rxhash
      
      With 200x TCP_RR it increases to
      
           0.10%          netperf  [kernel.kallsyms]     [k] __skb_get_rxhash
           0.10%          netperf  [kernel.kallsyms]     [k] __skb_get_rxhash
           0.10%          netperf  [kernel.kallsyms]     [k] __skb_get_rxhash
      
      I considered having the patch explicitly skips recomputation when it knows
      that it will not improve the hash (TCP over IPv4), but that conditional
      complicates code without saving many cycles in practice, because it has
      to take place after flow dissector.
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ecd5cf5d
    • Devendra Naga's avatar
      dlink: dl2k: use the module_pci_driver macro · 9add4d81
      Devendra Naga authored
      use the module_pci_driver macro to make the code simpler
      by eliminating module_init and module_exit calls.
      Signed-off-by: default avatarDevendra Naga <devendra.aaru@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9add4d81
    • Devendra Naga's avatar
      realtek: r8169: use module_pci_driver macro · 3eeb7da9
      Devendra Naga authored
      use the module_pci_driver macro to make the code simpler
      by eliminating the module_init and module_exit calls
      Signed-off-by: default avatarDevendra Naga <devendra.aaru@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3eeb7da9
    • David S. Miller's avatar
      Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge · 15708381
      David S. Miller authored
      included changes:
      - some code cleanups and minor fixes (3 of them were reported by Coverity)
      - 'struct hard_iface' re-shaping to improve multi-protocol support
      - ECTP packets silent drop
      - transfer the WIFI flag on clients in case of roaming
      15708381
    • Wei Yongjun's avatar
      qla3xxx: remove unused variable in ql_process_mac_tx_intr() · 1627801d
      Wei Yongjun authored
      The variable retval is initialized but never used
      otherwise, so remove the unused variable.
      
      dpatch engine is used to auto generate this patch.
      (https://github.com/weiyj/dpatch)
      Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Acked-by: default avatarJitendra Kalsaria <jitendra.kalsaria@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1627801d
    • Wei Yongjun's avatar
      qla3xxx: use module_pci_driver to simplify the code · 680d8669
      Wei Yongjun authored
      Use the module_pci_driver() macro to make the code simpler
      by eliminating module_init and module_exit calls.
      
      dpatch engine is used to auto generate this patch.
      (https://github.com/weiyj/dpatch)
      Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Acked-by: default avatarJitendra Kalsaria <jitendra.kalsaria@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      680d8669
    • Steve Glendinning's avatar
      smsc95xx: add wol support for more frame types · bbd9f9ee
      Steve Glendinning authored
      This patch adds support for wol wakeup on unicast, broadcast,
      multicast and arp frames.
      
      The wakeup filter code isn't pretty, but it works.
      Signed-off-by: default avatarSteve Glendinning <steve.glendinning@shawell.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bbd9f9ee
    • Claudio Fontana's avatar
      net/ipv4/ipconfig: add device address to a KERN_INFO message · 9ecd1c3d
      Claudio Fontana authored
      adds a "hwaddr" to the "IP-Config: Complete" KERN_INFO message
      with the dev_addr of the device selected for auto configuration.
      Signed-off-by: default avatarClaudio Fontana <claudio.fontana@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9ecd1c3d
    • John Fastabend's avatar
      ixgbe: add setlink, getlink support to ixgbe and ixgbevf · 815cccbf
      John Fastabend authored
      This adds support for the net device ops to manage the embedded
      hardware bridge on ixgbe devices. With this patch the bridge
      mode can be toggled between VEB and VEPA to support stacking
      macvlan devices or using the embedded switch without any SW
      component in 802.1Qbg/br environments.
      
      Additionally, this adds source address pruning to the ixgbevf
      driver to prune any frames sent back from a reflective relay on
      the switch. This is required because the existing hardware does
      not support this. Without it frames get pushed into the stack
      with its own src mac which is invalid per 802.1Qbg VEPA
      definition.
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      815cccbf
    • John Fastabend's avatar
      net: set and query VEB/VEPA bridge mode via PF_BRIDGE · 2469ffd7
      John Fastabend authored
      Hardware switches may support enabling and disabling the
      loopback switch which puts the device in a VEPA mode defined
      in the IEEE 802.1Qbg specification. In this mode frames are
      not switched in the hardware but sent directly to the switch.
      SR-IOV capable NICs will likely support this mode I am
      aware of at least two such devices. Also I am told (but don't
      have any of this hardware available) that there are devices
      that only support VEPA modes. In these cases it is important
      at a minimum to be able to query these attributes.
      
      This patch adds an additional IFLA_BRIDGE_MODE attribute that can be
      set and dumped via the PF_BRIDGE:{SET|GET}LINK operations. Also
      anticipating bridge attributes that may be common for both embedded
      bridges and software bridges this adds a flags attribute
      IFLA_BRIDGE_FLAGS currently used to determine if the command or event
      is being generated to/from an embedded bridge or software bridge.
      Finally, the event generation is pulled out of the bridge module and
      into rtnetlink proper.
      
      For example using the macvlan driver in VEPA mode on top of
      an embedded switch requires putting the embedded switch into
      a VEPA mode to get the expected results.
      
      	--------  --------
              | VEPA |  | VEPA |       <-- macvlan vepa edge relays
              --------  --------
                 |        |
                 |        |
              ------------------
              |      VEPA      |       <-- embedded switch in NIC
              ------------------
                      |
                      |
              -------------------
              | external switch |      <-- shiny new physical
      	-------------------          switch with VEPA support
      
      A packet sent from the macvlan VEPA at the top could be
      loopbacked on the embedded switch and never seen by the
      external switch. So in order for this to work the embedded
      switch needs to be set in the VEPA state via the above
      described commands.
      
      By making these attributes nested in IFLA_AF_SPEC we allow
      future extensions to be made as needed.
      
      CC: Lennert Buytenhek <buytenh@wantstofly.org>
      CC: Stephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2469ffd7
    • John Fastabend's avatar
      net: create generic bridge ops · e5a55a89
      John Fastabend authored
      The PF_BRIDGE:RTM_{GET|SET}LINK nlmsg family and type are
      currently embedded in the ./net/bridge module. This prohibits
      them from being used by other bridging devices. One example
      of this being hardware that has embedded bridging components.
      
      In order to use these nlmsg types more generically this patch
      adds two net_device_ops hooks. One to set link bridge attributes
      and another to dump the current bride attributes.
      
      	ndo_bridge_setlink()
      	ndo_bridge_getlink()
      
      CC: Lennert Buytenhek <buytenh@wantstofly.org>
      CC: Stephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e5a55a89
  2. 29 Oct, 2012 16 commits
  3. 28 Oct, 2012 8 commits
  4. 26 Oct, 2012 5 commits
    • David S. Miller's avatar
      Merge branch 'master' of git://1984.lsi.us.es/nf-next · f019948d
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      The following changeset contains updates for IPVS from Jesper Dangaard
      Brouer that did not reach the previous merge window in time.
      
      More specifically, updates to improve IPv6 support in IPVS. More
      relevantly, some of the existing code performed wrong handling of the
      extensions headers and better fragmentation handling.
      
      Jesper promised more follow-up patches to refine this after this batch
      hits net-next. Yet to come.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f019948d
    • David S. Miller's avatar
      net: Update args to dummy sock_update_classid(). · dc95a2c0
      David S. Miller authored
      Only the real implementation got updated.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dc95a2c0
    • Alan Cox's avatar
      l2tp: session is an array not a pointer · e269ed26
      Alan Cox authored
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e269ed26
    • Alan Cox's avatar
      isdn: remove dead code · 0f15b151
      Alan Cox authored
      multi is assigned to 0 and then acts as a constant. Remove the dead
      code.
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0f15b151
    • Daniel Wagner's avatar
      cgroup: net_cls: Rework update socket logic · 6a328d8c
      Daniel Wagner authored
      The cgroup logic part of net_cls is very similar as the one in
      net_prio. Let's stream line the net_cls logic with the net_prio one.
      
      The net_prio update logic was changed by following commit (note there
      were some changes necessary later on)
      
      commit 406a3c63
      Author: John Fastabend <john.r.fastabend@intel.com>
      Date:   Fri Jul 20 10:39:25 2012 +0000
      
          net: netprio_cgroup: rework update socket logic
      
          Instead of updating the sk_cgrp_prioidx struct field on every send
          this only updates the field when a task is moved via cgroup
          infrastructure.
      
          This allows sockets that may be used by a kernel worker thread
          to be managed. For example in the iscsi case today a user can
          put iscsid in a netprio cgroup and control traffic will be sent
          with the correct sk_cgrp_prioidx value set but as soon as data
          is sent the kernel worker thread isssues a send and sk_cgrp_prioidx
          is updated with the kernel worker threads value which is the
          default case.
      
          It seems more correct to only update the field when the user
          explicitly sets it via control group infrastructure. This allows
          the users to manage sockets that may be used with other threads.
      
      Since classid is now updated when the task is moved between the
      cgroups, we don't have to call sock_update_classid() from various
      places to ensure we always using the latest classid value.
      
      [v2: Use iterate_fd() instead of open coding]
      Signed-off-by: default avatarDaniel Wagner <daniel.wagner@bmw-carit.de>
      Cc:  Li Zefan <lizefan@huawei.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: John Fastabend <john.r.fastabend@intel.com>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: Stanislav Kinsbursky <skinsbursky@parallels.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: <netdev@vger.kernel.org>
      Cc: <cgroups@vger.kernel.org>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6a328d8c