An error occurred fetching the project authors.
  1. 16 Feb, 2012 3 commits
  2. 13 Feb, 2012 1 commit
  3. 27 Jan, 2012 4 commits
    • Ben Hutchings's avatar
      sfc: Replace efx_rx_buffer::is_page and other booleans with a flags field · db339569
      Ben Hutchings authored
      Replace checksummed and discard booleans from efx_handle_rx_event()
      with a bitmask, added to the flags field.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      db339569
    • Ben Hutchings's avatar
      sfc: Remove remnants of on-load self-test · 73ba7b68
      Ben Hutchings authored
      The out-of-tree version of the sfc driver used to run a self-test on
      each device before registering it.  Although this was never included
      in-tree, some functions have checks for this special case which is not
      really possible.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      73ba7b68
    • Ben Hutchings's avatar
      sfc: Clean up test interrupt handling · 1646a6f3
      Ben Hutchings authored
      Interrupts are normally generated by the event queues, moderated by
      timers.  However, they may also be triggered by detection of a 'fatal'
      error condition (e.g. memory parity error) or by the host writing to
      certain CSR fields as part of a self-test.
      
      The IRQ level/index used for these on Falcon rev B0 and Siena is set
      by the KER_INT_LEVE_SEL field and cached by the driver in
      efx_nic::fatal_irq_level.  Since this value is also relevant to
      self-tests rename the field to just 'irq_level'.
      
      Avoid unnecessary cache traffic by using a per-channel 'last_irq_cpu'
      field and only writing to the per-controller field when the interrupt
      matches efx_nic::irq_level.  Remove the volatile qualifier and use
      ACCESS_ONCE in the places we read these fields.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      1646a6f3
    • Ben Hutchings's avatar
      sfc: Consistently test DEBUG macro, not EFX_ENABLE_DEBUG · 5f3f9d6c
      Ben Hutchings authored
      The netif_dbg() macro is defined in <linux/netdevice.h>.  If the DEBUG
      macro is defined, it logs a message at 'debug' level, otherwise it
      does nothing.
      
      In net_driver.h we define DEBUG if EFX_ENABLE_DEBUG is defined, but
      this is too late for those source files that already got a
      definition of netif_dbg() by including <linux/netdevice.h>
      
      Get rid of EFX_ENABLE_DEBUG, and only define and test DEBUG.
      
      In mtd.c, we do not use DEBUG as a condition flag but are forced to
      use the DEBUG macro-function from <linux/mtd/mtd.h>.  Undefine DEBUG
      before including it.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      5f3f9d6c
  4. 05 Jan, 2012 1 commit
  5. 11 Aug, 2011 1 commit
  6. 07 Jun, 2011 1 commit
  7. 16 May, 2011 1 commit
  8. 12 Apr, 2011 1 commit
    • Ben Hutchings's avatar
      sfc: Do not use efx_process_channel_now() in online self-test · d4fabcc8
      Ben Hutchings authored
      During self-tests we use efx_process_channel_now() to handle
      completion and other events synchronously.  This disables interrupts
      and NAPI processing for the channel in question, but it may still be
      interrupted by another channel.  A single socket may receive packets
      from multiple net devices or even multiple channels of the same net
      device, so this can result in deadlock on a socket lock.
      
      Receiving packets in process context will also result in incorrect
      classification by the network cgroup classifier.
      
      Therefore, we must only use efx_process_channel_now() in the offline
      loopback tests (which never deliver packets up the stack) and not for
      the online interrupt and event tests.
      
      For the interrupt test, there is no reason to process events.  We
      only care that an interrupt is raised.
      
      For the event test, we want to know whether events have been received,
      and there may be many events ahead of the one we inject.  Therefore
      remove efx_channel::magic_count and instead test whether
      efx_channel::eventq_read_ptr advances.  This is currently an event
      queue index and might wrap around to exactly the same value, resulting
      in a false negative.  Therefore move the masking to efx_event() and
      efx_nic_eventq_read_ack() so that it cannot wrap within the time of
      the test.
      
      The event test also tries to diagnose failures by checking whether an
      event was delivered without causing an interrupt.  Add and use a
      helper function that only does this.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      d4fabcc8
  9. 01 Apr, 2011 1 commit
  10. 28 Feb, 2011 2 commits
  11. 15 Feb, 2011 1 commit
    • Ben Hutchings's avatar
      sfc: Add TX queues for high-priority traffic · 94b274bf
      Ben Hutchings authored
      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: default avatarBen Hutchings <bhutchings@solarflare.com>
      94b274bf
  12. 07 Dec, 2010 1 commit
    • Ben Hutchings's avatar
      sfc: Fix crash in legacy onterrupt handler during ring reallocation · 94dec6a2
      Ben Hutchings authored
      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: default avatarBen Hutchings <bhutchings@solarflare.com>
      94dec6a2
  13. 06 Dec, 2010 1 commit
    • Ben Hutchings's avatar
      sfc: Use TX push whenever adding descriptors to an empty queue · cd38557d
      Ben Hutchings authored
      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: default avatarBen Hutchings <bhutchings@solarflare.com>
      cd38557d
  14. 03 Dec, 2010 1 commit
  15. 21 Oct, 2010 1 commit
  16. 27 Sep, 2010 1 commit
  17. 21 Sep, 2010 1 commit
  18. 10 Sep, 2010 5 commits
  19. 30 Jun, 2010 1 commit
  20. 25 Jun, 2010 2 commits
  21. 02 Jun, 2010 3 commits
    • Steve Hodgson's avatar
      sfc: Remove efx_rx_queue::add_lock · 90d683af
      Steve Hodgson authored
      Ensure that efx_fast_push_rx_descriptors() must only run
      from efx_process_channel() [NAPI], or when napi_disable()
      has been executed.
      
      Reimplement the slow fill by sending an event to the
      channel, so that NAPI runs, and hanging the subsequent
      fast fill off the event handler. Replace the sfc_refill
      workqueue and delayed work items with a timer. We do
      not need to stop this timer in efx_flush_all() because
      it's safe to send the event always; receiving it will
      be delayed until NAPI is restarted.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90d683af
    • Steve Hodgson's avatar
      sfc: Allow DRV_GEN events to be used outside of selftests · d730dc52
      Steve Hodgson authored
      Formerly, efx_test_eventq_irq() assumed it was the only user of
      driver generated events. Allow it to interoperate with other users.
      
      We can create more than 16 channels, so align event codes with
      a multiple of 256 not 16.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d730dc52
    • Steve Hodgson's avatar
      sfc: Workaround flush failures on Falcon B0 · fd371e32
      Steve Hodgson authored
      Under certain conditions a PHY may backpressure Falcon B0
      in such a way that flushes timeout. In normal circumstances
      the phy poller would fix the PHY, and the flush could complete.
      
      But efx_nic_flush_queues() is always called after efx_stop_all(),
      so the poller has been stopped. Even if this weren't the case,
      how long would we have to wait for the poller to fix this? And
      several callers of efx_nic_flush_queues() are about to reset
      the device anyway - so we don't need to do anything.
      
      Work around this bug by scheduling a reset. Ensure that the
      MAC is never rewired back into the datapath before the reset
      runs (we already ignore all rx events anyway).
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd371e32
  22. 28 Apr, 2010 6 commits