1. 22 6月, 2015 1 次提交
  2. 08 6月, 2015 1 次提交
    • F
      fib_trie: coding style: Use pointer after check · f38b24c9
      Firo Yang 提交于
      As Alexander Duyck pointed out that:
      struct tnode {
              ...
              struct key_vector kv[1];
      }
      The kv[1] member of struct tnode is an arry that refernced by
      a null pointer will not crash the system, like this:
      struct tnode *p = NULL;
      struct key_vector *kv = p->kv;
      As such p->kv doesn't actually dereference anything, it is simply a
      means for getting the offset to the array from the pointer p.
      
      This patch make the code more regular to avoid making people feel
      odd when they look at the code.
      Signed-off-by: NFiro Yang <firogm@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f38b24c9
  3. 27 5月, 2015 1 次提交
    • D
      ipv4: Fix fib_trie.c build, missing linux/vmalloc.h include. · ffa915d0
      David S. Miller 提交于
      We used to get this indirectly I supposed, but no longer do.
      
      Either way, an explicit include should have been done in the
      first place.
      
         net/ipv4/fib_trie.c: In function '__node_free_rcu':
      >> net/ipv4/fib_trie.c:293:3: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]
            vfree(n);
            ^
         net/ipv4/fib_trie.c: In function 'tnode_alloc':
      >> net/ipv4/fib_trie.c:312:3: error: implicit declaration of function 'vzalloc' [-Werror=implicit-function-declaration]
            return vzalloc(size);
            ^
      >> net/ipv4/fib_trie.c:312:3: warning: return makes pointer from integer without a cast
         cc1: some warnings being treated as errors
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ffa915d0
  4. 23 5月, 2015 1 次提交
  5. 15 5月, 2015 1 次提交
  6. 13 5月, 2015 1 次提交
  7. 04 4月, 2015 2 次提交
  8. 24 3月, 2015 1 次提交
  9. 13 3月, 2015 1 次提交
    • A
      fib_trie: Provide a deterministic order for fib_alias w/ tables merged · 0b65bd97
      Alexander Duyck 提交于
      This change makes it so that we should always have a deterministic ordering
      for the main and local aliases within the merged table when two leaves
      overlap.
      
      So for example if we have a leaf with a key of 192.168.254.0.  If we
      previously added two aliases with a prefix length of 24 from both local and
      main the first entry would be first and the second would be second.  When I
      was coding this I had added a WARN_ON should such a situation occur as I
      wasn't sure how likely it would be.  However this WARN_ON has been
      triggered so this is something that should be addressed.
      
      With this patch the ordering of the aliases is as follows.  First they are
      sorted on prefix length, then on their table ID, then tos, and finally
      priority.  This way what we end up doing is essentially interleaving the
      two tables on what used to be leaf_info structure boundaries.
      
      Fixes: 0ddcf43d ("ipv4: FIB Local/MAIN table collapse")
      Reported-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0b65bd97
  10. 12 3月, 2015 2 次提交
    • A
      fib_trie: Only display main table in /proc/net/route · 654eff45
      Alexander Duyck 提交于
      When we merged the tries for local and main I had overlooked the iterator
      for /proc/net/route.  As a result it was outputting both local and main
      when the two tries were merged.
      
      This patch resolves that by only providing output for aliases that are
      actually in the main trie.  As a result we should go back to the original
      behavior which I assume will be necessary to maintain legacy support.
      
      Fixes: 0ddcf43d ("ipv4: FIB Local/MAIN table collapse")
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      654eff45
    • A
      ipv4: FIB Local/MAIN table collapse · 0ddcf43d
      Alexander Duyck 提交于
      This patch is meant to collapse local and main into one by converting
      tb_data from an array to a pointer.  Doing this allows us to point the
      local table into the main while maintaining the same variables in the
      table.
      
      As such the tb_data was converted from an array to a pointer, and a new
      array called data is added in order to still provide an object for tb_data
      to point to.
      
      In order to track the origin of the fib aliases a tb_id value was added in
      a hole that existed on 64b systems.  Using this we can also reverse the
      merge in the event that custom FIB rules are enabled.
      
      With this patch I am seeing an improvement of 20ns to 30ns for routing
      lookups as long as custom rules are not enabled, with custom rules enabled
      we fall back to split tables and the original behavior.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0ddcf43d
  11. 11 3月, 2015 2 次提交
  12. 10 3月, 2015 1 次提交
  13. 07 3月, 2015 10 次提交
  14. 06 3月, 2015 3 次提交
  15. 05 3月, 2015 8 次提交
  16. 28 2月, 2015 4 次提交