1. 13 7月, 2011 1 次提交
  2. 13 1月, 2011 1 次提交
  3. 11 1月, 2011 1 次提交
  4. 24 9月, 2010 1 次提交
  5. 27 8月, 2010 1 次提交
  6. 11 6月, 2010 1 次提交
  7. 02 5月, 2010 1 次提交
  8. 22 4月, 2010 1 次提交
  9. 21 4月, 2010 1 次提交
  10. 27 12月, 2009 1 次提交
  11. 16 11月, 2009 1 次提交
  12. 25 5月, 2009 1 次提交
  13. 24 11月, 2008 1 次提交
    • E
      eth: Declare an optimized compare_ether_addr_64bits() function · 1f87e235
      Eric Dumazet 提交于
      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 <eth_type_trans+0x87>
      
      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: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f87e235
  14. 20 11月, 2008 1 次提交
  15. 09 10月, 2008 2 次提交
  16. 21 9月, 2008 1 次提交
  17. 14 4月, 2008 1 次提交
  18. 29 1月, 2008 1 次提交
    • M
      [ETH]: Combine format_addr() with print_mac(). · 7ffc49a6
      Michael Chan 提交于
      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: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7ffc49a6
  19. 24 10月, 2007 1 次提交
  20. 11 10月, 2007 4 次提交
  21. 12 7月, 2007 1 次提交
  22. 11 7月, 2007 1 次提交
  23. 26 4月, 2007 3 次提交
  24. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      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: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a
  25. 11 2月, 2007 1 次提交
  26. 03 12月, 2006 1 次提交
  27. 29 9月, 2006 1 次提交
  28. 23 9月, 2006 2 次提交
  29. 01 7月, 2006 1 次提交
  30. 24 2月, 2006 1 次提交
    • J
      [NET] ethernet: Fix first packet goes out with MAC 00:00:00:00:00:00 · f8d0e3f1
      Jamal Hadi Salim 提交于
      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: NJamal Hadi Salim <hadi@cyberus.ca>
      Acked-by: NAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f8d0e3f1
  31. 07 1月, 2006 1 次提交
  32. 06 1月, 2006 1 次提交
  33. 29 10月, 2005 1 次提交