1. 04 11月, 2009 1 次提交
  2. 02 11月, 2009 1 次提交
  3. 31 10月, 2009 1 次提交
  4. 30 10月, 2009 2 次提交
  5. 29 10月, 2009 2 次提交
  6. 28 10月, 2009 2 次提交
  7. 08 10月, 2009 1 次提交
  8. 07 10月, 2009 1 次提交
  9. 16 9月, 2009 1 次提交
  10. 15 9月, 2009 1 次提交
  11. 12 9月, 2009 1 次提交
    • M
      net: Add DEVTYPE support for Ethernet based devices · 384912ed
      Marcel Holtmann 提交于
      The Ethernet framing is used for a lot of devices these days. Most
      prominent are WiFi and WiMAX based devices. However for userspace
      application it is important to classify these devices correctly and
      not only see them as Ethernet devices. The daemons like HAL, DeviceKit
      or even NetworkManager with udev support tries to do the classification
      in userspace with a lot trickery and extra system calls. This is not
      good and actually reaches its limitations. Especially since the kernel
      does know the type of the Ethernet device it is pretty stupid.
      
      To solve this problem the underlying device type needs to be set and
      then the value will be exported as DEVTYPE via uevents and available
      within udev.
      
        # cat /sys/class/net/wlan0/uevent
        DEVTYPE=wlan
        INTERFACE=wlan0
        IFINDEX=5
      
      This is similar to subsystems like USB and SCSI that distinguish
      between hosts, devices, disks, partitions etc.
      
      The new SET_NETDEV_DEVTYPE() is a convenience helper to set the actual
      device type. All device types are free form, but for convenience the
      same strings as used with RFKILL are choosen.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      384912ed
  12. 06 9月, 2009 1 次提交
    • P
      net_sched: reintroduce dev->qdisc for use by sch_api · af356afa
      Patrick McHardy 提交于
      Currently the multiqueue integration with the qdisc API suffers from
      a few problems:
      
      - with multiple queues, all root qdiscs use the same handle. This means
        they can't be exposed to userspace in a backwards compatible fashion.
      
      - all API operations always refer to queue number 0. Newly created
        qdiscs are automatically shared between all queues, its not possible
        to address individual queues or restore multiqueue behaviour once a
        shared qdisc has been attached.
      
      - Dumps only contain the root qdisc of queue 0, in case of non-shared
        qdiscs this means the statistics are incomplete.
      
      This patch reintroduces dev->qdisc, which points to the (single) root qdisc
      from userspace's point of view. Currently it either points to the first
      (non-shared) default qdisc, or a qdisc shared between all queues. The
      following patches will introduce a classful dummy qdisc, which will be used
      as root qdisc and contain the per-queue qdiscs as children.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      af356afa
  13. 01 9月, 2009 2 次提交
  14. 31 8月, 2009 1 次提交
  15. 15 8月, 2009 1 次提交
  16. 06 7月, 2009 1 次提交
  17. 18 6月, 2009 1 次提交
    • J
      net: group address list and its count · 31278e71
      Jiri Pirko 提交于
      This patch is inspired by patch recently posted by Johannes Berg. Basically what
      my patch does is to group list and a count of addresses into newly introduced
      structure netdev_hw_addr_list. This brings us two benefits:
      1) struct net_device becames a bit nicer.
      2) in the future there will be a possibility to operate with lists independently
         on netdevices (with exporting right functions).
      I wanted to introduce this patch before I'll post a multicast lists conversion.
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      
       drivers/net/bnx2.c              |    4 +-
       drivers/net/e1000/e1000_main.c  |    4 +-
       drivers/net/ixgbe/ixgbe_main.c  |    6 +-
       drivers/net/mv643xx_eth.c       |    2 +-
       drivers/net/niu.c               |    4 +-
       drivers/net/virtio_net.c        |   10 ++--
       drivers/s390/net/qeth_l2_main.c |    2 +-
       include/linux/netdevice.h       |   17 +++--
       net/core/dev.c                  |  130 ++++++++++++++++++--------------------
       9 files changed, 89 insertions(+), 90 deletions(-)
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      31278e71
  18. 09 6月, 2009 1 次提交
  19. 04 6月, 2009 1 次提交
    • H
      gso: Stop fraglists from escaping · 278b2513
      Herbert Xu 提交于
      As it stands skb fraglists can get past the check in dev_queue_xmit
      if the skb is marked as GSO.  In particular, if the packet doesn't
      have the proper checksums for GSO, but can otherwise be handled by
      the underlying device, we will not perform the fraglist check on it
      at all.
      
      If the underlying device cannot handle fraglists, then this will
      break.
      
      The fix is as simple as moving the fraglist check from the device
      check into skb_gso_ok.
      
      This has caused crashes with Xen when used together with GRO which
      can generate GSO packets with fraglists.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      278b2513
  20. 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
  21. 29 5月, 2009 1 次提交
    • J
      bonding: allow bond in mode balance-alb to work properly in bridge -try4.3 · 5d4e039b
      Jiri Pirko 提交于
      [PATCH net-next] bonding: allow bond in mode balance-alb to work properly in bridge -try4.3
      
      (updated)
      changes v4.2 -> v4.3
      - memcpy the address always, not just in case it differs from master->dev_addr
      - compare_ether_addr_64bits() is not used so there is no direct need to make new
        header file (I think it would be good to have bond stuff in separate file
        anyway).
      
      changes v4.1 -> v4.2
      - use skb->pkt_type == PACKET_HOST compare rather then comparing skb dest addr
        against skb->dev->dev_addr
      
      The problem is described in following bugzilla:
      https://bugzilla.redhat.com/show_bug.cgi?id=487763
      
      Basically here's what's going on. In every mode, bonding interface uses the same
      mac address for all enslaved devices (except fail_over_mac). Only balance-alb
      will simultaneously use multiple MAC addresses across different slaves. When you
      put this kind of bond device into a bridge it will only add one of mac adresses
      into a hash list of mac addresses, say X. This mac address is marked as local.
      But this bonding interface also has mac address Y. Now then packet arrives with
      destination address Y, this address is not marked as local and the packed looks
      like it needs to be forwarded. This packet is then lost which is wrong.
      
      Notice that interfaces can be added and removed from bond while it is in bridge.
      
      ***
      When the multiple addresses for bridge port approach failed to solve this issue
      due to STP I started to think other way to solve this. I returned to previous
      solution but tweaked one.
      
      This patch solves the situation in the bonding without touching bridge code.
      For every incoming frame to bonding the destination address is compared to
      current address of the slave device from which tha packet came. If these two
      match destination address is replaced by mac address of the master. This address
      is known by bridge so it is delivered properly. Note that the comparsion is not
      made directly, it's used skb->pkt_type == PACKET_HOST instead. This is "set"
      previously in eth_type_trans().
      
      I experimentally tried that this works as good as searching through the slave
      list (v4 of this patch).
      
      Jirka
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5d4e039b
  22. 28 5月, 2009 2 次提交
  23. 27 5月, 2009 4 次提交
  24. 26 5月, 2009 1 次提交
    • E
      net: txq_trans_update() helper · 08baf561
      Eric Dumazet 提交于
      We would like to get rid of netdev->trans_start = jiffies; that about all net
      drivers have to use in their start_xmit() function, and use txq->trans_start
      instead.
      
      This can be done generically in core network, as suggested by David.
      
      Some devices, (particularly loopback) dont need trans_start update, because
      they dont have transmit watchdog. We could add a new device flag, or rely
      on fact that txq->tran_start can be updated is txq->xmit_lock_owner is
      different than -1. Use a helper function to hide our choice.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      08baf561
  25. 25 5月, 2009 1 次提交
  26. 19 5月, 2009 1 次提交
    • E
      net: add tx_packets/tx_bytes/tx_dropped counters in struct netdev_queue · 7004bf25
      Eric Dumazet 提交于
      offsetof(struct net_device, features)=0x44
      offsetof(struct net_device, stats.tx_packets)=0x54
      offsetof(struct net_device, stats.tx_bytes)=0x5c
      offsetof(struct net_device, stats.tx_dropped)=0x6c
      
      Network drivers that touch dev->stats.tx_packets/stats.tx_bytes in their
      tx path can slow down SMP operations, since they dirty a cache line
      that should stay shared (dev->features is needed in rx and tx paths)
      
      We could move away stats field in net_device but it wont help that much.
      (Two cache lines dirtied in tx path, we can do one only)
      
      Better solution is to add tx_packets/tx_bytes/tx_dropped in struct
      netdev_queue because this structure is already touched in tx path and
      counters updates will then be free (no increase in size)
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7004bf25
  27. 18 5月, 2009 1 次提交
    • E
      net: tx scalability works : trans_start · 9d21493b
      Eric Dumazet 提交于
      struct net_device trans_start field is a hot spot on SMP and high performance
      devices, particularly multi queues ones, because every transmitter dirties
      it. Is main use is tx watchdog and bonding alive checks.
      
      But as most devices dont use NETIF_F_LLTX, we have to lock
      a netdev_queue before calling their ndo_start_xmit(). So it makes
      sense to move trans_start from net_device to netdev_queue. Its update
      will occur on a already present (and in exclusive state) cache line, for
      free.
      
      We can do this transition smoothly. An old driver continue to
      update dev->trans_start, while an updated one updates txq->trans_start.
      
      Further patches could also put tx_bytes/tx_packets counters in 
      netdev_queue to avoid dirtying dev->stats (vlan device comes to mind)
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9d21493b
  28. 07 5月, 2009 1 次提交
  29. 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
  30. 28 4月, 2009 2 次提交
  31. 27 4月, 2009 1 次提交