1. 10 12月, 2013 2 次提交
  2. 07 12月, 2013 1 次提交
    • J
      ether_addr_equal: Optimize implementation, remove unused compare_ether_addr · 0d74c42f
      Joe Perches 提交于
      Add a new check for CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS to reduce
      the number of or's used in the ether_addr_equal comparison to very
      slightly improve function performance.
      
      Simplify the ether_addr_equal_64bits implementation.
      Integrate and remove the zap_last_2bytes helper as it's now
      used only once.
      
      Remove the now unused compare_ether_addr function.
      
      Update the unaligned-memory-access documentation to remove the
      compare_ether_addr description and show how unaligned accesses
      could occur with ether_addr_equal.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d74c42f
  3. 27 9月, 2013 1 次提交
    • J
      [networking]device.h: Remove extern from function prototypes · f629d208
      Joe Perches 提交于
      There are a mix of function prototypes with and without extern
      in the kernel sources.  Standardize on not using extern for
      function prototypes.
      
      Function prototypes don't need to be written with extern.
      extern is assumed by the compiler.  Its use is as unnecessary as
      using auto to declare automatic/local variables in a block.
      Signed-off-by: NJoe Perches <joe@perches.com>
      f629d208
  4. 04 9月, 2013 1 次提交
  5. 22 1月, 2013 1 次提交
  6. 04 1月, 2013 1 次提交
  7. 03 11月, 2012 2 次提交
  8. 30 10月, 2012 1 次提交
  9. 11 9月, 2012 1 次提交
  10. 17 7月, 2012 1 次提交
  11. 11 7月, 2012 1 次提交
  12. 18 5月, 2012 1 次提交
  13. 13 5月, 2012 1 次提交
  14. 11 5月, 2012 1 次提交
  15. 10 5月, 2012 1 次提交
  16. 09 5月, 2012 1 次提交
  17. 08 5月, 2012 1 次提交
  18. 13 2月, 2012 1 次提交
    • D
      rename dev_hw_addr_random and remove redundant second · 1a0d6ae5
      Danny Kukawka 提交于
      Renamed dev_hw_addr_random to eth_hw_addr_random() to reflect that
      this function only assign a random ethernet address (MAC). Removed
      the second parameter (u8 *hwaddr), it's redundant since the also
      given net_device already contains net_device->dev_addr.
      Set it directly.
      
      Adapt igbvf and ixgbevf to the changed function.
      
      Small fix for ixgbevf_probe(): if ixgbevf_sw_init() fails
      (which means the device got no dev_addr) handle the error and
      jump to err_sw_init as already done by igbvf in similar case.
      Signed-off-by: NDanny Kukawka <danny.kukawka@bisect.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a0d6ae5
  19. 13 7月, 2011 1 次提交
  20. 14 1月, 2011 1 次提交
  21. 11 1月, 2011 1 次提交
  22. 24 9月, 2010 1 次提交
  23. 27 8月, 2010 1 次提交
    • E
      gro: __napi_gro_receive() optimizations · 40d0802b
      Eric Dumazet 提交于
      compare_ether_header() can have a special implementation on 64 bit
      arches if CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is defined.
      
      __napi_gro_receive() and vlan_gro_common() can avoid a conditional
      branch to perform device match.
      
      On x86_64, __napi_gro_receive() has now 38 instructions instead of 53
      
      As gcc-4.4.3 still choose to not inline it, add inline keyword to this
      performance critical function.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      CC: Herbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      40d0802b
  24. 10 8月, 2010 1 次提交
  25. 25 7月, 2010 1 次提交
    • S
      sysfs: add attribute to indicate hw address assignment type · c1f79426
      Stefan Assmann 提交于
      Add addr_assign_type to struct net_device and expose it via sysfs.
      This new attribute has the purpose of giving user-space the ability to
      distinguish between different assignment types of MAC addresses.
      
      For example user-space can treat NICs with randomly generated MAC
      addresses differently than NICs that have permanent (locally assigned)
      MAC addresses.
      For the former udev could write a persistent net rule by matching the
      device path instead of the MAC address.
      There's also the case of devices that 'steal' MAC addresses from slave
      devices. In which it is also be beneficial for user-space to be aware
      of the fact.
      
      This patch also introduces a helper function to assist adoption of
      drivers that generate MAC addresses randomly.
      Signed-off-by: NStefan Assmann <sassmann@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c1f79426
  26. 06 5月, 2009 1 次提交
    • J
      net: introduce a list of device addresses dev_addr_list (v6) · f001fde5
      Jiri Pirko 提交于
      v5 -> v6 (current):
      -removed so far unused static functions
      -corrected dev_addr_del_multiple to call del instead of add
      
      v4 -> v5:
      -added device address type (suggested by davem)
      -removed refcounting (better to have simplier code then safe potentially few
       bytes)
      
      v3 -> v4:
      -changed kzalloc to kmalloc in __hw_addr_add_ii()
      -ASSERT_RTNL() avoided in dev_addr_flush() and dev_addr_init()
      
      v2 -> v3:
      -removed unnecessary rcu read locking
      -moved dev_addr_flush() calling to ensure no null dereference of dev_addr
      
      v1 -> v2:
      -added forgotten ASSERT_RTNL to dev_addr_init and dev_addr_flush
      -removed unnecessary rcu_read locking in dev_addr_init
      -use compare_ether_addr_64bits instead of compare_ether_addr
      -use L1_CACHE_BYTES as size for allocating struct netdev_hw_addr
      -use call_rcu instead of rcu_synchronize
      -moved is_etherdev_addr into __KERNEL__ ifdef
      
      This patch introduces a new list in struct net_device and brings a set of
      functions to handle the work with device address list. The list is a replacement
      for the original dev_addr field and because in some situations there is need to
      carry several device addresses with the net device. To be backward compatible,
      dev_addr is made to point to the first member of the list so original drivers
      sees no difference.
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f001fde5
  27. 09 2月, 2009 1 次提交
  28. 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
  29. 20 11月, 2008 1 次提交
  30. 14 2月, 2008 1 次提交
  31. 11 10月, 2007 1 次提交
  32. 11 7月, 2007 2 次提交
  33. 08 5月, 2007 1 次提交
  34. 04 1月, 2006 1 次提交
  35. 03 11月, 2005 2 次提交
  36. 29 10月, 2005 1 次提交