1. 07 Dec, 2022 2 commits
  2. 04 Dec, 2022 4 commits
  3. 01 Dec, 2022 9 commits
  4. 30 Nov, 2022 2 commits
  5. 29 Nov, 2022 1 commit
  6. 28 Nov, 2022 2 commits
  7. 24 Nov, 2022 4 commits
  8. 22 Nov, 2022 5 commits
  9. 21 Nov, 2022 1 commit
  10. 19 Nov, 2022 3 commits
    • Luoyouming's avatar
      RDMA/hns: Fix incorrect sge nums calculation · 0c5e259b
      Luoyouming authored
      The user usually configures the number of sge through the max_send_sge
      parameter when creating qp, and configures the maximum size of inline data
      that can be sent through max_inline_data. Inline uses sge to fill data to
      send. Expect the following:
      
      1) When the sge space cannot hold inline data, the sge space needs to be
         expanded to accommodate all inline data
      
      2) When the sge space is enough to accommodate inline data, the upper
         limit of inline data can be increased so that users can send larger
         inline data
      
      Currently case one is not implemented. When the inline data is larger than
      the sge space, an error of insufficient sge space occurs.  This part of
      the code needs to be reimplemented according to the expected rules. The
      calculation method of sge num is modified to take the maximum value of
      max_send_sge and the sge for max_inline_data to solve this problem.
      
      Fixes: 05201e01 ("RDMA/hns: Refactor process of setting extended sge")
      Fixes: 30b70788 ("RDMA/hns: Support inline data in extented sge space for RC")
      Link: https://lore.kernel.org/r/20221108133847.2304539-3-xuhaoyue1@hisilicon.comSigned-off-by: default avatarLuoyouming <luoyouming@huawei.com>
      Signed-off-by: default avatarHaoyue Xu <xuhaoyue1@hisilicon.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      0c5e259b
    • Luoyouming's avatar
      RDMA/hns: Fix ext_sge num error when post send · 8eaa6f7d
      Luoyouming authored
      In the HNS ROCE driver, The sge is divided into standard sge and extended
      sge.  There are 2 standard sge in RC/XRC, and the UD standard sge is 0.
      In the scenario of RC SQ inline, if the data does not exceed 32bytes, the
      standard sge will be used. If it exceeds, only the extended sge will be
      used to fill the data.
      
      Currently, when filling the extended sge, max_gs is directly used as the
      number of the extended sge, which did not subtract the number of standard
      sge.  There is a logical error. The new algorithm subtracts the number of
      standard sge from max_gs to get the actual number of extended sge.
      
      Fixes: 30b70788 ("RDMA/hns: Support inline data in extented sge space for RC")
      Link: https://lore.kernel.org/r/20221108133847.2304539-2-xuhaoyue1@hisilicon.comSigned-off-by: default avatarLuoyouming <luoyouming@huawei.com>
      Signed-off-by: default avatarHaoyue Xu <xuhaoyue1@hisilicon.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      8eaa6f7d
    • Li Zhijian's avatar
      RDMA/rxe: Fix mr->map double free · 7d984dac
      Li Zhijian authored
      rxe_mr_cleanup() which tries to free mr->map again will be called when
      rxe_mr_init_user() fails:
      
         CPU: 0 PID: 4917 Comm: rdma_flush_serv Kdump: loaded Not tainted 6.1.0-rc1-roce-flush+ #25
         Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
         Call Trace:
          <TASK>
          dump_stack_lvl+0x45/0x5d
          panic+0x19e/0x349
          end_report.part.0+0x54/0x7c
          kasan_report.cold+0xa/0xf
          rxe_mr_cleanup+0x9d/0xf0 [rdma_rxe]
          __rxe_cleanup+0x10a/0x1e0 [rdma_rxe]
          rxe_reg_user_mr+0xb7/0xd0 [rdma_rxe]
          ib_uverbs_reg_mr+0x26a/0x480 [ib_uverbs]
          ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0x1a2/0x250 [ib_uverbs]
          ib_uverbs_cmd_verbs+0x1397/0x15a0 [ib_uverbs]
      
      This issue was firstly exposed since commit b18c7da6 ("RDMA/rxe: Fix
      memory leak in error path code") and then we fixed it in commit
      8ff5f5d9 ("RDMA/rxe: Prevent double freeing rxe_map_set()") but this
      fix was reverted together at last by commit 1e755506 (Revert
      "RDMA/rxe: Create duplicate mapping tables for FMRs")
      
      Simply let rxe_mr_cleanup() always handle freeing the mr->map once it is
      successfully allocated.
      
      Fixes: 1e755506 ("Revert "RDMA/rxe: Create duplicate mapping tables for FMRs"")
      Link: https://lore.kernel.org/r/1667099073-2-1-git-send-email-lizhijian@fujitsu.comSigned-off-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      7d984dac
  11. 18 Nov, 2022 2 commits
  12. 17 Nov, 2022 5 commits