1. 25 4月, 2018 1 次提交
    • E
      sfc: ARFS filter IDs · f8d62037
      Edward Cree 提交于
      Associate an arbitrary ID with each ARFS filter, allowing to properly query
       for expiry.  The association is maintained in a hash table, which is
       protected by a spinlock.
      
      v3: fix build warnings when CONFIG_RFS_ACCEL is disabled (thanks lkp-robot).
      v2: fixed uninitialised variable (thanks davem and lkp-robot).
      
      Fixes: 3af0f342 ("sfc: replace asynchronous filter operations")
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f8d62037
  2. 28 3月, 2018 2 次提交
    • E
      sfc: protect list of RSS contexts under a mutex · e0a65e3c
      Edward Cree 提交于
      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: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e0a65e3c
    • E
      sfc: replace asynchronous filter operations · 3af0f342
      Edward Cree 提交于
      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: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3af0f342
  3. 09 3月, 2018 1 次提交
  4. 11 1月, 2018 1 次提交
  5. 19 12月, 2017 1 次提交
  6. 25 10月, 2017 1 次提交
    • K
      net: ethernet/sfc: Convert timers to use timer_setup() · 7aa1402e
      Kees Cook 提交于
      In preparation for unconditionally passing the struct timer_list pointer to
      all timer callbacks, switch to using the new timer_setup() and from_timer()
      to pass the timer pointer explicitly.
      
      Cc: Solarflare linux maintainers <linux-net-drivers@solarflare.com>
      Cc: Edward Cree <ecree@solarflare.com>
      Cc: Bert Kenward <bkenward@solarflare.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Jiri Pirko <jiri@mellanox.com>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: netdev@vger.kernel.org
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Acked-by: NBert Kenward <bkenward@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7aa1402e
  7. 08 8月, 2017 3 次提交
  8. 08 6月, 2017 1 次提交
  9. 25 4月, 2017 1 次提交
  10. 18 2月, 2017 1 次提交
  11. 13 8月, 2016 1 次提交
  12. 16 6月, 2016 1 次提交
  13. 17 2月, 2016 2 次提交
  14. 12 12月, 2015 1 次提交
  15. 29 8月, 2015 1 次提交
    • S
      sfc: Allow driver to cope with a lower number of VIs than it needs for RSS · b0fbdae1
      Shradha Shah 提交于
      Previously, the driver would refuse to load if it couldn't secure
      enough VIs from the MC to fulfill its RSS requirements.
      This was causing probe to fail on later functions in
      configurations where we'd run out of VIs, such as having many
      VFs.
      
      This change allows the driver to load with fewer VIs, down to a
      minimum of 2. A warning will be printed saying that RSS
      requirements were not met, possibly affecting performance.
      
      efx->max_tx_channels needs to be set to avoid going down the
      failure path in efx_probe_nic() immediately in the loop after the
      probe() NIC-type function.
      Also, Set rc=ENOSPC when bombing out of efx_probe_nic due to lack
      of VIs.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0fbdae1
  16. 22 5月, 2015 2 次提交
  17. 10 5月, 2015 3 次提交
  18. 09 4月, 2015 2 次提交
  19. 23 7月, 2014 1 次提交
  20. 16 7月, 2014 1 次提交
  21. 13 2月, 2014 1 次提交
  22. 24 1月, 2014 1 次提交
  23. 13 12月, 2013 3 次提交
  24. 25 9月, 2013 1 次提交
    • J
      sfc: Remove extern from function prototypes · 00aef986
      Joe Perches 提交于
      There are a mix of function prototypes with and without extern
      in the kernel sources.  Standardize on not using extern for
      function prototypes.
      
      Function prototypes don't need to be written with extern.
      extern is assumed by the compiler.  Its use is as unnecessary as
      using auto to declare automatic/local variables in a block.
      Signed-off-by: NJoe Perches <joe@perches.com>
      00aef986
  25. 21 9月, 2013 1 次提交
    • 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
  26. 30 8月, 2013 2 次提交
  27. 28 8月, 2013 1 次提交
    • B
      sfc: Move MTD operations into efx_nic_type · 45a3fd55
      Ben Hutchings 提交于
      Merge the per-NIC-type MTD probe selection and struct efx_mtd_ops into
      struct efx_nic_type.  Move the implementations into the appropriate
      source files.
      
      Several NVRAM functions are now only called from MTD operations which
      are now implemented in the same file (falcon.c or mcdi.c).  There is no
      need for them to be extern, or to be defined at all if CONFIG_SFC_MTD
      is not enabled, so move them into the #ifdef CONFIG_SFC_MTD sections
      in those files.
      
      Most of the SPI-related definitions are also only used in falcon.c,
      so move them there.  Put the remainder of spi.h into nic.h (which
      previously included it).
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      45a3fd55
  28. 23 8月, 2013 1 次提交
  29. 22 8月, 2013 1 次提交
    • B
      sfc: Refactor queue teardown sequence to allow for EF10 flush behaviour · e42c3d85
      Ben Hutchings 提交于
      Currently efx_stop_datapath() will try to flush our DMA queues (if DMA
      is enabled), then finalise software and hardware state for each queue.
      However, for EF10 we must ask the MC to finalise each queue, which
      implicitly starts flushing it, and then wait for the flush events.
      We therefore need to delegate more of this to the NIC type.
      
      Combine all the hardware operations into a new NIC-type operation
      efx_nic_type::fini_dmaq, and call this before tearing down the
      software state and buffers for all the DMA queues.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      e42c3d85