1. 08 Jul, 2019 8 commits
    • Yamin Friedman's avatar
      linux/dim: Implement RDMA adaptive moderation (DIM) · f4915455
      Yamin Friedman authored
      RDMA DIM implements a different algorithm from net DIM and is based on
      completions which is how we can implement interrupt moderation in RDMA.
      
      The algorithm optimizes for number of completions and ratio between
      completions and events. In order to avoid long latencies, the
      implementation performs fast reduction of moderation level when the
      traffic changes.
      Signed-off-by: default avatarYamin Friedman <yaminf@mellanox.com>
      Reviewed-by: default avatarMax Gurtovoy <maxg@mellanox.com>
      Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      f4915455
    • Jason Gunthorpe's avatar
      Merge tag 'blk-dim-v2' into rdma.git for-next · 2ef38e38
      Jason Gunthorpe authored
      Generic DIM
      
      From: Tal Gilboa and Yamin Fridman
      
      Implement net DIM over a generic DIM library, add RDMA DIM
      
      dim.h lib exposes an implementation of the DIM algorithm for
      dynamically-tuned interrupt moderation for networking interfaces.
      
      We want a similar functionality for other protocols, which might need to
      optimize interrupts differently. Main motivation here is DIM for NVMf
      storage protocol.
      
      Current DIM implementation prioritizes reducing interrupt overhead over
      latency. Also, in order to reduce DIM's own overhead, the algorithm might
      take some time to identify it needs to change profiles. While this is
      acceptable for networking, it might not work well on other scenarios.
      
      Here we propose a new structure to DIM. The idea is to allow a slightly
      modified functionality without the risk of breaking Net DIM behavior for
      netdev. We verified there are no degradations in current DIM behavior with
      the modified solution.
      
      Suggested solution:
      - Common logic is implemented in lib/dim/dim.c
      - Net DIM (existing) logic is implemented in lib/dim/net_dim.c, which uses
        the common logic in dim.c
      - Any new DIM logic will be implemented in "lib/dim/new_dim.c".
        This new implementation will expose modified versions of profiles,
        dim_step() and dim_decision().
      - DIM API is declared in include/linux/dim.h for all implementations.
      
      Pros for this solution are:
      - Zero impact on existing net_dim implementation and usage
      - Relatively more code reuse (compared to two separate solutions)
      - Increased extensibility
      
      Required for dependencies in the next series.
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      2ef38e38
    • Danit Goldberg's avatar
      IB/mlx5: Report correctly tag matching rendezvous capability · 89705e92
      Danit Goldberg authored
      Userspace expects the IB_TM_CAP_RC bit to indicate that the device
      supports RC transport tag matching with rendezvous offload. However the
      firmware splits this into two capabilities for eager and rendezvous tag
      matching.
      
      Only if the FW supports both modes should userspace be told the tag
      matching capability is available.
      
      Cc: <stable@vger.kernel.org> # 4.13
      Fixes: eb761894 ("IB/mlx5: Fill XRQ capabilities")
      Signed-off-by: default avatarDanit Goldberg <danitg@mellanox.com>
      Reviewed-by: default avatarYishai Hadas <yishaih@mellanox.com>
      Reviewed-by: default avatarArtemy Kovalyov <artemyko@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      89705e92
    • Mauro Carvalho Chehab's avatar
      docs: infiniband: add it to the driver-api bookset · a3a400da
      Mauro Carvalho Chehab authored
      While this contains some uAPI stuff, it was intended to be read by a
      kernel doc. So, let's not move it to a different dir, but, instead, just
      add it to the driver-api bookset.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      a3a400da
    • Jason Gunthorpe's avatar
      Merge branch 'vhca-tunnel' into rdma.git for-next · 20893d9d
      Jason Gunthorpe authored
      Max Gurtovoy says:
      
      ====================
      Those two patches introduce VHCA tunnel mechanism to DEVX interface
      needed for Bluefield SOC. See extensive commit messages for more
      information.
      ====================
      
      Based on the mlx5-next branch from
      git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux for
      dependencies
      
      * branch 'vcha-tunnel':
        IB/mlx5: Implement VHCA tunnel mechanism in DEVX
        net/mlx5: Introduce VHCA tunnel device capability
      20893d9d
    • Max Gurtovoy's avatar
      IB/mlx5: Implement VHCA tunnel mechanism in DEVX · b6142608
      Max Gurtovoy authored
      This mechanism will allow function-A to perform operations "on behalf" of
      function-B via tunnel object. Function-A will have privileges for creating
      and using this tunnel object.
      
      For example, in the device emulation feature presented in Bluefield-1 SoC,
      using device emulation capability, one can present NVMe function to the
      host OS.
      
      Since the NVMe function doesn't have a normal command interface to the HCA
      HW, here is a need to create a channel that will be able to issue commands
      "on behalf" of this function.
      
      This channel is the VHCA_TUNNEL general object. The emulation software
      will create this tunnel for every managed function and issue commands via
      devx general cmd interface using the appropriate tunnel ID. When devX
      context will receive a command with non-zero vhca_tunnel_id, it will pass
      the command as-is down to the HCA.
      
      All the validation, security and resource tracking of the commands and the
      created tunneled objects is in the responsibility of the HCA FW. When a
      VHCA_TUNNEL object destroyed, the device will issue an internal
      FLR (function level reset) to the emulated function associated with this
      tunnel. This will destroy all the created resources using the tunnel
      mechanism.
      Signed-off-by: default avatarMax Gurtovoy <maxg@mellanox.com>
      Reviewed-by: default avatarYishai Hadas <yishaih@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      b6142608
    • Jason Gunthorpe's avatar
      RDMA/rvt: Do not use a kernel header in the ABI · f10ff380
      Jason Gunthorpe authored
      rvt was using ib_sge as part of it's ABI, which is not allowed. Introduce
      a new struct with the same layout and use it instead.
      
      Fixes: dabac6e4 ("IB/hfi1: Move receive work queue struct into uapi directory")
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      f10ff380
    • Jason Gunthorpe's avatar
      RDMA/siw: Fix DEFINE_PER_CPU compilation when ARCH_NEEDS_WEAK_PER_CPU · 4c7d6dcd
      Jason Gunthorpe authored
      The initializer for the variable cannot be inside the macro (and zero
      initialization isn't needed anyhow).
      
      include/linux/percpu-defs.h:92:33: warning: '__pcpu_unique_use_cnt' initialized and declared 'extern'
        extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name;  \
                                       ^~~~~~~~~~~~~~
      include/linux/percpu-defs.h:115:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION'
        DEFINE_PER_CPU_SECTION(type, name, "")
        ^~~~~~~~~~~~~~~~~~~~~~
      drivers/infiniband/sw/siw/siw_main.c:129:8: note: in expansion of macro 'DEFINE_PER_CPU'
       static DEFINE_PER_CPU(atomic_t, use_cnt = ATOMIC_INIT(0));
              ^~~~~~~~~~~~~~
      
      Also the rules for PER_CPU require the variable names to be globally
      unique, so prefix them with siw_
      
      Fixes: b9be6f18 ("rdma/siw: transmit path")
      Fixes: bdcf26bf ("rdma/siw: network and RDMA core interface")
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      4c7d6dcd
  2. 07 Jul, 2019 6 commits
  3. 05 Jul, 2019 21 commits
  4. 04 Jul, 2019 5 commits