1. 19 2月, 2013 1 次提交
  2. 19 9月, 2012 1 次提交
  3. 11 9月, 2012 1 次提交
  4. 08 9月, 2012 1 次提交
  5. 15 8月, 2012 1 次提交
  6. 09 8月, 2012 1 次提交
  7. 08 8月, 2012 1 次提交
  8. 30 7月, 2012 2 次提交
  9. 13 7月, 2012 1 次提交
  10. 11 6月, 2012 1 次提交
  11. 04 6月, 2012 1 次提交
    • J
      net: Remove casts to same type · e3192690
      Joe Perches 提交于
      Adding casts of objects to the same type is unnecessary
      and confusing for a human reader.
      
      For example, this cast:
      
      	int y;
      	int *p = (int *)&y;
      
      I used the coccinelle script below to find and remove these
      unnecessary casts.  I manually removed the conversions this
      script produces of casts with __force and __user.
      
      @@
      type T;
      T *p;
      @@
      
      -	(T *)p
      +	p
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e3192690
  12. 11 5月, 2012 1 次提交
  13. 29 3月, 2012 1 次提交
  14. 12 3月, 2012 1 次提交
    • J
      net: Convert printks to pr_<level> · 058bd4d2
      Joe Perches 提交于
      Use a more current kernel messaging style.
      
      Convert a printk block to print_hex_dump.
      Coalesce formats, align arguments.
      Use %s, __func__ instead of embedding function names.
      
      Some messages that were prefixed with <foo>_close are
      now prefixed with <foo>_fini.  Some ah4 and esp messages
      are now not prefixed with "ip ".
      
      The intent of this patch is to later add something like
        #define pr_fmt(fmt) "IPv4: " fmt.
      to standardize the output messages.
      
      Text size is trivially reduced. (x86-32 allyesconfig)
      
      $ size net/ipv4/built-in.o*
         text	   data	    bss	    dec	    hex	filename
       887888	  31558	 249696	1169142	 11d6f6	net/ipv4/built-in.o.new
       887934	  31558	 249800	1169292	 11d78c	net/ipv4/built-in.o.old
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      058bd4d2
  15. 13 1月, 2012 1 次提交
  16. 05 12月, 2011 1 次提交
  17. 01 11月, 2011 1 次提交
  18. 02 8月, 2011 1 次提交
  19. 19 7月, 2011 1 次提交
  20. 23 5月, 2011 2 次提交
    • P
      Add appropriate <linux/prefetch.h> include for prefetch users · 70c71606
      Paul Gortmaker 提交于
      After discovering that wide use of prefetch on modern CPUs
      could be a net loss instead of a win, net drivers which were
      relying on the implicit inclusion of prefetch.h via the list
      headers showed up in the resulting cleanup fallout.  Give
      them an explicit include via the following $0.02 script.
      
       =========================================
       #!/bin/bash
       MANUAL=""
       for i in `git grep -l 'prefetch(.*)' .` ; do
       	grep -q '<linux/prefetch.h>' $i
       	if [ $? = 0 ] ; then
       		continue
       	fi
      
       	(	echo '?^#include <linux/?a'
       		echo '#include <linux/prefetch.h>'
       		echo .
       		echo w
       		echo q
       	) | ed -s $i > /dev/null 2>&1
       	if [ $? != 0 ]; then
       		echo $i needs manual fixup
       		MANUAL="$i $MANUAL"
       	fi
       done
       echo ------------------- 8\<----------------------
       echo vi $MANUAL
       =========================================
      Signed-off-by: NPaul <paul.gortmaker@windriver.com>
      [ Fixed up some incorrect #include placements, and added some
        non-network drivers and the fib_trie.c case    - Linus ]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      70c71606
    • D
      120a3d5c
  21. 08 5月, 2011 1 次提交
  22. 02 5月, 2011 1 次提交
  23. 15 4月, 2011 1 次提交
    • D
      ipv4: Call fib_select_default() only when actually necessary. · 21d8c49e
      David S. Miller 提交于
      fib_select_default() is a complete NOP, and completely pointless
      to invoke, when we have no more than 1 default route installed.
      
      And this is far and away the common case.
      
      So remember how many prefixlen==0 routes we have in the routing
      table, and elide the call when we have no more than one of those.
      
      This cuts output route creation time by 157 cycles on Niagara2+.
      
      In order to add the new int to fib_table, we have to correct the type
      of ->tb_data[] to unsigned long, otherwise the private area will be
      unaligned on 64-bit systems.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Reviewed-by: NEric Dumazet <eric.dumazet@gmail.com>
      21d8c49e
  24. 31 3月, 2011 2 次提交
  25. 26 3月, 2011 1 次提交
  26. 25 3月, 2011 1 次提交
  27. 22 3月, 2011 1 次提交
    • J
      ipv4: match prefsrc when deleting routes · 74cb3c10
      Julian Anastasov 提交于
      fib_table_delete forgets to match the routes by prefsrc.
      Callers can specify known IP in fc_prefsrc and we should remove
      the exact route. This is needed for cases when same local or
      broadcast addresses are used in different subnets and the
      routes differ only in prefsrc. All callers that do not provide
      fc_prefsrc will ignore the route prefsrc as before and will
      delete the first occurence. That is how the ip route del default
      magic works.
      
      	Current callers are:
      
      - ip_rt_ioctl where rtentry_to_fib_config provides fc_prefsrc only
      when the provided device name matches IP label with colon.
      
      - inet_rtm_delroute where RTA_PREFSRC is optional too
      
      - fib_magic which deals with routes when deleting addresses
      and where the fc_prefsrc is always set with the primary IP
      for the concerned IFA.
      Signed-off-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      74cb3c10
  28. 13 3月, 2011 2 次提交
  29. 08 3月, 2011 1 次提交
  30. 18 2月, 2011 1 次提交
    • D
      ipv4: Avoid use of signed integers in fib_trie code. · 3b004569
      David S. Miller 提交于
      GCC emits all kinds of crazy zero extensions when we go from signed
      int, to unsigned short, etc. etc.
      
      This transformation has to be legal because:
      
      1) In tkey_extract_bits() in mask_pfx(), the values are used to
         perform shifts, on which negative values are undefined by C.
      
      2) In fib_table_lookup() we perform comparisons with unsigned
         values, constants, and additions.  None of which should
         encounter negative values.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3b004569
  31. 03 2月, 2011 1 次提交
  32. 02 2月, 2011 1 次提交
  33. 01 2月, 2011 2 次提交
    • D
      ipv4: Consolidate all default route selection implementations. · 0c838ff1
      David S. Miller 提交于
      Both fib_trie and fib_hash have a local implementation of
      fib_table_select_default().  This is completely unnecessary
      code duplication.
      
      Since we now remember the fib_table and the head of the fib
      alias list of the default route, we can implement one single
      generic version of this routine.
      
      Looking at the fib_hash implementation you may get the impression
      that it's possible for there to be multiple top-level routes in
      the table for the default route.  The truth is, it isn't, the
      insert code will only allow one entry to exist in the zero
      prefix hash table, because all keys evaluate to zero and all
      keys in a hash table must be unique.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c838ff1
    • D
      ipv4: Remember FIB alias list head and table in lookup results. · 5b470441
      David S. Miller 提交于
      This will be used later to implement fib_select_default() in a
      completely generic manner, instead of the current situation where the
      default route is re-looked up in the TRIE/HASH table and then the
      available aliases are analyzed.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5b470441
  34. 22 11月, 2010 1 次提交
  35. 29 10月, 2010 1 次提交