1. 27 Jan, 2015 7 commits
  2. 26 Jan, 2015 25 commits
  3. 25 Jan, 2015 8 commits
    • Harout Hedeshian's avatar
      net: ipv6: Add sysctl entry to disable MTU updates from RA · c2943f14
      Harout Hedeshian authored
      The kernel forcefully applies MTU values received in router
      advertisements provided the new MTU is less than the current. This
      behavior is undesirable when the user space is managing the MTU. Instead
      a sysctl flag 'accept_ra_mtu' is introduced such that the user space
      can control whether or not RA provided MTU updates should be applied. The
      default behavior is unchanged; user space must explicitly set this flag
      to 0 for RA MTUs to be ignored.
      Signed-off-by: default avatarHarout Hedeshian <harouth@codeaurora.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c2943f14
    • David S. Miller's avatar
      Merge branch 'fib_trie_next' · 46a93af2
      David S. Miller authored
      Alexander Duyck says:
      
      ====================
      Fixes and improvements for recent fib_trie updates
      
      While performing testing and prepping the next round of patches I found a
      few minor issues and improvements that could be made.
      
      These changes should help to reduce the overall code size and improve the
      performance slighlty as I noticed a 20ns or so improvement in my worst-case
      testing which will likely only result in a 1ns difference with a standard
      sized trie.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      46a93af2
    • Alexander Duyck's avatar
      fib_trie: Various clean-ups for handling slen · 64c62723
      Alexander Duyck authored
      While doing further work on the fib_trie I noted a few items.
      
      First I was using calls that were far more complicated than they needed to
      be for determining when to push/pull the suffix length.  I have updated the
      code to reflect the simplier logic.
      
      The second issue is that I realised we weren't necessarily handling the
      case of a leaf_info struct surviving a flush.  I have updated the logic so
      that now we will call pull_suffix in the event of having a leaf info value
      left in the leaf after flushing it.
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      64c62723
    • Alexander Duyck's avatar
      fib_trie: Move fib_find_alias to file where it is used · 02525368
      Alexander Duyck authored
      The function fib_find_alias is only accessed by functions in fib_trie.c as
      such it makes sense to relocate it and cast it as static so that the
      compiler can take advantage of optimizations it can do to it as a local
      function.
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      02525368
    • Alexander Duyck's avatar
      fib_trie: Use empty_children instead of counting empty nodes in stats collection · 30cfe7c9
      Alexander Duyck authored
      It doesn't make much sense to count the pointers ourselves when
      empty_children already has a count for the number of NULL pointers stored
      in the tnode.  As such save ourselves the cycles and just use
      empty_children.
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      30cfe7c9
    • Alexander Duyck's avatar
      fib_trie: Add collapse() and should_collapse() to resize · 95f60ea3
      Alexander Duyck authored
      This patch really does two things.
      
      First it pulls the logic for determining if we should collapse one node out
      of the tree and the actual code doing the collapse into a separate pair of
      functions.  This helps to make the changes to these areas more readable.
      
      Second it encodes the upper 32b of the empty_children value onto the
      full_children value in the case of bits == KEYLENGTH.  By doing this we are
      able to handle the case of a 32b node where empty_children would appear to
      be 0 when it was actually 1ul << 32.
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      95f60ea3
    • Alexander Duyck's avatar
      fib_trie: Fall back to slen update on inflate/halve failure · a80e89d4
      Alexander Duyck authored
      This change corrects an issue where if inflate or halve fails we were
      exiting the resize function without at least updating the slen for the
      node.  To correct this I have moved the update of max_size into the while
      loop so that it is only decremented on a successful call to either inflate
      or halve.
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a80e89d4
    • Alexander Duyck's avatar
      fib_trie: Fix RCU bug and merge similar bits of inflate/halve · 69fa57b1
      Alexander Duyck authored
      This patch addresses two issues.
      
      The first issue is the fact that I believe I had the RCU freeing sequence
      slightly out of order.  As a result we could get into an issue if a caller
      went into a child of a child of the new node, then backtraced into the to be
      freed parent, and then attempted to access a child of a child that may have
      been consumed in a resize of one of the new nodes children.  To resolve this I
      have moved the resize after we have freed the oldtnode.  The only side effect
      of this is that we will now be calling resize on more nodes in the case of
      inflate due to the fact that we don't have a good way to test to see if a
      full_tnode on the new node was there before or after the allocation.  This
      should have minimal impact however since the node should already be
      correctly size so it is just the cost of calling should_inflate that we
      will be taking on the node which is only a couple of cycles.
      
      The second issue is the fact that inflate and halve were essentially doing
      the same thing after the new node was added to the trie replacing the old
      one.  As such it wasn't really necessary to keep the code in both functions
      so I have split it out into two other functions, called replace and
      update_children.
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      69fa57b1