1. 27 11月, 2009 1 次提交
  2. 18 11月, 2009 1 次提交
    • E
      vlan: Precise RX stats accounting · 9793241f
      Eric Dumazet 提交于
      With multi queue devices, its possible that several cpus call
      vlan RX routines simultaneously for the same vlan device.
      
      We update RX stats counter without any locking, so we can
      get slightly wrong counters.
      
      One possible fix is to use percpu counters, to get precise
      accounting and also get guarantee of no cache line ping pongs
      between cpus.
      
      Note: this adds 16 bytes (32 bytes on 64bit arches) of percpu
      data per vlan device.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9793241f
  3. 14 11月, 2009 1 次提交
  4. 29 10月, 2009 1 次提交
  5. 27 10月, 2009 1 次提交
    • E
      vlan: allow null VLAN ID to be used · 05423b24
      Eric Dumazet 提交于
      We currently use a 16 bit field (vlan_tci) to store VLAN ID/PRIO on a skb.
      
      Null value is used as a special value, meaning vlan tagging not enabled.
      This forbids use of null vlan ID.
      
      As pointed by David, some drivers use the 3 high order bits (PRIO)
      
      As VLAN ID is 12 bits, we can use the remaining bit (CFI) as a flag, and
      allow null VLAN ID.
      
      In case future code really wants to use VLAN_CFI_MASK, we'll have to use
      a bit outside of vlan_tci.
      
      #define VLAN_PRIO_MASK         0xe000 /* Priority Code Point */
      #define VLAN_PRIO_SHIFT        13
      #define VLAN_CFI_MASK          0x1000 /* Canonical Format Indicator */
      #define VLAN_TAG_PRESENT       VLAN_CFI_MASK
      #define VLAN_VID_MASK          0x0fff /* VLAN Identifier */
      Reported-by: NGertjan Hofman <gertjan_hofman@yahoo.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      05423b24
  6. 04 9月, 2009 1 次提交
  7. 03 9月, 2009 1 次提交
  8. 01 9月, 2009 2 次提交
  9. 15 8月, 2009 1 次提交
  10. 30 5月, 2009 1 次提交
    • J
      net: convert unicast addr list · ccffad25
      Jiri Pirko 提交于
      This patch converts unicast address list to standard list_head using
      previously introduced struct netdev_hw_addr. It also relaxes the
      locking. Original spinlock (still used for multicast addresses) is not
      needed and is no longer used for a protection of this list. All
      reading and writing takes place under rtnl (with no changes).
      
      I also removed a possibility to specify the length of the address
      while adding or deleting unicast address. It's always dev->addr_len.
      
      The convertion touched especially e1000 and ixgbe codes when the
      change is not so trivial.
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      
       drivers/net/bnx2.c               |   13 +--
       drivers/net/e1000/e1000_main.c   |   24 +++--
       drivers/net/ixgbe/ixgbe_common.c |   14 ++--
       drivers/net/ixgbe/ixgbe_common.h |    4 +-
       drivers/net/ixgbe/ixgbe_main.c   |    6 +-
       drivers/net/ixgbe/ixgbe_type.h   |    4 +-
       drivers/net/macvlan.c            |   11 +-
       drivers/net/mv643xx_eth.c        |   11 +-
       drivers/net/niu.c                |    7 +-
       drivers/net/virtio_net.c         |    7 +-
       drivers/s390/net/qeth_l2_main.c  |    6 +-
       drivers/scsi/fcoe/fcoe.c         |   16 ++--
       include/linux/netdevice.h        |   18 ++--
       net/8021q/vlan.c                 |    4 +-
       net/8021q/vlan_dev.c             |   10 +-
       net/core/dev.c                   |  195 +++++++++++++++++++++++++++-----------
       net/dsa/slave.c                  |   10 +-
       net/packet/af_packet.c           |    4 +-
       18 files changed, 227 insertions(+), 137 deletions(-)
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ccffad25
  11. 25 5月, 2009 1 次提交
  12. 19 5月, 2009 2 次提交
    • E
      net: release dst entry in dev_hard_start_xmit() · 93f154b5
      Eric Dumazet 提交于
      One point of contention in high network loads is the dst_release() performed
      when a transmited skb is freed. This is because NIC tx completion calls
      dev_kree_skb() long after original call to dev_queue_xmit(skb).
      
      CPU cache is cold and the atomic op in dst_release() stalls. On SMP, this is
      quite visible if one CPU is 100% handling softirqs for a network device,
      since dst_clone() is done by other cpus, involving cache line ping pongs.
      
      It seems right place to release dst is in dev_hard_start_xmit(), for most
      devices but ones that are virtual, and some exceptions.
      
      David Miller suggested to define a new device flag, set in alloc_netdev_mq()
      (so that most devices set it at init time), and carefuly unset in devices
      which dont want a NULL skb->dst in their ndo_start_xmit().
      
      List of devices that must clear this flag is :
      
      - loopback device, because it calls netif_rx() and quoting Patrick :
          "ip_route_input() doesn't accept loopback addresses, so loopback packets
           already need to have a dst_entry attached."
      - appletalk/ipddp.c : needs skb->dst in its xmit function
      
      - And all devices that call again dev_queue_xmit() from their xmit function
      (as some classifiers need skb->dst) : bonding, vlan, macvlan, eql, ifb, hdlc_fr
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93f154b5
    • E
      vlan: use struct netdev_queue counters instead of dev->stats · 450c4ea1
      Eric Dumazet 提交于
      We can update netdev_queue tx_bytes/tx_packets/tx_dropped counters instead
      of dev->stats ones, to reduce number of cache lines dirtied in xmit path.
      
      This fixes a performance problem on SMP when many different cpus take
      vlan tx path.
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      450c4ea1
  13. 26 4月, 2009 1 次提交
    • J
      vlan: update vlan carrier state for admin up/down · adc667e8
      Jay Vosburgh 提交于
      	Currently, the VLAN event handler does not adjust the VLAN
      device's carrier state when the real device or the VLAN device is set
      administratively up or down.
      
      	The following patch adds a transfer of operating state from the
      real device to the VLAN device when the real device is administratively
      set up or down, and sets the carrier state up or down during init, open
      and close of the VLAN device.
      
      	This permits observers above the VLAN device that care about the
      carrier state (bonding's link monitor, for example) to receive updates
      for administrative changes by more closely mimicing the behavior of real
      devices.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      adc667e8
  14. 21 4月, 2009 1 次提交
  15. 18 4月, 2009 1 次提交
  16. 05 3月, 2009 1 次提交
    • D
      vlan: Fix vlan-in-vlan crashes. · 9d40bbda
      David S. Miller 提交于
      As analyzed by Patrick McHardy, vlan needs to reset it's
      netdev_ops pointer in it's ->init() function but this
      leaves the compat method pointers stale.
      
      Add a netdev_resync_ops() and call it from the vlan code.
      
      Any other driver which changes ->netdev_ops after register_netdevice()
      will need to call this new function after doing so too.
      
      With help from Patrick McHardy.
      Tested-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9d40bbda
  17. 09 1月, 2009 1 次提交
  18. 26 12月, 2008 1 次提交
  19. 20 11月, 2008 1 次提交
  20. 04 11月, 2008 1 次提交
  21. 29 10月, 2008 1 次提交
  22. 21 9月, 2008 1 次提交
  23. 12 9月, 2008 1 次提交
  24. 23 7月, 2008 1 次提交
  25. 18 7月, 2008 1 次提交
    • D
      netdev: Allocate multiple queues for TX. · e8a0464c
      David S. Miller 提交于
      alloc_netdev_mq() now allocates an array of netdev_queue
      structures for TX, based upon the queue_count argument.
      
      Furthermore, all accesses to the TX queues are now vectored
      through the netdev_get_tx_queue() and netdev_for_each_tx_queue()
      interfaces.  This makes it easy to grep the tree for all
      things that want to get to a TX queue of a net device.
      
      Problem spots which are not really multiqueue aware yet, and
      only work with one queue, can easily be spotted by grepping
      for all netdev_get_tx_queue() calls that pass in a zero index.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e8a0464c
  26. 15 7月, 2008 5 次提交
  27. 09 7月, 2008 2 次提交
  28. 08 7月, 2008 5 次提交
  29. 06 7月, 2008 1 次提交
    • P
      vlan: Add GVRP support · 70c03b49
      Patrick McHardy 提交于
      Add GVRP support for dynamically registering VLANs with switches.
      
      By default GVRP is disabled because we only support the applicant-only
      participant model, which means it should not be enabled on vlans that
      are members of a bridge. Since there is currently no way to cleanly
      determine that, the user is responsible for enabling it.
      
      The code is pretty small and low impact, its wrapped in a config
      option though because it depends on the GARP implementation and
      the STP core.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      70c03b49