1. 05 3月, 2019 3 次提交
  2. 04 3月, 2019 2 次提交
  3. 26 2月, 2019 1 次提交
  4. 23 2月, 2019 4 次提交
    • L
      RDMA: Handle ucontext allocations by IB/core · a2a074ef
      Leon Romanovsky 提交于
      Following the PD conversion patch, do the same for ucontext allocations.
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      a2a074ef
    • D
      RDMA/core: Fix a WARN() message · afc1990e
      Dan Carpenter 提交于
      The first parameter of WARN_ONCE() is a condition, then following
      parameters are the message.  In this case, we left out the condition so it
      will just print the ops->type string.
      
      Fixes: 3856ec4b ("RDMA/core: Add RDMA_NLDEV_CMD_NEWLINK/DELLINK support")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: NMajd Dibbiny <majd@mellanox.com>
      Reviewed-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      afc1990e
    • D
      bnxt_re: fix the regression due to changes in alloc_pbl · c50866e2
      Devesh Sharma 提交于
      While adding the use of for_each_sg_dma_page iterator for Brodcom's rdma
      driver, there was a regression added in the __alloc_pbl path. The change
      left bnxt_re in DOA state in for-next branch.
      
      Fixing the regression to avoid the host crash when a user space object is
      created. Restricting the unconditional access to hwq.pg_arr when hwq is
      initialized for user space objects.
      
      Fixes: 161ebe24 ("RDMA/bnxt_re: Use for_each_sg_dma_page iterator on umem SGL")
      Reported-by: NGal Pressman <galpress@amazon.com>
      Signed-off-by: NSelvin Xavier <selvin.xavier@broadcom.com>
      Signed-off-by: NDevesh Sharma <devesh.sharma@broadcom.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      c50866e2
    • H
      IB/mlx4: Increase the timeout for CM cache · 2612d723
      Håkon Bugge 提交于
      Using CX-3 virtual functions, either from a bare-metal machine or
      pass-through from a VM, MAD packets are proxied through the PF driver.
      
      Since the VF drivers have separate name spaces for MAD Transaction Ids
      (TIDs), the PF driver has to re-map the TIDs and keep the book keeping
      in a cache.
      
      Following the RDMA Connection Manager (CM) protocol, it is clear when
      an entry has to evicted form the cache. But life is not perfect,
      remote peers may die or be rebooted. Hence, it's a timeout to wipe out
      a cache entry, when the PF driver assumes the remote peer has gone.
      
      During workloads where a high number of QPs are destroyed concurrently,
      excessive amount of CM DREQ retries has been observed
      
      The problem can be demonstrated in a bare-metal environment, where two
      nodes have instantiated 8 VFs each. This using dual ported HCAs, so we
      have 16 vPorts per physical server.
      
      64 processes are associated with each vPort and creates and destroys
      one QP for each of the remote 64 processes. That is, 1024 QPs per
      vPort, all in all 16K QPs. The QPs are created/destroyed using the
      CM.
      
      When tearing down these 16K QPs, excessive CM DREQ retries (and
      duplicates) are observed. With some cat/paste/awk wizardry on the
      infiniband_cm sysfs, we observe as sum of the 16 vPorts on one of the
      nodes:
      
      cm_rx_duplicates:
            dreq  2102
      cm_rx_msgs:
            drep  1989
            dreq  6195
             rep  3968
             req  4224
             rtu  4224
      cm_tx_msgs:
            drep  4093
            dreq 27568
             rep  4224
             req  3968
             rtu  3968
      cm_tx_retries:
            dreq 23469
      
      Note that the active/passive side is equally distributed between the
      two nodes.
      
      Enabling pr_debug in cm.c gives tons of:
      
      [171778.814239] <mlx4_ib> mlx4_ib_multiplex_cm_handler: id{slave:
      1,sl_cm_id: 0xd393089f} is NULL!
      
      By increasing the CM_CLEANUP_CACHE_TIMEOUT from 5 to 30 seconds, the
      tear-down phase of the application is reduced from approximately 90 to
      50 seconds. Retries/duplicates are also significantly reduced:
      
      cm_rx_duplicates:
            dreq  2460
      []
      cm_tx_retries:
            dreq  3010
             req    47
      
      Increasing the timeout further didn't help, as these duplicates and
      retries stems from a too short CMA timeout, which was 20 (~4 seconds)
      on the systems. By increasing the CMA timeout to 22 (~17 seconds), the
      numbers fell down to about 10 for both of them.
      
      Adjustment of the CMA timeout is not part of this commit.
      Signed-off-by: NHåkon Bugge <haakon.bugge@oracle.com>
      Acked-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      2612d723
  5. 22 2月, 2019 6 次提交
    • M
      IB/core: Abort page fault handler silently during owning process exit · 4438ee3f
      Moni Shoua 提交于
      It is possible that during a page fault handling, the process that owns
      the MR is terminating. The indication for it is failure to get the
      task_struct or take reference on the mm_struct. In this case just abort
      the page-fault handler with error but without a warning to the kernel log.
      Signed-off-by: NMoni Shoua <monis@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      4438ee3f
    • M
      IB/mlx5: Validate correct PD before prefetch MR · 81dd4c4b
      Moni Shoua 提交于
      When prefetching odp mr it is required to verify that pd of the mr is
      identical to the pd for which the advise_mr request arrived with.
      
      This check was missing from synchronous flow and is added now.
      
      Fixes: 813e90b1 ("IB/mlx5: Add advise_mr() support")
      Reported-by: NParav Pandit <parav@mellanox.com>
      Signed-off-by: NMoni Shoua <monis@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      81dd4c4b
    • M
      IB/mlx5: Protect against prefetch of invalid MR · a6bc3875
      Moni Shoua 提交于
      When deferring a prefetch request we need to protect against MR or PD
      being destroyed while the request is still enqueued.
      
      The first step is to validate that PD owns the lkey that describes the MR
      and that the MR that the lkey refers to is owned by that PD.
      
      The second step is to dequeue all requests when MR is destroyed.
      
      Since PD can't be destroyed while it owns MRs it is guaranteed that when a
      worker wakes up the request it refers to is still valid.
      
      Now, it is possible to refrain from taking a reference on the device since
      it is assured to be present as pd.
      
      While that, replace the dedicated ordered workqueue with the system
      unbound workqueue to reuse an existing resource and improve
      performance. This will also fix a bug of queueing to the wrong workqueue.
      
      Fixes: 813e90b1 ("IB/mlx5: Add advise_mr() support")
      Reported-by: NParav Pandit <parav@mellanox.com>
      Signed-off-by: NMoni Shoua <monis@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      a6bc3875
    • L
      RDMA/uverbs: Store PR pointer before it is overwritten · 25fd08eb
      Leon Romanovsky 提交于
      The IB_MR_REREG_PD command rewrites mr->pd after successful
      rereg_user_mr(), such change causes to lost usecnt information and
      produces the following warning:
      
       WARNING: CPU: 1 PID: 1771 at drivers/infiniband/core/verbs.c:336 ib_dealloc_pd+0x4e/0x60 [ib_core]
       CPU: 1 PID: 1771 Comm: rereg_mr Tainted: G        W  OE 5.0.0-rc7-for-upstream-perf-2019-02-20_14-03-40-34 #1
       Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
       RIP: 0010:ib_dealloc_pd+0x4e/0x60 [ib_core]
       RSP: 0018:ffffc90003923dc0 EFLAGS: 00010286
       RAX: 00000000ffffffff RBX: ffff88821f7f0400 RCX: ffff888236a40c00
       RDX: ffff88821f7f0400 RSI: 0000000000000001 RDI: 0000000000000000
       RBP: 0000000000000001 R08: ffff88835f665d80 R09: ffff8882209c90d8
       R10: ffff88835ec003e0 R11: 0000000000000000 R12: ffff888221680ba0
       R13: ffff888221680b00 R14: 00000000ffffffea R15: ffff88821f53c318
       FS:  00007f70db11e740(0000) GS:ffff88835f640000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 0000000001dfd030 CR3: 000000029d9d8000 CR4: 00000000000006e0
       DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
       DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
       Call Trace:
        uverbs_free_pd+0x2d/0x30 [ib_uverbs]
        destroy_hw_idr_uobject+0x16/0x40 [ib_uverbs]
        uverbs_destroy_uobject+0x28/0x170 [ib_uverbs]
        __uverbs_cleanup_ufile+0x6b/0x90 [ib_uverbs]
        uverbs_destroy_ufile_hw+0x8b/0x110 [ib_uverbs]
        ib_uverbs_close+0x1f/0x80 [ib_uverbs]
        __fput+0xb1/0x220
        task_work_run+0x7f/0xa0
        exit_to_usermode_loop+0x6b/0xb2
        do_syscall_64+0xc5/0x100
        entry_SYSCALL_64_after_hwframe+0x44/0xa9
       RIP: 0033:0x7f70dad00664
      
      Fixes: e278173f ("RDMA/core: Cosmetic change - move member initialization to correct block")
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Reviewed-by: NMajd Dibbiny <majd@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      25fd08eb
    • G
      IB/hfi1: Add missing break in switch statement · 7264235e
      Gustavo A. R. Silva 提交于
      Fix the following warning by adding a missing break:
      
      drivers/infiniband/hw/hfi1/tid_rdma.c: In function ‘hfi1_tid_rdma_wqe_interlock’:
      drivers/infiniband/hw/hfi1/tid_rdma.c:3251:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
         switch (prev->wr.opcode) {
         ^~~~~~
      drivers/infiniband/hw/hfi1/tid_rdma.c:3259:2: note: here
        case IB_WR_RDMA_READ:
        ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      
      Fixes: c6c23117 ("IB/hfi1: Add interlock between TID RDMA WRITE and other requests")
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Reviewed-by: NKaike Wan <Kaike.wan@intel.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      7264235e
    • J
      Merge branch 'mlx5-next' into rdma.git for-next · 815f7480
      Jason Gunthorpe 提交于
      From
      git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux
      
      To resolve conflicts with net-next and pick up the first patch.
      
      * branch 'mlx5-next':
        net/mlx5: Factor out HCA capabilities functions
        IB/mlx5: Add support for 50Gbps per lane link modes
        net/mlx5: Add support to ext_* fields introduced in Port Type and Speed register
        net/mlx5: Add new fields to Port Type and Speed register
        net/mlx5: Refactor queries to speed fields in Port Type and Speed register
        net/mlx5: E-Switch, Avoid magic numbers when initializing offloads mode
        net/mlx5: Relocate vport macros to the vport header file
        net/mlx5: E-Switch, Normalize the name of uplink vport number
        net/mlx5: Provide an alternative VF upper bound for ECPF
        net/mlx5: Add host params change event
        net/mlx5: Add query host params command
        net/mlx5: Update enable HCA dependency
        net/mlx5: Introduce Mellanox SmartNIC and modify page management logic
        IB/mlx5: Use unified register/load function for uplink and VF vports
        net/mlx5: Use consistent vport num argument type
        net/mlx5: Use void pointer as the type in address_of macro
        net/mlx5: Align ODP capability function with netdev coding style
        mlx5: use RCU lock in mlx5_eq_cq_get()
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      815f7480
  6. 21 2月, 2019 1 次提交
  7. 20 2月, 2019 23 次提交