24 Nov, 2008

1 commit

  • Linus mentioned we could try to perform long word operations, even
    on potentially unaligned addresses, on x86 at least. David mentioned
    the HAVE_EFFICIENT_UNALIGNED_ACCESS test to handle this on all
    arches that have efficient unailgned accesses.

    I tried this idea and got nice assembly on 32 bits:

    158: 33 82 38 01 00 00 xor 0x138(%edx),%eax
    15e: 33 8a 34 01 00 00 xor 0x134(%edx),%ecx
    164: c1 e0 10 shl $0x10,%eax
    167: 09 c1 or %eax,%ecx
    169: 74 0b je 176

    And very nice assembly on 64 bits of course (one xor, one shl)

    Nice oprofile improvement in eth_type_trans(), 0.17 % instead of 0.41 %,
    expected since we remove 8 instructions on a fast path.

    This patch implements a compare_ether_addr_64bits() function, that
    uses the CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS ifdef to efficiently
    perform the 6 bytes comparison on all capable arches.

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

    Eric Dumazet
     

20 Nov, 2008

1 commit


09 Oct, 2008

2 commits

  • This adds support for the Trailer switch tagging format. This is
    another tagging that doesn't explicitly mark tagged packets with a
    distinct ethertype, so that we need to add a similar hack in the
    receive path as for the Original DSA tagging format.

    Signed-off-by: Lennert Buytenhek
    Tested-by: Byron Bradley
    Tested-by: Tim Ellis
    Signed-off-by: David S. Miller

    Lennert Buytenhek
     
  • Most of the DSA switches currently in the field do not support the
    Ethertype DSA tagging format that one of the previous patches added
    support for, but only the original DSA tagging format.

    The original DSA tagging format carries the same information as the
    Ethertype DSA tagging format, but with the difference that it does not
    have an ethertype field. In other words, when receiving a packet that
    is tagged with an original DSA tag, there is no way of telling in
    eth_type_trans() that this packet is in fact a DSA-tagged packet.

    This patch adds a hook into eth_type_trans() which is only compiled in
    if support for a switch chip that doesn't support Ethertype DSA is
    selected, and which checks whether there is a DSA switch driver
    instance attached to this network device which uses the old tag format.
    If so, it sets the protocol field to ETH_P_DSA without looking at the
    packet, so that the packet ends up in the right place.

    Signed-off-by: Lennert Buytenhek
    Tested-by: Nicolas Pitre
    Tested-by: Peter van Valderen
    Tested-by: Dirk Teurlings
    Signed-off-by: David S. Miller

    Lennert Buytenhek
     

21 Sep, 2008

1 commit


14 Apr, 2008

1 commit

  • Paul Bolle wrote:
    > http://bugzilla.kernel.org/show_bug.cgi?id=9923 would have been much easier to
    > track down if eth_validate_addr() would somehow complain aloud if an address
    > is invalid. Shouldn't it make at least some noise?

    I guess it should return -EADDRNOTAVAIL similar to eth_mac_addr()
    when validation fails.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     

29 Jan, 2008

1 commit

  • print_mac() used many most net drivers and format_addr() used by
    net-sysfs.c are very similar and they can be intergrated.

    format_addr() is also identically redefined in the qla4xxx iscsi
    driver.

    Export a new function sysfs_format_mac() to be used by net-sysfs,
    qla4xxx and others in the future. Both print_mac() and
    sysfs_format_mac() call _format_mac_addr() to do the formatting.

    Changed print_mac() to use unsigned char * to be consistent with
    net_device struct's dev_addr. Added buffer length overrun checking
    as suggested by Joe Perches.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     

24 Oct, 2007

1 commit


11 Oct, 2007

5 commits


12 Jul, 2007

1 commit


11 Jul, 2007

1 commit

  • Add the multiqueue hardware device support API to the core network
    stack. Allow drivers to allocate multiple queues and manage them at
    the netdev level if they choose to do so.

    Added a new field to sk_buff, namely queue_mapping, for drivers to
    know which tx_ring to select based on OS classification of the flow.

    Signed-off-by: Peter P Waskiewicz Jr
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Peter P Waskiewicz Jr
     

