1. 15 2月, 2019 3 次提交
    • B
      net/mlx5: Provide an alternative VF upper bound for ECPF · feb39369
      Bodong Wang 提交于
      ECPF doesn't support SR-IOV, but an ECPF E-Switch manager shall know
      the max VFs supported by its peer host PF in order to control those
      VF vports.
      
      The current driver implementation uses the total vfs quantity as
      provided by the pci sub-system for an upper bound of the VF vports
      the e-switch code needs to deal with. This obviously can't work as
      is on ECPF e-switch manager. For now, we use a hard coded value of
      128 on such systems.
      Signed-off-by: NBodong Wang <bodong@mellanox.com>
      Reviewed-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      feb39369
    • B
      net/mlx5: Add host params change event · 7f0d11c7
      Bodong Wang 提交于
      In Embedded CPU (EC) configurations, the EC driver needs to know when
      the number of virtual functions change on the corresponding PF at the
      host side. This is required so the EC driver can create or destroy
      representor net devices that represent the VFs ports.
      
      Whenever a change in the number of VFs occurs, firmware will generate an
      event towards the EC which will trigger a work to complete the rest of
      the handling. The specifics of the handling will be introduced in a
      downstream patch.
      Signed-off-by: NBodong Wang <bodong@mellanox.com>
      Signed-off-by: NEli Cohen <eli@mellanox.com>
      Reviewed-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      7f0d11c7
    • B
      net/mlx5: Introduce Mellanox SmartNIC and modify page management logic · 591905ba
      Bodong Wang 提交于
      Mellanox's SmartNIC combines embedded CPU(e.g, ARM) processing power
      with advanced network offloads to accelerate a multitude of security,
      networking and storage applications.
      
      With the introduction of the SmartNIC, there is a new PCI function
      called Embedded CPU Physical Function(ECPF). And it's possible for a
      PF to get its ICM pages from the ECPF PCI function. Driver shall
      identify if it is running on such a function by reading a bit in
      the initialization segment.
      
      When firmware asks for pages, it would issue a page request event
      specifying how many pages it requests and for which function. That
      driver responds with a manage_pages command providing the requested
      pages along with an indication for which function it is providing these
      pages.
      
      The encoding before this patch was as follows:
          function_id == 0: pages are requested for the function receiving
                            the EQE.
          function_id != 0: pages are requested for VF identified by the
                            function_id value
      
      A new one bit field in the EQE identifies that pages are requested for
      the ECPF.
      
      The notion of page_supplier can be introduced here and to support that,
      manage pages and query pages were modified so firmware can distinguish
      the following cases:
      
      1. Function provides pages for itself
      2. PF provides pages for its VF
      3. ECPF provides pages to itself
      4. ECPF provides pages for another function
      
      This distinction is possible through the introduction of the bit
      "embedded_cpu_function" in query_pages, manage_pages and page request
      EQE.
      Signed-off-by: NBodong Wang <bodong@mellanox.com>
      Signed-off-by: NEli Cohen <eli@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      591905ba
  2. 24 1月, 2019 1 次提交
  3. 15 1月, 2019 1 次提交
  4. 15 12月, 2018 2 次提交
  5. 12 12月, 2018 1 次提交
  6. 11 12月, 2018 1 次提交
  7. 04 12月, 2018 2 次提交
  8. 30 11月, 2018 6 次提交
  9. 27 11月, 2018 5 次提交
  10. 21 11月, 2018 8 次提交
  11. 09 11月, 2018 1 次提交
  12. 19 10月, 2018 2 次提交
  13. 17 10月, 2018 1 次提交
  14. 11 10月, 2018 2 次提交
    • T
      net/mlx5: WQ, fixes for fragmented WQ buffers API · 37fdffb2
      Tariq Toukan 提交于
      mlx5e netdevice used to calculate fragment edges by a call to
      mlx5_wq_cyc_get_frag_size(). This calculation did not give the correct
      indication for queues smaller than a PAGE_SIZE, (broken by default on
      PowerPC, where PAGE_SIZE == 64KB).  Here it is replaced by the correct new
      calls/API.
      
      Since (TX/RX) Work Queues buffers are fragmented, here we introduce
      changes to the API in core driver, so that it gets a stride index and
      returns the index of last stride on same fragment, and an additional
      wrapping function that returns the number of physically contiguous
      strides that can be written contiguously to the work queue.
      
      This obsoletes the following API functions, and their buggy
      usage in EN driver:
      * mlx5_wq_cyc_get_frag_size()
      * mlx5_wq_cyc_ctr2fragix()
      
      The new API improves modularity and hides the details of such
      calculation for mlx5e netdevice and mlx5_ib rdma drivers.
      
      New calculation is also more efficient, and improves performance
      as follows:
      
      Packet rate test: pktgen, UDP / IPv4, 64byte, single ring, 8K ring size.
      
      Before: 16,477,619 pps
      After:  17,085,793 pps
      
      3.7% improvement
      
      Fixes: 3a2f7033 ("net/mlx5: Use order-0 allocations for all WQ types")
      Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
      Reviewed-by: NEran Ben Elisha <eranbe@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      37fdffb2
    • D
      RDMA/netdev: Hoist alloc_netdev_mqs out of the driver · f6a8a19b
      Denis Drozdov 提交于
      netdev has several interfaces that expect to call alloc_netdev_mqs from
      the core code, with the driver only providing the arguments.  This is
      incompatible with the rdma_netdev interface that returns the netdev
      directly.
      
      Thus re-organize the API used by ipoib so that the verbs core code calls
      alloc_netdev_mqs for the driver. This is done by allowing the drivers to
      provide the allocation parameters via a 'get_params' callback and then
      initializing an allocated netdev as a second step.
      
      Fixes: cd565b4b ("IB/IPoIB: Support acceleration options callbacks")
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      Signed-off-by: NDenis Drozdov <denisd@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      f6a8a19b
  15. 02 10月, 2018 1 次提交
  16. 25 9月, 2018 1 次提交
  17. 06 9月, 2018 2 次提交
    • S
      net/mlx5e: Replace PTP clock lock from RW lock to seq lock · 64109f1d
      Shay Agroskin 提交于
      Changed "priv.clock.lock" lock from 'rw_lock' to 'seq_lock'
      in order to improve packet rate performance.
      
      Tested on Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz.
      Sent 64b packets between two peers connected by ConnectX-5,
      and measured packet rate for the receiver in three modes:
      	no time-stamping (base rate)
      	time-stamping using rw_lock (old lock) for critical region
      	time-stamping using seq_lock (new lock) for critical region
      Only the receiver time stamped its packets.
      
      The measured packet rate improvements are:
      
      	Single flow (multiple TX rings to single RX ring):
      		without timestamping:	  4.26 (M packets)/sec
      		with rw-lock (old lock):  4.1  (M packets)/sec
      		with seq-lock (new lock): 4.16 (M packets)/sec
      		1.46% improvement
      
      	Multiple flows (multiple TX rings to six RX rings):
      		without timestamping: 	  22   (M packets)/sec
      		with rw-lock (old lock):  11.7 (M packets)/sec
      		with seq-lock (new lock): 21.3 (M packets)/sec
      		82.05% improvement
      
      The packet rate improvement is due to the lack of atomic operations
      for the 'readers' by the seq-lock.
      Since there are much more 'readers' than 'writers' contention
      on this lock, almost all atomic operations are saved.
      this results in a dramatic decrease in overall
      cache misses.
      Signed-off-by: NShay Agroskin <shayag@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      64109f1d
    • V
      net/mlx5: Add flow counters idr · 12d6066c
      Vlad Buslov 提交于
      Previous patch in series changed flow counter storage structure from
      rb_tree to linked list in order to improve flow counter traversal
      performance. The drawback of such solution is that flow counter lookup by
      id becomes linear in complexity.
      
      Store pointers to flow counters in idr in order to improve lookup
      performance to logarithmic again. Idr is non-intrusive data structure and
      doesn't require extending flow counter struct with new elements. This means
      that idr can be used for lookup, while linked list from previous patch is
      used for traversal, and struct mlx5_fc size is <= 2 cache lines.
      Signed-off-by: NVlad Buslov <vladbu@mellanox.com>
      Acked-by: NAmir Vadai <amir@vadai.me>
      Reviewed-by: NPaul Blakey <paulb@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      12d6066c