1. 21 9月, 2013 3 次提交
    • B
      sfc: Allocate and link PIO buffers; map them with write-combining · 183233be
      Ben Hutchings 提交于
      Try to allocate a segment of PIO buffer to each TX channel.  If
      allocation fails, log an error but continue.
      
      PIO buffers must be mapped separately from the NIC registers, with
      write-combining enabled.  Where the host page size is 4K, we could
      potentially map each VI's registers and PIO buffer separately.
      However, this would add significant complexity, and we also need to
      support architectures such as POWER which have a greater page size.
      So make a single contiguous write-combining mapping after the
      uncacheable mapping, aligned to the host page size, and link PIO
      buffers there.  Where necessary, allocate additional VIs within
      the write-combining mapping purely for access to PIO buffers.
      
      Link all TX buffers to TX queues and the additional VIs in
      efx_ef10_dimension_resources() and in efx_ef10_init_nic() after
      an MC reboot.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      183233be
    • B
      sfc: Implement firmware-assisted TSO for EF10 · dfa50be9
      Ben Hutchings 提交于
      Segmentation remains in the driver, but we generate option descriptors
      describing the required packet editing rather than making our own
      copies.
      
      Reduce tso_state::ipv4_id to 16 bits, so it doesn't overflow into the
      TCP_FLAGS field of the option descriptor.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      dfa50be9
    • B
      c78c39e6
  2. 30 8月, 2013 2 次提交
  3. 28 8月, 2013 1 次提交
  4. 22 8月, 2013 2 次提交
  5. 19 9月, 2012 1 次提交
  6. 25 8月, 2012 5 次提交
  7. 02 8月, 2012 1 次提交
    • B
      sfc: Fix maximum number of TSO segments and minimum TX queue size · 7e6d06f0
      Ben Hutchings 提交于
      Currently an skb requiring TSO may not fit within a minimum-size TX
      queue.  The TX queue selected for the skb may stall and trigger the TX
      watchdog repeatedly (since the problem skb will be retried after the
      TX reset).  This issue is designated as CVE-2012-3412.
      
      Set the maximum number of TSO segments for our devices to 100.  This
      should make no difference to behaviour unless the actual MSS is less
      than about 700.  Increase the minimum TX queue size accordingly to
      allow for 2 worst-case skbs, so that there will definitely be space
      to add an skb after we wake a queue.
      
      To avoid invalidating existing configurations, change
      efx_ethtool_set_ringparam() to fix up values that are too small rather
      than returning -EINVAL.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7e6d06f0
  8. 17 7月, 2012 3 次提交
  9. 23 2月, 2012 1 次提交
  10. 14 2月, 2012 1 次提交
  11. 27 1月, 2012 1 次提交
  12. 04 12月, 2011 1 次提交
  13. 01 12月, 2011 1 次提交
  14. 30 11月, 2011 1 次提交
  15. 19 10月, 2011 1 次提交
  16. 07 10月, 2011 1 次提交
  17. 23 9月, 2011 1 次提交
  18. 11 8月, 2011 1 次提交
  19. 17 5月, 2011 1 次提交
    • B
      sfc: Use netif_device_{detach,attach}() around reset and self-test · e4abce85
      Ben Hutchings 提交于
      We need to keep the TX queues stopped throughout a reset, without
      triggering the TX watchdog and regardless of the link state.  The
      proper way to do this is to use netif_device_{detach,attach}() just as
      we do around suspend/resume, rather than the current bodge of faking
      link-down.
      
      Since we also need to do this during an offline self-test and we
      perform a reset during that, add these function calls outside of
      efx_reset_down() and efx_reset_up().
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      e4abce85
  20. 12 4月, 2011 1 次提交
  21. 01 3月, 2011 1 次提交
  22. 16 2月, 2011 2 次提交
    • B
      sfc: Add TX queues for high-priority traffic · 94b274bf
      Ben Hutchings 提交于
      Implement the ndo_setup_tc() operation with 2 traffic classes.
      
      Current Solarstorm controllers do not implement TX queue priority, but
      they do allow queues to be 'paced' with an enforced delay between
      packets.  Paced and unpaced queues are scheduled in round-robin within
      two separate hardware bins (paced queues with a large delay may be
      placed into a third bin temporarily, but we won't use that).  If there
      are queues in both bins, the TX scheduler will alternate between them.
      
      If we make high-priority queues unpaced and best-effort queues paced,
      and high-priority queues are mostly empty, a single high-priority queue
      can then instantly take 50% of the packet rate regardless of how many
      of the best-effort queues have descriptors outstanding.
      
      We do not actually want an enforced delay between packets on best-
      effort queues, so we set the pace value to a reserved value that
      actually results in a delay of 0.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      94b274bf
    • B
      sfc: Move TX queue core queue mapping into tx.c · 60031fcc
      Ben Hutchings 提交于
      efx_hard_start_xmit() needs to implement a mapping which is the
      inverse of tx_queue::core_txq.  Move the initialisation of
      tx_queue::core_txq next to efx_hard_start_xmit() to make the
      connection more obvious.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      60031fcc
  23. 11 12月, 2010 1 次提交
    • B
      sfc: Remove ancient support for nesting of TX stop · c04bfc6b
      Ben Hutchings 提交于
      Long before this driver went into mainline, it had support for
      multiple TX queues per port, with lockless TX enabled.  Since Linux
      did not know anything of this, filling up any hardware TX queue would
      stop the core TX queue and multiple hardware TX queues could fill up
      before the scheduler reacted.  Thus it was necessary to keep a count
      of how many TX queues were stopped and to wake the core TX queue only
      when all had free space again.
      
      The driver also previously (ab)used the per-hardware-queue stopped
      flag as a counter to deal with various things that can inhibit TX, but
      it no longer does that.
      
      Remove the per-channel tx_stop_count, tx_stop_lock and
      per-hardware-queue stopped count and just use the networking core
      queue state directly.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      c04bfc6b
  24. 07 12月, 2010 2 次提交
    • B
      sfc: Use TX push whenever adding descriptors to an empty queue · cd38557d
      Ben Hutchings 提交于
      Whenever we add DMA descriptors to a TX ring and update the ring
      pointer, the TX DMA engine must first read the new DMA descriptors and
      then start reading packet data.  However, all released Solarflare 10G
      controllers have a 'TX push' feature that allows us to reduce latency
      by writing the first new DMA descriptor along with the pointer update.
      This is only useful when the queue is empty.  The hardware should
      ignore the pushed descriptor if the queue is not empty, but this check
      is buggy, so we must do it in software.
      
      In order to tell whether a TX queue is empty, we need to compare the
      previous transmission count (write_count) and completion count
      (read_count).  However, if we do that every time we update the ring
      pointer then read_count may ping-pong between the caches of two CPUs
      running the transmission and completion paths for the queue.
      Therefore, we split the check for an empty queue between the
      completion path and the transmission path:
      
      - Add an empty_read_count field representing a point at which the
        completion path saw the TX queue as empty.
      - Add an old_write_count field for use on the completion path.
      - On the completion path, whenever read_count reaches or passes
        old_write_count the TX queue may be empty.  We then read
        write_count, set empty_read_count if read_count == write_count,
        and update old_write_count.
      - On the transmission path, we read empty_read_count.  If it's set, we
        compare it with the value of write_count before the current set of
        descriptors was added.  If they match, the queue really is empty and
        we can use TX push.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      cd38557d
    • B
  25. 04 12月, 2010 1 次提交
  26. 11 9月, 2010 2 次提交
  27. 25 6月, 2010 1 次提交