1. 29 Mar, 2018 14 commits
  2. 28 Mar, 2018 15 commits
  3. 27 Mar, 2018 11 commits
    • David Howells's avatar
      rxrpc: Trace call completion · 1bae5d22
      David Howells authored
      Add a tracepoint to track rxrpc calls moving into the completed state and
      to log the completion type and the recorded error value and abort code.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      1bae5d22
    • David Howells's avatar
      rxrpc, afs: Use debug_ids rather than pointers in traces · a25e21f0
      David Howells authored
      In rxrpc and afs, use the debug_ids that are monotonically allocated to
      various objects as they're allocated rather than pointers as kernel
      pointers are now hashed making them less useful.  Further, the debug ids
      aren't reused anywhere nearly as quickly.
      
      In addition, allow kernel services that use rxrpc, such as afs, to take
      numbers from the rxrpc counter, assign them to their own call struct and
      pass them in to rxrpc for both client and service calls so that the trace
      lines for each will have the same ID tag.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      a25e21f0
    • David Howells's avatar
      rxrpc: Trace resend · 827efed6
      David Howells authored
      Add a tracepoint to trace packet resend events and to dump the Tx
      annotation buffer for added illumination.
      Signed-off-by: default avatarDavid Howells <dhowells@rdhat.com>
      827efed6
    • David S. Miller's avatar
      Merge branch 'sfc-filter-locking' · 5d22d47b
      David S. Miller authored
      Edward Cree says:
      
      ====================
      sfc: rework locking around filter management
      
      The use of a spinlock to protect filter state combined with the need for a
       sleeping operation (MCDI) to apply that state to the NIC (on EF10) led to
       unfixable race conditions, around the handling of filter restoration after
       an MC reboot.
      So, this patch series removes the requirement to be able to modify the SW
       filter table from atomic context, by using a workqueue to request
       asynchronous filter operations (which are needed for ARFS).  Then, the
       filter table locks are changed to mutexes, replacing the dance of spinlocks
       and 'busy' flags.  Also, a mutex is added to protect the RSS context state,
       since otherwise a similar race is possible around restoring that after an
       MC reboot.  While we're at it, fix a couple of other related bugs.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5d22d47b
    • Edward Cree's avatar
      sfc: fix flow type handling for RSS filters · a8e8fbeb
      Edward Cree authored
      The FLOW_RSS flag was causing us to insert UDP filters when TCP was wanted.
      
      Fixes: 42356d9a ("sfc: support RSS spreading of ethtool ntuple filters")
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a8e8fbeb
    • Edward Cree's avatar
      sfc: protect list of RSS contexts under a mutex · e0a65e3c
      Edward Cree authored
      Otherwise races are possible between ethtool ops and
       efx_ef10_rx_restore_rss_contexts().
      Also, don't try to perform the restore on every reset, only after an MC
       reboot, otherwise we'll leak RSS contexts on the NIC.
      
      Fixes: 42356d9a ("sfc: support RSS spreading of ethtool ntuple filters")
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e0a65e3c
    • Edward Cree's avatar
      sfc: return a better error if filter insertion collides with MC reboot · 31b84295
      Edward Cree authored
      If some other operation gets the MCDI lock ahead of us and performs an MC
       reboot, then our attempt to insert the filter will fail with EINVAL,
       because the destination VI (spec->dmaq_id, MC_CMD_FILTER_OP_IN_RX_QUEUE) does
       not exist.  But the caller's request (which might e.g. be an ethtool ntuple
       request from userland) isn't invalid, it just got unlucky; so return EAGAIN.
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      31b84295
    • Edward Cree's avatar
      sfc: use a semaphore to lock farch filters too · fc7a6c28
      Edward Cree authored
      With this change, the spinlock efx->filter_lock is no longer used and is
       thus removed.
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc7a6c28
    • Edward Cree's avatar
      sfc: give ef10 its own rwsem in the filter table instead of filter_lock · c2bebe37
      Edward Cree authored
      efx->filter_lock remains in place for use on farch, but EF10 now ignores it.
      EFX_EF10_FILTER_FLAG_BUSY is no longer needed, hence it is removed.
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c2bebe37
    • Edward Cree's avatar
      sfc: replace asynchronous filter operations · 3af0f342
      Edward Cree authored
      Instead of having an efx->type->filter_rfs_insert() method, just use
       workitems with a worker function that calls efx->type->filter_insert().
      The only user of this is efx_filter_rfs(), which now queues a call to
       efx_filter_rfs_work().
      Similarly, efx_filter_rfs_expire() is now a worker function called on a
       new channel->filter_work work_struct, so the method
       efx->type->filter_rfs_expire_one() is no longer called in atomic context.
       We also add a new mutex efx->rps_mutex to protect the RPS state (efx->
       rps_expire_channel, efx->rps_expire_index, and channel->rps_flow_id) so
       that the taking of efx->filter_lock can be moved to
       efx->type->filter_rfs_expire_one().
      Thus, all filter table functions are now called in a sleepable context,
       allowing them to use sleeping locks in a future patch.
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3af0f342
    • David S. Miller's avatar
      Merge branch 'pernet-all-async' · c709002c
      David S. Miller authored
      Kirill Tkhai says:
      
      ====================
      Make pernet_operations always read locked
      
      All the pernet_operations are converted, and the last one
      is in this patchset (nfsd_net_ops acked by J. Bruce Fields).
      So, it's the time to kill pernet_operations::async field,
      and make setup_net() and cleanup_net() always require
      the rwsem only read locked.
      
      All further pernet_operations have to be developed to fit
      this rule. Some of previous patches added a comment to
      struct pernet_operations about that.
      
      Also, this patchset renames net_sem to pernet_ops_rwsem
      to make the target area of the rwsem is more clear visible,
      and adds more comments.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c709002c