1. 13 11月, 2020 1 次提交
  2. 12 11月, 2020 1 次提交
  3. 03 11月, 2020 17 次提交
  4. 31 10月, 2020 2 次提交
  5. 29 10月, 2020 16 次提交
  6. 28 10月, 2020 3 次提交
    • B
      RDMA/rxe: Compute PSN windows correctly · bb3ab297
      Bob Pearson 提交于
      The code which limited the number of unacknowledged PSNs was incorrect.
      The PSNs are limited to 24 bits and wrap back to zero from 0x00ffffff.
      The test was computing a 32 bit value which wraps at 32 bits so that
      qp->req.psn can appear smaller than the limit when it is actually larger.
      
      Replace '>' test with psn_compare which is used for other PSN comparisons
      and correctly handles the 24 bit size.
      
      Fixes: 8700e3e7 ("Soft RoCE driver")
      Link: https://lore.kernel.org/r/20201013170741.3590-1-rpearson@hpe.comSigned-off-by: NBob Pearson <rpearson@hpe.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      bb3ab297
    • J
      RDMA/core: Fix error return in _ib_modify_qp() · 5333499c
      Jing Xiangfeng 提交于
      Fix to return error code PTR_ERR() from the error handling case instead of
      0.
      
      Fixes: 51aab126 ("RDMA/core: Get xmit slave for LAG")
      Link: https://lore.kernel.org/r/20201016075845.129562-1-jingxiangfeng@huawei.comSigned-off-by: NJing Xiangfeng <jingxiangfeng@huawei.com>
      Reviewed-by: NMaor Gottlieb <maorg@nvidia.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      5333499c
    • A
      IB/verbs: avoid nested container_of() · bfb972c5
      Arnd Bergmann 提交于
      Nested container_of() calls work correctly but cause a warning when
      building with W=2. Invoking it from an inline function like in
      drivers/infiniband/hw/mlx5/mlx5_ib.h means we get hundreds of warnings
      like:
      
      include/linux/kernel.h:852:8: warning: declaration of '__mptr' shadows a previous local [-Wshadow]
        852 |  void *__mptr = (void *)(ptr);     \
            |        ^~~~~~
      include/rdma/uverbs_ioctl.h:651:11: note: in expansion of macro 'container_of'
        651 |  (udata ? container_of(container_of(udata, struct uverbs_attr_bundle,   \
            |           ^~~~~~~~~~~~
      include/rdma/uverbs_ioctl.h:651:24: note: in expansion of macro 'container_of'
        651 |  (udata ? container_of(container_of(udata, struct uverbs_attr_bundle,   \
            |                        ^~~~~~~~~~~~
      drivers/infiniband/hw/mthca/mthca_qp.c:564:35: note: in expansion of macro 'rdma_udata_to_drv_context'
        564 |  struct mthca_ucontext *context = rdma_udata_to_drv_context(
            |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
      include/linux/kernel.h:852:8: note: shadowed declaration is here
        852 |  void *__mptr = (void *)(ptr);     \
            |        ^~~~~~
      include/rdma/uverbs_ioctl.h:651:11: note: in expansion of macro 'container_of'
        651 |  (udata ? container_of(container_of(udata, struct uverbs_attr_bundle,   \
            |           ^~~~~~~~~~~~
      drivers/infiniband/hw/mthca/mthca_qp.c:564:35: note: in expansion of macro 'rdma_udata_to_drv_context'
        564 |  struct mthca_ucontext *context = rdma_udata_to_drv_context(
            |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from <command-line>:
      include/linux/kernel.h:852:8: warning: declaration of '__mptr' shadows a previous local [-Wshadow]
        852 |  void *__mptr = (void *)(ptr);     \
            |        ^~~~~~
      
      Rewrite the macro to use an inline function internally, which makes it
      more readable and reduces the amount of useless output from make W=2.
      
      Fixes: 730623f4 ("IB/verbs: Add helper function rdma_udata_to_drv_context")
      Link: https://lore.kernel.org/r/20201026161549.3709175-1-arnd@kernel.orgSigned-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      bfb972c5