24 Dec, 2011

1 commit


21 Dec, 2011

1 commit

  • previous commit 3fb72f1e6e6165c5f495e8dc11c5bbd14c73385c
    makes IP-Config wait for carrier on at least one network device.

    Before waiting (predefined value 120s), check that at least one device
    was successfully brought up. Otherwise (e.g. buggy bootloader
    which does not set the MAC address) there is no point in waiting
    for carrier.

    Cc: Micha Nelissen
    Cc: Holger Brunck
    Signed-off-by: Gerlando Falauto
    Signed-off-by: David S. Miller

    Gerlando Falauto
     

19 Nov, 2011

1 commit

  • 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: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

15 Nov, 2011

1 commit


01 Nov, 2011

1 commit


02 Jul, 2011

1 commit


22 Jun, 2011

1 commit


20 May, 2011

1 commit

  • 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: Micha Nelissen
    Cc: David Miller
    Signed-off-by: David S. Miller

    Micha Nelissen
     

31 Mar, 2011

1 commit


29 Nov, 2010

1 commit


02 Jun, 2010

1 commit

  • Normally dhclient can be configured to send the "host-name" option
    in DHCP requests to update the client's DNS record. However for an
    NFSROOT system, dhclient shall never be called (which may change the
    IP addr and therefore lose your root NFS mount connection).

    So enable updating the DNS record with kernel parameter

    ip=::::$HOST_NAME::dhcp

    Signed-off-by: Wu Fengguang
    Signed-off-by: David S. Miller

    Wu Fengguang
     

12 Apr, 2010

1 commit


30 Mar, 2010

1 commit

  • …it 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: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

25 Mar, 2010

1 commit


12 Mar, 2010

1 commit

  • 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: David S. Miller
    Tested-by: Christian Pellegrin

    David S. Miller
     

17 Dec, 2009

1 commit

  • * 'for-2.6.33' of git://linux-nfs.org/~bfields/linux: (42 commits)
    nfsd: remove pointless paths in file headers
    nfsd: move most of nfsfh.h to fs/nfsd
    nfsd: remove unused field rq_reffh
    nfsd: enable V4ROOT exports
    nfsd: make V4ROOT exports read-only
    nfsd: restrict filehandles accepted in V4ROOT case
    nfsd: allow exports of symlinks
    nfsd: filter readdir results in V4ROOT case
    nfsd: filter lookup results in V4ROOT case
    nfsd4: don't continue "under" mounts in V4ROOT case
    nfsd: introduce export flag for v4 pseudoroot
    nfsd: let "insecure" flag vary by pseudoflavor
    nfsd: new interface to advertise export features
    nfsd: Move private headers to source directory
    vfs: nfsctl.c un-used nfsd #includes
    lockd: Remove un-used nfsd headers #includes
    s390: remove un-used nfsd #includes
    sparc: remove un-used nfsd #includes
    parsic: remove un-used nfsd #includes
    compat.c: Remove dependence on nfsd private headers
    ...

    Linus Torvalds
     

24 Nov, 2009

1 commit

  • On Sun, 2009-11-22 at 16:31 -0800, David Miller wrote:
    > It should be of the form:
    > if (x &&
    > y)
    >
    > or:
    > if (x && y)
    >
    > Fix patches, rather than complaints, for existing cases where things
    > do not follow this pattern are certainly welcome.

    Also collapsed some multiple tabs to single space.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

28 Oct, 2009

1 commit


20 May, 2009

1 commit

  • 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: Chris Friesen
    Signed-off-by: David S. Miller

    Chris Friesen
     

18 May, 2009

1 commit

  • 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: Chris Friesen
    Signed-off-by: David S. Miller

    Chris Friesen
     

01 Feb, 2009

1 commit


30 Jan, 2009

1 commit


31 Oct, 2008

1 commit


20 Jul, 2008

1 commit


12 Jun, 2008

1 commit


13 May, 2008

1 commit

  • This patch adds needed_headroom/needed_tailroom members to struct
    net_device and updates many places that allocate sbks to use them. Not
    all of them can be converted though, and I'm sure I missed some (I
    mostly grepped for LL_RESERVED_SPACE)

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

30 Apr, 2008

1 commit

  • 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: Sam Ravnborg
    Signed-off-by: David S. Miller

    Sam Ravnborg
     

18 Apr, 2008

1 commit


14 Apr, 2008

1 commit


12 Apr, 2008

1 commit


26 Mar, 2008

1 commit


18 Mar, 2008

2 commits


06 Mar, 2008

1 commit


05 Mar, 2008

1 commit

  • From: Stephen Hemminger

    Based upon a patch by Marcel Wappler:

    This patch fixes a DHCP issue of the kernel: some DHCP servers
    (i.e. in the Linksys WRT54Gv5) are very strict about the contents
    of the DHCPDISCOVER packet they receive from clients.

    Table 5 in RFC2131 page 36 requests the fields 'ciaddr' and
    'siaddr' MUST be set to '0'. These DHCP servers ignore Linux
    kernel's DHCP discovery packets with these two fields set to
    '255.255.255.255' (in contrast to popular DHCP clients, such as
    'dhclient' or 'udhcpc'). This leads to a not booting system.

    Signed-off-by: David S. Miller

    Stephen Hemminger
     

04 Mar, 2008

1 commit

  • There are some place, that calculate the ARP header length. These
    calculations are correct, but
    a) some operate with "magic" constants,
    b) enlarge the code length (sometimes at the cost of coding style),
    c) are not informative from the first glance.

    The proposal is to introduce a helper, that includes all the good
    sides of these calculations.

    Signed-off-by: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     

29 Feb, 2008

1 commit


18 Feb, 2008

1 commit


29 Jan, 2008

2 commits