09 Aug, 2010

1 commit

  • Based on patches from Sonny Rao and Milton Miller...

    Combined the patches to fix up clean_tx_irq and clean_rx_irq.

    The PowerPC architecture does not require loads to independent bytes
    to be ordered without adding an explicit barrier.

    In ixgbe_clean_rx_irq we load the status bit then load the packet data.
    With packet split disabled if these loads go out of order we get a
    stale packet, but we will notice the bad sequence numbers and drop it.

    The problem occurs with packet split enabled where the TCP/IP header
    and data are in different descriptors. If the reads go out of order
    we may have data that doesn't match the TCP/IP header. Since we use
    hardware checksumming this bad data is never verified and it makes it
    all the way to the application.

    This bug was found during stress testing and adding this barrier has
    been shown to fix it. The bug can manifest as a data integrity issue
    (bad payload data) or as a BUG in skb_pull().

    This was a nasty bug to hunt down, if people agree with the fix I think
    it's a candidate for stable.

    Previously Submitted to e1000-devel only for ixgbe

    http://marc.info/?l=e1000-devel&m=126593062701537&w=3

    We've now seen this problem hit with other device drivers (e1000e mostly)
    So I'm resubmitting with fixes for other Intel Device Drivers with
    similar issues.

    CC: Milton Miller
    CC: Anton Blanchard
    CC: Sonny Rao
    CC: stable
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Jeff Kirsher
     

03 Aug, 2010

1 commit

  • This change corrects an issue that resulted in a null pointer dereference
    for the addition of VLAN 0 without any VLANs being registered. Also this
    code removes some unnecessary checks for defines and the unnecessary setting
    of VLAN flags since that is now handled within the kernel via the
    vlan_features.

    Signed-off-by: Alexander Duyck
    Tested-by: Emil Tantilov
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     

28 Jul, 2010

1 commit

  • Both igbvf and ixgbevf should set addr_assign_type to NET_ADDR_RANDOM
    so udev creates persistent net rules by matching the device path.
    Do this by using the dev_hw_addr_random helper function.

    Signed-off-by: Stefan Assmann
    Signed-off-by: David S. Miller

    Stefan Assmann
     

16 Jul, 2010

1 commit

  • 'count' is unsigned. It is initialized to zero, then it can be increased
    multiple times, and finally it is used in such a way:

    >>>> count--;
    |
    | /* clear timestamp and dma mappings for remaining portion of packet */
    | while (count >= 0) {
    | count--;
    | ...
    ^
    If count is zero here (so, it was never increased), we would have a very
    long loop :)

    Signed-off-by: Kulikov Vasiliy
    Signed-off-by: David S. Miller

    Kulikov Vasiliy
     

05 Jun, 2010

1 commit


14 May, 2010

1 commit

  • This patch removes from drivers/net/ all the unnecessary
    return; statements that precede the last closing brace of
    void functions.

    It does not remove the returns that are immediately
    preceded by a label as gcc doesn't like that.

    It also does not remove null void functions with return.

    Done via:
    $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
    xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'

    with some cleanups by hand.

    Compile tested x86 allmodconfig only.

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

    Joe Perches
     

10 May, 2010

1 commit

  • Now that core network takes care of trans_start updates, dont do it
    in drivers themselves, if possible. Drivers can avoid one cache miss
    (on dev->trans_start) in their start_xmit() handler.

    Exceptions are NETIF_F_LLTX drivers

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

06 May, 2010

1 commit

  • When the PF acks a message from the VF the VF gets an interrupt. It
    must cache the ack bit so that polling SW will not miss the ack. Also
    avoid reading the message buffer on acks because that also will clear
    the ack bit.

    Signed-off-by: Greg Rose
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Greg Rose
     

28 Apr, 2010

2 commits


15 Apr, 2010

1 commit


13 Apr, 2010

1 commit


12 Apr, 2010

1 commit


07 Apr, 2010

1 commit


04 Apr, 2010

1 commit

  • Converts the list and the core manipulating with it to be the same as uc_list.

    +uses two functions for adding/removing mc address (normal and "global"
    variant) instead of a function parameter.
    +removes dev_mcast.c completely.
    +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
    manipulation with lists on a sandbox (used in bonding and 80211 drivers)

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     

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
     

27 Mar, 2010

2 commits


25 Mar, 2010

1 commit


23 Mar, 2010

1 commit


20 Mar, 2010

3 commits

  • Clean up some text output formatting.

    Signed-off-by: Greg Rose
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Greg Rose
     
  • The recovery from PF reset works better when you shorten up the delay
    until the watchdog task executes.

    Signed-off-by: Greg Rose
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Greg Rose
     
  • The counters in the 82599 Virtual Function are not clear on read. They
    accumulate to the maximum value and then roll over. They are also not
    cleared when the VF executes a soft reset, so it is possible they are
    non-zero when the driver loads and starts. This has all been accounted
    for in the code that keeps the stats up to date but there is one case
    that is not. When the PF driver is reset the counters in the VF are
    all reset to zero. This adds an additional accounting overhead into
    the VF driver when the PF is reset under its feet. This patch adds
    additional counters that are used by the VF driver to accumulate and
    save stats after a PF reset has been detected. Prior to this patch
    displaying the stats in the VF after the PF has reset would show
    bogus data.

    Signed-off-by: Greg Rose
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Greg Rose
     

07 Mar, 2010

1 commit

  • Rename for_each_bit to for_each_set_bit in the kernel source tree. To
    permit for_each_clear_bit(), should that ever be added.

    The patch includes a macro to map the old for_each_bit() onto the new
    for_each_set_bit(). This is a (very) temporary thing to ease the migration.

    [akpm@linux-foundation.org: add temporary for_each_bit()]
    Suggested-by: Alexey Dobriyan
    Suggested-by: Andrew Morton
    Signed-off-by: Akinobu Mita
    Cc: "David S. Miller"
    Cc: Russell King
    Cc: David Woodhouse
    Cc: Artem Bityutskiy
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

13 Feb, 2010

1 commit


28 Jan, 2010

1 commit


23 Jan, 2010

4 commits


11 Jan, 2010

5 commits