26 Apr, 2007

3 commits


15 Feb, 2007

1 commit

  • After Al Viro (finally) succeeded in removing the sched.h #include in module.h
    recently, it makes sense again to remove other superfluous sched.h includes.
    There are quite a lot of files which include it but don't actually need
    anything defined in there. Presumably these includes were once needed for
    macros that used to live in sched.h, but moved to other header files in the
    course of cleaning it up.

    To ease the pain, this time I did not fiddle with any header files and only
    removed #includes from .c-files, which tend to cause less trouble.

    Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
    arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
    allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
    configs in arch/arm/configs on arm. I also checked that no new warnings were
    introduced by the patch (actually, some warnings are removed that were emitted
    by unnecessarily included header files).

    Signed-off-by: Tim Schmielau
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

11 Feb, 2007

1 commit


03 Dec, 2006

1 commit


29 Sep, 2006

1 commit


23 Sep, 2006

2 commits


01 Jul, 2006

1 commit


06 Jun, 2006

1 commit


24 Feb, 2006

1 commit

  • When you turn off ARP on a netdevice then the first packet always goes
    out with a dstMAC of all zeroes. This is because the first packet is
    used to resolve ARP entries. Even though the ARP entry may be resolved
    (I tried by setting a static ARP entry for a host i was pinging from),
    it gets overwritten by virtue of having the netdevice disabling ARP.

    Subsequent packets go out fine with correct dstMAC address (which may
    be why people have ignored reporting this issue).

    To cut the story short:

    the culprit code is in net/ethernet/eth.c::eth_header()

    ----
    /*
    * Anyway, the loopback-device should never use this
    function...
    */

    if (dev->flags & (IFF_LOOPBACK|IFF_NOARP))
    {
    memset(eth->h_dest, 0, dev->addr_len);
    return ETH_HLEN;
    }

    if(daddr)
    {
    memcpy(eth->h_dest,daddr,dev->addr_len);
    return ETH_HLEN;
    }

    ----

    Note how the h_dest is being reset when device has IFF_NOARP.

    As a note:
    All devices including loopback pass a daddr. loopback in fact passes
    a 0 all the time ;->
    This means i can delete the check totaly or i can remove the IFF_NOARP

    Alexey says:
    --------------------
    I think, it was me who did this crap. It was so long ago I do not remember
    why it was made.

    I remember some troubles with dummy device. It tried to resolve
    addresses, apparently, without success and generated errors instead of
    blackholing. I think the problem was eventually solved at neighbour
    level.

    After some thinking I suspect the deletion of this chunk could change
    behaviour of some parts which do not use neighbour cache f.e. packet
    socket.

    I think safer approach would be to move this chunk after if (daddr).
    And the possibility to remove this completely could be analyzed later.
    --------------------

    Patch updated with Alexey's safer suggestions.

    Signed-off-by: Jamal Hadi Salim
    Acked-by: Alexey Kuznetsov
    Signed-off-by: David S. Miller

    Jamal Hadi Salim
     

07 Jan, 2006

1 commit


06 Jan, 2006

1 commit


09 Nov, 2005

1 commit

  • From: Jesper Juhl

    This is the net/ part of the big kfree cleanup patch.

    Remove pointless checks for NULL prior to calling kfree() in net/.

    Signed-off-by: Jesper Juhl
    Cc: "David S. Miller"
    Cc: Arnaldo Carvalho de Melo
    Acked-by: Marcel Holtmann
    Acked-by: YOSHIFUJI Hideaki
    Signed-off-by: Andrew Morton

    Jesper Juhl
     

29 Oct, 2005

1 commit

  • Expose faster ether compare for use by protocols and other
    driver. And change name to be more consistent with other ether
    address manipulation routines in same file

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephen Hemminger
     

29 Sep, 2005

1 commit


28 Sep, 2005

1 commit


30 Aug, 2005

2 commits


13 Jul, 2005

1 commit


29 Jun, 2005

1 commit


06 May, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds