Skip to content
Snippets Groups Projects
  1. Jul 27, 2011
    • Neil Horman's avatar
      net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared · 550fd08c
      Neil Horman authored
      
      After the last patch, We are left in a state in which only drivers calling
      ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
      hardware call ether_setup for their net_devices and don't hold any state in
      their skbs.  There are a handful of drivers that violate this assumption of
      course, and need to be fixed up.  This patch identifies those drivers, and marks
      them as not being able to support the safe transmission of skbs by clearning the
      IFF_TX_SKB_SHARING flag in priv_flags
      
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      CC: Karsten Keil <isdn@linux-pingi.de>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: Patrick McHardy <kaber@trash.net>
      CC: Krzysztof Halasa <khc@pm.waw.pl>
      CC: "John W. Linville" <linville@tuxdriver.com>
      CC: Greg Kroah-Hartman <gregkh@suse.de>
      CC: Marcel Holtmann <marcel@holtmann.org>
      CC: Johannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      550fd08c
  2. Jun 21, 2011
  3. Jun 06, 2011
  4. May 05, 2011
  5. Jan 03, 2011
    • Eric Dumazet's avatar
      ifb: add performance flags · 39980292
      Eric Dumazet authored
      
      Le lundi 03 janvier 2011 à 11:40 -0800, David Miller a écrit :
      > From: Jarek Poplawski <jarkao2@gmail.com>
      > Date: Mon, 3 Jan 2011 20:37:03 +0100
      >
      > > On Sun, Jan 02, 2011 at 09:24:36PM +0100, Eric Dumazet wrote:
      > >> Le mercredi 29 décembre 2010 ?? 00:07 +0100, Jarek Poplawski a écrit :
      > >>
      > >> > Ingress is before vlans handler so these features and the
      > >> > NETIF_F_HW_VLAN_TX flag seem useful for ifb considering
      > >> > dev_hard_start_xmit() checks.
      > >>
      > >> OK, here is v2 of the patch then, thanks everybody.
      > >>
      > >>
      > >> [PATCH v2 net-next-2.6] ifb: add performance flags
      > >>
      > >> IFB can use the full set of features flags (NETIF_F_SG |
      > >> NETIF_F_FRAGLIST | NETIF_F_TSO | NETIF_F_NO_CSUM | NETIF_F_HIGHDMA) to
      > >> avoid unnecessary split of some packets (GRO for example)
      > >>
      > >> Changli suggested to also set vlan_features,
      > >
      > > He also suggested more GSO flags of which especially NETIF_F_TSO6
      > > seems interesting (wrt GRO)?
      >
      > I think at least TSO6 would very much be appropriate here.
      
      Yes, why not, I am only wondering why loopback / dummy (and others ?)
      only set NETIF_F_TSO :)
      
      Since I want to play with ECN, I might also add NETIF_F_TSO_ECN ;)
      
      For other flags, I really doubt it can matter on ifb ?
      
      [PATCH v3 net-next-2.6] ifb: add performance flags
      
      IFB can use the full set of features flags (NETIF_F_SG |
      NETIF_F_FRAGLIST | NETIF_F_TSO | NETIF_F_NO_CSUM | NETIF_F_HIGHDMA) to
      avoid unnecessary split of some packets (GRO for example)
      
      Changli suggested to also set vlan_features, NETIF_F_TSO6,
      NETIF_F_TSO_ECN.
      
      Jarek suggested to add NETIF_F_HW_VLAN_TX as well.
      
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Cc: Changli Gao <xiaosuo@gmail.com>
      Cc: Jarek Poplawski <jarkao2@gmail.com>
      Cc: Pawel Staszewski <pstaszewski@itcare.pl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      39980292
  6. Dec 19, 2010
  7. Dec 16, 2010
  8. Dec 10, 2010
  9. Dec 08, 2010
  10. May 10, 2010
  11. Nov 20, 2009
  12. Nov 02, 2009
  13. Oct 22, 2009
  14. Sep 01, 2009
  15. Jul 05, 2009
  16. May 18, 2009
    • Eric Dumazet's avatar
      net: release dst entry in dev_hard_start_xmit() · 93f154b5
      Eric Dumazet authored
      
      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: default avatarEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      93f154b5
  17. Nov 20, 2008
  18. Nov 19, 2008
  19. Jul 31, 2008
  20. Jul 17, 2008
    • David S. Miller's avatar
      pkt_sched: Kill netdev_queue lock. · 83874000
      David S. Miller authored
      
      We can simply use the qdisc->q.lock for all of the
      qdisc tree synchronization.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      83874000
    • David S. Miller's avatar
      netdev: Allocate multiple queues for TX. · e8a0464c
      David S. Miller authored
      
      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: default avatarDavid S. Miller <davem@davemloft.net>
      e8a0464c
  21. Jul 08, 2008
  22. Mar 20, 2008
    • Jarek Poplawski's avatar
      [NET] ifb: set separate lockdep classes for queue locks · 94833dfb
      Jarek Poplawski authored
      
      [   10.536424] =======================================================
      [   10.536424] [ INFO: possible circular locking dependency detected ]
      [   10.536424] 2.6.25-rc3-devel #3
      [   10.536424] -------------------------------------------------------
      [   10.536424] swapper/0 is trying to acquire lock:
      [   10.536424]  (&dev->queue_lock){-+..}, at: [<c0299b4a>] 
      dev_queue_xmit+0x175/0x2f3
      [   10.536424]
      [   10.536424] but task is already holding lock:
      [   10.536424]  (&p->tcfc_lock){-+..}, at: [<f8a67154>] tcf_mirred+0x20/0x178 
      [act_mirred]
      [   10.536424]
      [   10.536424] which lock already depends on the new lock.
      
      lockdep warns of locking order while using ifb with sch_ingress and
      act_mirred: ingress_lock, tcfc_lock, queue_lock (usually queue_lock
      is at the beginning). This patch is only to tell lockdep that ifb is
      a different device (e.g. from eth) and has its own pair of queue
      locks. (This warning is a false-positive in common scenario of using
      ifb; yet there are possible situations, when this order could be
      dangerous; lockdep should warn in such a case.) (With suggestions by
      David S. Miller)
      
      Reported-and-tested-by: default avatarDenys Fedoryshchenko <denys@visp.net.lb>
      Signed-off-by: default avatarJarek Poplawski <jarkao2@gmail.com>
      Acked-by: default avatarJamal Hadi Salim <hadi@cyberus.ca>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      94833dfb
  23. Oct 10, 2007
    • Jeff Garzik's avatar
      [NET] drivers/net: statistics cleanup #1 -- save memory and shrink code · 09f75cd7
      Jeff Garzik authored
      
      We now have struct net_device_stats embedded in struct net_device,
      and the default ->get_stats() hook does the obvious thing for us.
      
      Run through drivers/net/* and remove the driver-local storage of
      statistics, and driver-local ->get_stats() hook where applicable.
      
      This was just the low-hanging fruit in drivers/net; plenty more drivers
      remain to be updated.
      
      [ Resolved conflicts with napi_struct changes and fix sunqe build
        regression... -DaveM ]
      
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      09f75cd7
    • Ralf Baechle's avatar
      [NET]: Nuke SET_MODULE_OWNER macro. · 10d024c1
      Ralf Baechle authored
      
      It's been a useless no-op for long enough in 2.6 so I figured it's time to
      remove it.  The number of people that could object because they're
      maintaining unified 2.4 and 2.6 drivers is probably rather small.
      
      [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ]
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      10d024c1
    • Eric W. Biederman's avatar
      [NET]: Make the device list and device lookups per namespace. · 881d966b
      Eric W. Biederman authored
      
      This patch makes most of the generic device layer network
      namespace safe.  This patch makes dev_base_head a
      network namespace variable, and then it picks up
      a few associated variables.  The functions:
      dev_getbyhwaddr
      dev_getfirsthwbytype
      dev_get_by_flags
      dev_get_by_name
      __dev_get_by_name
      dev_get_by_index
      __dev_get_by_index
      dev_ioctl
      dev_ethtool
      dev_load
      wireless_process_ioctl
      
      were modified to take a network namespace argument, and
      deal with it.
      
      vlan_ioctl_set and brioctl_set were modified so their
      hooks will receive a network namespace argument.
      
      So basically anthing in the core of the network stack that was
      affected to by the change of dev_base was modified to handle
      multiple network namespaces.  The rest of the network stack was
      simply modified to explicitly use &init_net the initial network
      namespace.  This can be fixed when those components of the network
      stack are modified to handle multiple network namespaces.
      
      For now the ifindex generator is left global.
      
      Fundametally ifindex numbers are per namespace, or else
      we will have corner case problems with migration when
      we get that far.
      
      At the same time there are assumptions in the network stack
      that the ifindex of a network device won't change.  Making
      the ifindex number global seems a good compromise until
      the network stack can cope with ifindex changes when
      you change namespaces, and the like.
      
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      881d966b
  24. Jul 11, 2007
  25. Jul 10, 2007
  26. Mar 29, 2007
  27. Jan 30, 2007
  28. Jan 03, 2007
  29. Oct 03, 2006
  30. Sep 13, 2006
  31. Jul 21, 2006
Loading