1. 12 Apr, 2011 2 commits
    • 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
    • Neil Turton's avatar
      sfc: Stop the TX queues during loopback self-tests · 9d1aea62
      Neil Turton authored
      If the TX queues are running during loopback self tests, host
      traffic gets looped back which causes the test to fail.  Avoid
      restarting the TX queues after the port reset so that any packets
      sent by the host get held back until after the tests have completed.
      
      [bwh: Also wake all TX queues at the end of self-tests.]
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      9d1aea62
  2. 11 Apr, 2011 16 commits
  3. 10 Apr, 2011 1 commit
  4. 09 Apr, 2011 3 commits
  5. 08 Apr, 2011 8 commits
  6. 07 Apr, 2011 10 commits