1. 17 Jul, 2016 7 commits
    • Nikolay Aleksandrov's avatar
      net: ipmr/ip6mr: add support for keeping an entry age · 43b9e127
      Nikolay Aleksandrov authored
      In preparation for hardware offloading of ipmr/ip6mr we need an
      interface that allows to check (and later update) the age of entries.
      Relying on stats alone can show activity but not actual age of the entry,
      furthermore when there're tens of thousands of entries a lot of the
      hardware implementations only support "hit" bits which are cleared on
      read to denote that the entry was active and shouldn't be aged out,
      these can then be naturally translated into age timestamp and will be
      compatible with the software forwarding age. Using a lastuse entry doesn't
      affect performance because the members in that cache line are written to
      along with the age.
      Since all new users are encouraged to use ipmr via netlink, this is
      exported via the RTA_EXPIRES attribute.
      Also do a minor local variable declaration style adjustment - arrange them
      longest to shortest.
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      CC: Roopa Prabhu <roopa@cumulusnetworks.com>
      CC: Shrijeet Mukherjee <shm@cumulusnetworks.com>
      CC: Satish Ashok <sashok@cumulusnetworks.com>
      CC: Donald Sharp <sharpd@cumulusnetworks.com>
      CC: David S. Miller <davem@davemloft.net>
      CC: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      CC: James Morris <jmorris@namei.org>
      CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      CC: Patrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      43b9e127
    • Kristian Evensen's avatar
      rndis_host: Set valid random MAC on buggy devices · a5a18bdf
      Kristian Evensen authored
      Some devices of the same type all export the same, random MAC address. This
      behavior has been seen on the ZTE MF910, MF823 and MF831, and there are
      probably more devices out there. Fix this by generating a valid random MAC
      address if we read a random MAC from device.
      
      Also, changed the memcpy() to ether_addr_copy(), as pointed out by
      checkpatch.
      Suggested-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarKristian Evensen <kristian.evensen@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a5a18bdf
    • David S. Miller's avatar
      Merge branch 'bridge-rx-simplify-fwd-consolidate' · 43de8746
      David S. Miller authored
      Nikolay Aleksandrov says:
      
      ====================
      net: bridge: simplify receive path and consolidate forwarding paths
      
      This set tries to simplify the receive and forwarding paths. Patch 01 is
      a trivial style adjustment, patch 02 removes one conditional from the
      unicast fast path, patch 03 removes another conditional and more imporantly
      removes the skb0/skb2 ambiguity about locally receiving the skb and
      switches to a boolean called "local_rcv".
      Patch 04 is the most important change which consolidates the forwarding
      paths for locally originated and forwarded packets into __br_forward. This
      allows us to remove the function pointers giving a minor performance boost,
      more importantly it makes it much easier to reason about the forwarding
      path and reduces the code duplication that was needed when making changes.
      Also it allows the receive path to fully setup the environment prior to
      calling any forwarding functions (i.e. to properly set unicast, local_rcv
      and search for unicast/mcast dst).
      Functionally everything should stay the same after this set.
      
      I've done basic tests with unicast/multicast/broadcast Tx/Rx. Please
      review carefully.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      43de8746
    • Nikolay Aleksandrov's avatar
      net: bridge: remove _deliver functions and consolidate forward code · 37b090e6
      Nikolay Aleksandrov authored
      Before this patch we had two flavors of most forwarding functions -
      _forward and _deliver, the difference being that the latter are used
      when the packets are locally originated. Instead of all this function
      pointer passing and code duplication, we can just pass a boolean noting
      that the packet was locally originated and use that to perform the
      necessary checks in __br_forward. This gives a minor performance
      improvement but more importantly consolidates the forwarding paths.
      Also add a kernel doc comment to explain the exported br_forward()'s
      arguments.
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      37b090e6
    • Nikolay Aleksandrov's avatar
      net: bridge: drop skb2/skb0 variables and use a local_rcv boolean · b35c5f63
      Nikolay Aleksandrov authored
      Currently if the packet is going to be received locally we set skb0 or
      sometimes called skb2 variables to the original skb. This can get
      confusing and also we can avoid one conditional on the fast path by
      simply using a boolean and passing it around. Thanks to Roopa for the
      name suggestion.
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b35c5f63
    • Nikolay Aleksandrov's avatar
      net: bridge: rearrange flood vs unicast receive paths · e151aab9
      Nikolay Aleksandrov authored
      This patch removes one conditional from the unicast path by using the fact
      that skb is NULL only when the packet is multicast or is local.
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e151aab9
    • Nikolay Aleksandrov's avatar
      net: bridge: minor style adjustments in br_handle_frame_finish · 46c0772d
      Nikolay Aleksandrov authored
      Trivial style changes in br_handle_frame_finish.
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      46c0772d
  2. 16 Jul, 2016 1 commit
  3. 15 Jul, 2016 32 commits