1. 15 1月, 2013 1 次提交
  2. 14 1月, 2013 7 次提交
  3. 12 1月, 2013 18 次提交
  4. 11 1月, 2013 6 次提交
    • A
      net: Add support for XPS without sysfs being defined · 024e9679
      Alexander Duyck 提交于
      This patch makes it so that we can support transmit packet steering without
      sysfs needing to be enabled.  The reason for making this change is to make
      it so that a driver can make use of the XPS even while the sysfs portion of
      the interface is not present.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      024e9679
    • A
      net: Rewrite netif_set_xps_queues to address several issues · 01c5f864
      Alexander Duyck 提交于
      This change is meant to address several issues I found within the
      netif_set_xps_queues function.
      
      If the allocation of one of the maps to be assigned to new_dev_maps failed
      we could end up with the device map in an inconsistent state since we had
      already worked through a number of CPUs and removed or added the queue.  To
      address that I split the process into several steps.  The first of which is
      just the allocation of updated maps for CPUs that will need larger maps to
      store the queue.  By doing this we can fail gracefully without actually
      altering the contents of the current device map.
      
      The second issue I found was the fact that we were always allocating a new
      device map even if we were not adding any queues.  I have updated the code
      so that we only allocate a new device map if we are adding queues,
      otherwise if we are not adding any queues to CPUs we just skip to the
      removal process.
      
      The last change I made was to reuse the code from remove_xps_queue to remove
      the queue from the CPU.  By making this change we can be consistent in how
      we go about adding and removing the queues from the CPUs.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      01c5f864
    • A
      net: Rewrite netif_reset_xps_queue to allow for better code reuse · 10cdc3f3
      Alexander Duyck 提交于
      This patch does a minor refactor on netif_reset_xps_queue to address a few
      items I noticed.
      
      First is the fact that we are doing removal of queues in both
      netif_reset_xps_queue and netif_set_xps_queue.  Since there is no need to
      have the code in two places I am pushing it out into a separate function
      and will come back in another patch and reuse the code in
      netif_set_xps_queue.
      
      The second item this change addresses is the fact that the Tx queues were
      not getting their numa_node value cleared as a part of the XPS queue reset.
      This patch resolves that by resetting the numa_node value if the dev_maps
      value is set.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      10cdc3f3
    • A
      net: Add functions netif_reset_xps_queue and netif_set_xps_queue · 537c00de
      Alexander Duyck 提交于
      This patch adds two functions, netif_reset_xps_queue and
      netif_set_xps_queue.  The main idea behind these two functions is to
      provide a mechanism through which drivers can update their defaults in
      regards to XPS.
      
      Currently no such mechanism exists and as a result we cannot use XPS for
      things such as ATR which would require a basic configuration to start in
      which the Tx queues are mapped to CPUs via a 1:1 mapping.  With this change
      I am making it possible for drivers such as ixgbe to be able to use the XPS
      feature by controlling the default configuration.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      537c00de
    • A
      net: Split core bits of netdev_pick_tx into __netdev_pick_tx · 416186fb
      Alexander Duyck 提交于
      This change splits the core bits of netdev_pick_tx into a separate function.
      The main idea behind this is to make this code accessible to select queue
      functions when they decide to process the standard path instead of their
      own custom path in their select queue routine.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      416186fb
    • E
      net_sched: more precise pkt_len computation · 1def9238
      Eric Dumazet 提交于
      One long standing problem with TSO/GSO/GRO packets is that skb->len
      doesn't represent a precise amount of bytes on wire.
      
      Headers are only accounted for the first segment.
      For TCP, thats typically 66 bytes per 1448 bytes segment missing,
      an error of 4.5 % for normal MSS value.
      
      As consequences :
      
      1) TBF/CBQ/HTB/NETEM/... can send more bytes than the assigned limits.
      2) Device stats are slightly under estimated as well.
      
      Fix this by taking account of headers in qdisc_skb_cb(skb)->pkt_len
      computation.
      
      Packet schedulers should use qdisc pkt_len instead of skb->len for their
      bandwidth limitations, and TSO enabled devices drivers could use pkt_len
      if their statistics are not hardware assisted, and if they don't scratch
      skb->cb[] first word.
      
      Both egress and ingress paths work, thanks to commit fda55eca
      (net: introduce skb_transport_header_was_set()) : If GRO built
      a GSO packet, it also set the transport header for us.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: Stephen Hemminger <shemminger@vyatta.com>
      Cc: Paolo Valente <paolo.valente@unimore.it>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Patrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1def9238
  5. 10 1月, 2013 7 次提交
  6. 09 1月, 2013 1 次提交