1. 01 3月, 2011 2 次提交
  2. 18 2月, 2011 1 次提交
    • B
      sfc: Implement hardware acceleration of RFS · 64d8ad6d
      Ben Hutchings 提交于
      Use the existing filter management functions to insert TCP/IPv4 and
      UDP/IPv4 4-tuple filters for Receive Flow Steering.
      
      For each channel, track how many RFS filters are being added during
      processing of received packets and scan the corresponding number of
      table entries for filters that may be reclaimed.  Do this in batches
      to reduce lock overhead.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      64d8ad6d
  3. 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: Distinguish queue lookup from test for queue existence · 525da907
      Ben Hutchings 提交于
      efx_channel_get_{rx,tx}_queue() currently return NULL if the channel
      isn't used for traffic in that direction.  In most cases this is a
      bug, but some callers rely on it as an existence test.
      
      Add existence test functions efx_channel_has_{rx_queue,tx_queues}()
      and use them as appropriate.
      
      Change efx_channel_get_{rx,tx}_queue() to assert that the requested
      queue exists.
      
      Remove now-redundant initialisation from efx_set_channels().
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      525da907
  4. 25 1月, 2011 1 次提交
  5. 14 1月, 2011 1 次提交
  6. 11 12月, 2010 2 次提交
    • 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
    • B
  7. 08 12月, 2010 1 次提交
    • B
      sfc: Fix crash in legacy onterrupt handler during ring reallocation · 94dec6a2
      Ben Hutchings 提交于
      If we are using a legacy interrupt, our IRQ may be shared and our
      interrupt handler may be called even though interrupts are disabled on
      the NIC. When we change ring sizes, we reallocate the event queue and
      the interrupt handler may use an invalid pointer when called for
      another device's interrupt.
      
      Maintain a legacy_irq_enabled flag and test that at the top of the
      interrupt handler.  Note that this problem results from the need to
      work around broken INT_ISR0 reads, and does not affect the legacy
      interrupt handler for Falcon A1.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      94dec6a2
  8. 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
      sfc: Reorder struct efx_nic to separate fields by volatility · ab28c12a
      Ben Hutchings 提交于
      Place the regularly updated fields (locks, MAC stats, etc.) on a
      separate cache-line from fields which are mostly constant.  This
      should reduce cache misses for access to the latter on the data path.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      ab28c12a
  9. 04 12月, 2010 6 次提交
  10. 21 10月, 2010 1 次提交
  11. 27 9月, 2010 1 次提交
  12. 23 9月, 2010 1 次提交
  13. 22 9月, 2010 2 次提交
  14. 14 9月, 2010 1 次提交
  15. 11 9月, 2010 5 次提交
  16. 09 7月, 2010 1 次提交
  17. 01 7月, 2010 1 次提交
  18. 26 6月, 2010 1 次提交
  19. 25 6月, 2010 3 次提交
  20. 03 6月, 2010 2 次提交
  21. 02 6月, 2010 3 次提交