1. 09 7月, 2014 1 次提交
  2. 14 2月, 2014 1 次提交
  3. 03 4月, 2013 1 次提交
    • P
      ipconfig: add informative timeout messages while waiting for carrier · 5e404cd6
      Paul Gortmaker 提交于
      Commit 3fb72f1e ("ipconfig wait
      for carrier") added a "wait for carrier on at least one interface"
      policy, with a worst case maximum wait of two minutes.
      
      However, if you encounter this, you won't get any feedback from
      the console as to the nature of what is going on.  You just see
      the booting process hang for two minutes and then continue.
      
      Here we add a message so the user knows what is going on, and
      hence can take action to rectify the situation (e.g. fix network
      cable or whatever.)  After the 1st 10s pause, output now begins
      that looks like this:
      
      	Waiting up to 110 more seconds for network.
      	Waiting up to 100 more seconds for network.
      	Waiting up to 90 more seconds for network.
      	Waiting up to 80 more seconds for network.
      	...
      
      Since most systems will have no problem getting link/carrier in the
      1st 10s, the only people who will see these messages are people with
      genuine issues that need to be resolved.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5e404cd6
  4. 21 3月, 2013 1 次提交
    • M
      ipconfig: Fix newline handling in log message. · 283951f9
      Martin Fuzzey 提交于
      When using ipconfig the logs currently look like:
      
      Single name server:
      [    3.467270] IP-Config: Complete:
      [    3.470613]      device=eth0, hwaddr=ac:de:48:00:00:01, ipaddr=172.16.42.2, mask=255.255.255.0, gw=172.16.42.1
      [    3.480670]      host=infigo-1, domain=, nis-domain=(none)
      [    3.486166]      bootserver=172.16.42.1, rootserver=172.16.42.1, rootpath=
      [    3.492910]      nameserver0=172.16.42.1[    3.496853] ALSA device list:
      
      Three name servers:
      [    3.496949] IP-Config: Complete:
      [    3.500293]      device=eth0, hwaddr=ac:de:48:00:00:01, ipaddr=172.16.42.2, mask=255.255.255.0, gw=172.16.42.1
      [    3.510367]      host=infigo-1, domain=, nis-domain=(none)
      [    3.515864]      bootserver=172.16.42.1, rootserver=172.16.42.1, rootpath=
      [    3.522635]      nameserver0=172.16.42.1, nameserver1=172.16.42.100
      [    3.529149] , nameserver2=172.16.42.200
      
      Fix newline handling for these cases
      Signed-off-by: NMartin Fuzzey <mfuzzey@parkeon.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      283951f9
  5. 19 2月, 2013 1 次提交
  6. 05 1月, 2013 1 次提交
  7. 01 11月, 2012 1 次提交
  8. 26 9月, 2012 1 次提交
  9. 22 9月, 2012 1 次提交
  10. 20 5月, 2012 1 次提交
  11. 16 5月, 2012 2 次提交
  12. 16 4月, 2012 1 次提交
  13. 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
  14. 17 1月, 2012 1 次提交
  15. 21 12月, 2011 1 次提交
  16. 19 11月, 2011 1 次提交
    • H
      ipv4: Remove all uses of LL_ALLOCATED_SPACE · 66088243
      Herbert Xu 提交于
      ipv4: Remove all uses of LL_ALLOCATED_SPACE
      
      The macro LL_ALLOCATED_SPACE was ill-conceived.  It applies the
      alignment to the sum of needed_headroom and needed_tailroom.  As
      the amount that is then reserved for head room is needed_headroom
      with alignment, this means that the tail room left may be too small.
      
      This patch replaces all uses of LL_ALLOCATED_SPACE in net/ipv4
      with the macro LL_RESERVED_SPACE and direct reference to
      needed_tailroom.
      
      This also fixes the problem with needed_headroom changing between
      allocating the skb and reserving the head room.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      66088243
  17. 15 11月, 2011 1 次提交
  18. 01 11月, 2011 1 次提交
  19. 02 7月, 2011 1 次提交
  20. 22 6月, 2011 1 次提交
  21. 20 5月, 2011 1 次提交
    • M
      ipconfig wait for carrier · 3fb72f1e
      Micha Nelissen 提交于
      v3 -> v4: fix return boolean false instead of 0 for ic_is_init_dev
      
      Currently the ip auto configuration has a hardcoded delay of 1 second.
      When (ethernet) link takes longer to come up (e.g. more than 3 seconds),
      nfs root may not be found.
      
      Remove the hardcoded delay, and wait for carrier on at least one network
      device.
      Signed-off-by: NMicha Nelissen <micha@neli.hopto.org>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3fb72f1e
  22. 31 3月, 2011 1 次提交
  23. 29 11月, 2010 1 次提交
  24. 02 6月, 2010 1 次提交
  25. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  26. 25 3月, 2010 1 次提交
  27. 12 3月, 2010 1 次提交
    • D
      ipconfig: Handle devices which take some time to come up. · 964ad81c
      David S. Miller 提交于
      Some network devices, particularly USB ones, take several seconds to
      fully init and appear in the device list.
      
      If the user turned ipconfig on, they are using it for NFS root or some
      other early booting purpose.  So it makes no sense to just flat out
      fail immediately if the device isn't found.
      
      It also doesn't make sense to just jack up the initial wait to
      something crazy like 10 seconds.
      
      Instead, poll immediately, and then periodically once a second,
      waiting for a usable device to appear.  Fail after 12 seconds.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Tested-by: NChristian Pellegrin <chripell@fsfe.org>
      964ad81c
  28. 24 11月, 2009 1 次提交
  29. 28 10月, 2009 1 次提交
  30. 20 5月, 2009 1 次提交
    • C
      ipv4: teach ipconfig about the MTU option in DHCP · 9643f455
      Chris Friesen 提交于
      The DHCP spec allows the server to specify the MTU.  This can be useful
      for netbooting with UDP-based NFS-root on a network using jumbo frames.
      This patch allows the kernel IP autoconfiguration to handle this option
      correctly.
      
      It would be possible to use initramfs and add a script to set the MTU,
      but that seems like a complicated solution if no initramfs is otherwise
      necessary, and would bloat the kernel image more than this code would.
      
      This patch was originally submitted to LKML in 2003 by Hans-Peter Jansen.
      Signed-off-by: NChris Friesen <cfriesen@nortel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9643f455
  31. 18 5月, 2009 1 次提交
    • C
      ipconfig: handle case of delayed DHCP server · 2513dfb8
      Chris Friesen 提交于
      If a DHCP server is delayed, it's possible for the client to receive the 
      DHCPOFFER after it has already sent out a new DHCPDISCOVER message from 
      a second interface.  The client then sends out a DHCPREQUEST from the 
      second interface, but the server doesn't recognize the device and 
      rejects the request.
      
      This patch simply tracks the current device being configured and throws 
      away the OFFER if it is not intended for the current device.  A more 
      sophisticated approach would be to put the OFFER information into the 
      struct ic_device rather than storing it globally.
      Signed-off-by: NChris Friesen <cfriesen@nortel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2513dfb8
  32. 01 2月, 2009 1 次提交
  33. 30 1月, 2009 1 次提交
  34. 31 10月, 2008 1 次提交
  35. 20 7月, 2008 1 次提交
  36. 12 6月, 2008 1 次提交
  37. 13 5月, 2008 1 次提交
  38. 30 4月, 2008 1 次提交
    • S
      ipv4: annotate a few functions __init in ipconfig.c · 45e741b8
      Sam Ravnborg 提交于
      A few functions are only used from __init context.
      So annotate these with __init for consistency and silence
      the following warnings:
      
      WARNING: net/ipv4/built-in.o(.text+0x2a876): Section mismatch
               in reference from the function ic_bootp_init() to
               the variable .init.data:bootp_packet_type
      WARNING: net/ipv4/built-in.o(.text+0x2a907): Section mismatch
               in reference from the function ic_bootp_cleanup() to
               the variable .init.data:bootp_packet_type
      
      Note: The warnings only appear with CONFIG_DEBUG_SECTION_MISMATCH=y
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      45e741b8
  39. 14 4月, 2008 1 次提交