1. 03 6月, 2021 1 次提交
  2. 27 5月, 2021 1 次提交
  3. 20 5月, 2021 2 次提交
  4. 26 3月, 2021 1 次提交
    • M
      RDMA: Support more than 255 rdma ports · 1fb7f897
      Mark Bloch 提交于
      Current code uses many different types when dealing with a port of a RDMA
      device: u8, unsigned int and u32. Switch to u32 to clean up the logic.
      
      This allows us to make (at least) the core view consistent and use the
      same type. Unfortunately not all places can be converted. Many uverbs
      functions expect port to be u8 so keep those places in order not to break
      UAPIs.  HW/Spec defined values must also not be changed.
      
      With the switch to u32 we now can support devices with more than 255
      ports. U32_MAX is reserved to make control logic a bit easier to deal
      with. As a device with U32_MAX ports probably isn't going to happen any
      time soon this seems like a non issue.
      
      When a device with more than 255 ports is created uverbs will report the
      RDMA device as having 255 ports as this is the max currently supported.
      
      The verbs interface is not changed yet because the IBTA spec limits the
      port size in too many places to be u8 and all applications that relies in
      verbs won't be able to cope with this change. At this stage, we are
      extending the interfaces that are using vendor channel solely
      
      Once the limitation is lifted mlx5 in switchdev mode will be able to have
      thousands of SFs created by the device. As the only instance of an RDMA
      device that reports more than 255 ports will be a representor device and
      it exposes itself as a RAW Ethernet only device CM/MAD/IPoIB and other
      ULPs aren't effected by this change and their sysfs/interfaces that are
      exposes to userspace can remain unchanged.
      
      While here cleanup some alignment issues and remove unneeded sanity
      checks (mainly in rdmavt),
      
      Link: https://lore.kernel.org/r/20210301070420.439400-1-leon@kernel.orgSigned-off-by: NMark Bloch <mbloch@nvidia.com>
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      1fb7f897
  5. 12 3月, 2021 1 次提交
  6. 11 3月, 2021 1 次提交
  7. 17 2月, 2021 1 次提交
  8. 10 2月, 2021 1 次提交
  9. 06 2月, 2021 3 次提交
  10. 29 1月, 2021 1 次提交
  11. 23 1月, 2021 1 次提交
  12. 11 12月, 2020 1 次提交
  13. 27 11月, 2020 1 次提交
  14. 26 11月, 2020 1 次提交
  15. 24 11月, 2020 1 次提交
  16. 17 11月, 2020 3 次提交
  17. 03 11月, 2020 4 次提交
  18. 27 10月, 2020 2 次提交
  19. 30 9月, 2020 3 次提交
  20. 18 9月, 2020 2 次提交
  21. 10 9月, 2020 2 次提交
  22. 27 8月, 2020 2 次提交
  23. 24 8月, 2020 1 次提交
  24. 19 8月, 2020 2 次提交
  25. 30 7月, 2020 1 次提交
    • L
      RDMA/mlx5: Initialize QP mutex for the debug kernels · 7fa84b57
      Leon Romanovsky 提交于
      In DCT and RSS RAW QP creation flows, the QP mutex wasn't initialized and
      the magic field inside lock was missing. This caused to the following
      kernel warning for kernels build with CONFIG_DEBUG_MUTEXES.
      
       DEBUG_LOCKS_WARN_ON(lock->magic != lock)
       WARNING: CPU: 3 PID: 16261 at kernel/locking/mutex.c:938 __mutex_lock+0x60e/0x940
       Modules linked in: bonding nf_tables ipip tunnel4 geneve ip6_udp_tunnel udp_tunnel ip6_gre ip6_tunnel tunnel6 ip_gre gre ip_tunnel mlx5_ib mlx5_core mlxfw ptp pps_core rdma_ucm ib_uverbs ib_ipoib ib_umad openvswitch nsh xt_MASQUERADE nf_conntrack_netlink nfnetlink iptable_nat xt_addrtype xt_conntrack nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 br_netfilter overlay ib_srp scsi_transport_srp rpcrdma ib_iser libiscsi scsi_transport_iscsi rdma_cm iw_cm ib_cm ib_core [last unloaded: mlxfw]
       CPU: 3 PID: 16261 Comm: ib_send_bw Not tainted 5.8.0-rc4_for_upstream_min_debug_2020_07_08_22_04 #1
       Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
       RIP: 0010:__mutex_lock+0x60e/0x940
       Code: c0 0f 84 6d fa ff ff 44 8b 15 4e 9d ba 00 45 85 d2 0f 85 5d fa ff ff 48 c7 c6 f2 de 2b 82 48 c7 c7 f1 8a 2b 82 e8 d2 4d 72 ff <0f> 0b 4c 8b 4d 88 e9 3f fa ff ff f6 c2 04 0f 84 37 fe ff ff 48 89
       RSP: 0018:ffff88810bb8b870 EFLAGS: 00010286
       RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
       RDX: ffff88829f1dd880 RSI: 0000000000000000 RDI: ffffffff81192afa
       RBP: ffff88810bb8b910 R08: 0000000000000000 R09: 0000000000000028
       R10: 0000000000000000 R11: 0000000000003f85 R12: 0000000000000002
       R13: ffff88827d8d3ce0 R14: ffffffffa059f615 R15: ffff8882a4d02610
       FS:  00007f3f6988e740(0000) GS:ffff8882f5b80000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 0000556556158000 CR3: 000000010a63c005 CR4: 0000000000360ea0
       DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
       DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
       Call Trace:
        ? cmd_exec+0x947/0xe60 [mlx5_core]
        ? __mutex_lock+0x76/0x940
        ? mlx5_ib_qp_set_counter+0x25/0xa0 [mlx5_ib]
        mlx5_ib_qp_set_counter+0x25/0xa0 [mlx5_ib]
        mlx5_ib_counter_bind_qp+0x9b/0xe0 [mlx5_ib]
        __rdma_counter_bind_qp+0x6b/0xa0 [ib_core]
        rdma_counter_bind_qp_auto+0x363/0x520 [ib_core]
        _ib_modify_qp+0x316/0x580 [ib_core]
        ib_modify_qp_with_udata+0x19/0x30 [ib_core]
        modify_qp+0x4c4/0x600 [ib_uverbs]
        ib_uverbs_ex_modify_qp+0x87/0xe0 [ib_uverbs]
        ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0x129/0x1c0 [ib_uverbs]
        ib_uverbs_cmd_verbs.isra.5+0x5d5/0x11f0 [ib_uverbs]
        ? ib_uverbs_handler_UVERBS_METHOD_QUERY_CONTEXT+0x120/0x120 [ib_uverbs]
        ? lock_acquire+0xb9/0x3a0
        ? ib_uverbs_ioctl+0xd0/0x210 [ib_uverbs]
        ? ib_uverbs_ioctl+0x175/0x210 [ib_uverbs]
        ib_uverbs_ioctl+0x14b/0x210 [ib_uverbs]
        ? ib_uverbs_ioctl+0xd0/0x210 [ib_uverbs]
        ksys_ioctl+0x234/0x7d0
        ? exc_page_fault+0x202/0x640
        ? do_syscall_64+0x1f/0x2e0
        __x64_sys_ioctl+0x16/0x20
        do_syscall_64+0x59/0x2e0
        ? asm_exc_page_fault+0x8/0x30
        ? rcu_read_lock_sched_held+0x52/0x60
        entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: b4aaa1f0 ("IB/mlx5: Handle type IB_QPT_DRIVER when creating a QP")
      Link: https://lore.kernel.org/r/20200730082719.1582397-2-leon@kernel.orgReviewed-by: NMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      7fa84b57