1. 12 Jul, 2019 1 commit
    • Jason Gunthorpe's avatar
      RMDA/siw: Require a 64 bit arch · 0b043644
      Jason Gunthorpe authored
      The new siw driver fails to build on i386 with
      
      drivers/infiniband/sw/siw/siw_qp.c:1025:3: error: invalid output size for constraint '+q'
                      smp_store_mb(*cq->notify, SIW_NOTIFY_NOT);
      
      As it is using 64 bit values with the smp_store_mb.
      
      Since the entire scheme here seems questionable, and we are in the merge
      window, fix the compile failures by disabling 32 bit support on this
      driver.
      
      A proper fix will be reviewed post merge window.
      
      Fixes: c0cf5bdd ("rdma/siw: addition to kernel build environment")
      Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      0b043644
  2. 11 Jul, 2019 5 commits
    • Gustavo A. R. Silva's avatar
      RDMA/siw: Mark expected switch fall-throughs · cea743f2
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
      we are expecting to fall through.
      
      This patch fixes the following warnings:
      
      drivers/infiniband/sw/siw/siw_qp_rx.c: In function ‘siw_rdmap_complete’:
      drivers/infiniband/sw/siw/siw_qp_rx.c:1214:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
         wqe->rqe.flags |= SIW_WQE_SOLICITED;
         ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      drivers/infiniband/sw/siw/siw_qp_rx.c:1215:2: note: here
        case RDMAP_SEND:
        ^~~~
      
      drivers/infiniband/sw/siw/siw_qp_tx.c: In function ‘siw_qp_sq_process’:
      drivers/infiniband/sw/siw/siw_qp_tx.c:1044:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
          siw_wqe_put_mem(wqe, tx_type);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/infiniband/sw/siw/siw_qp_tx.c:1045:3: note: here
         case SIW_OP_INVAL_STAG:
         ^~~~
      drivers/infiniband/sw/siw/siw_qp_tx.c:1128:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
          siw_wqe_put_mem(wqe, tx_type);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/infiniband/sw/siw/siw_qp_tx.c:1129:3: note: here
         case SIW_OP_INVAL_STAG:
         ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Reviewed-by: default avatarBernard Metzler <bmt@zurich.ibm.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      cea743f2
    • Qian Cai's avatar
      RDMA/core: Fix -Wunused-const-variable warnings · bedc0fd0
      Qian Cai authored
      The commit below introduced a few compilation warnings.
      
      In file included from ./include/rdma/ib_verbs.h:64,
                       from ./include/linux/mlx5/device.h:37,
                       from ./include/linux/mlx5/driver.h:51,
                       from drivers/net/ethernet/mellanox/mlx5/core/uar.c:36:
      ./include/linux/dim.h:378:1: warning: 'rdma_dim_prof' defined but not
      used [-Wunused-const-variable=]
       rdma_dim_prof[RDMA_DIM_PARAMS_NUM_PROFILES] = {
       ^~~~~~~~~~~~~
      In file included from ./include/rdma/ib_verbs.h:64,
                       from ./include/linux/mlx5/device.h:37,
                       from ./include/linux/mlx5/driver.h:51,
                       from
      drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:37:
      ./include/linux/dim.h:378:1: warning: 'rdma_dim_prof' defined but not
      used [-Wunused-const-variable=]
       rdma_dim_prof[RDMA_DIM_PARAMS_NUM_PROFILES] = {
       ^~~~~~~~~~~~~
      
      Since only ib_cq_rdma_dim_work() in drivers/infiniband/core/cq.c uses it,
      just move the definition over there.
      
      Fixes: f4915455 ("linux/dim: Implement RDMA adaptive moderation (DIM)")
      Signed-off-by: default avatarQian Cai <cai@lca.pw>
      Reviewed-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      bedc0fd0
    • YueHaibing's avatar
      rdma/siw: Remove set but not used variable 's' · 855085d9
      YueHaibing authored
      Fixes gcc '-Wunused-but-set-variable' warning:
      
      drivers/infiniband/sw/siw/siw_cm.c: In function siw_cm_llp_state_change:
      drivers/infiniband/sw/siw/siw_cm.c:1278:17: warning: variable s set but not used [-Wunused-but-set-variable]
      
      Fixes: 6c52fdc2 ("rdma/siw: connection management")
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Reviewed-by: default avatarBernard Metzler <bmt@zurich.ibm.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      855085d9
    • Geert Uytterhoeven's avatar
      rdma/siw: Add missing dependencies on LIBCRC32C and DMA_VIRT_OPS · b45305d7
      Geert Uytterhoeven authored
      If LIBCRC32C and DMA_VIRT_OPS are not enabled:
      
          drivers/infiniband/sw/siw/siw_main.o: In function `siw_newlink':
          siw_main.c:(.text+0x35c): undefined reference to `dma_virt_ops'
          drivers/infiniband/sw/siw/siw_qp_rx.o: In function `siw_csum_update':
          siw_qp_rx.c:(.text+0x16): undefined reference to `crc32c'
      
      Fix the first issue by adding a select of DMA_VIRT_OPS.  Fix the second
      issue by replacing the unneeded dependency on CRYPTO_CRC32 by a dependency
      on LIBCRC32C.
      
      Reported-by: noreply@ellerman.id.au (first issue)
      Fixes: c0cf5bdd ("rdma/siw: addition to kernel build environment")
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Reviewed-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      b45305d7
    • Jason Gunthorpe's avatar
      RDMA/siw: Add missing rtnl_lock around access to ifa · c421651f
      Jason Gunthorpe authored
      ifa is protected by rcu or rtnl, add the missing locking. In this case we
      have to use rtnl since siw_listen_address() is sleeping.
      
      Fixes: 6c52fdc2 ("rdma/siw: connection management")
      Reviewed-by: default avatarBernard Metzler <bmt@zurich.ibm.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      c421651f
  3. 10 Jul, 2019 3 commits
  4. 09 Jul, 2019 2 commits
  5. 08 Jul, 2019 13 commits
  6. 07 Jul, 2019 6 commits
  7. 05 Jul, 2019 10 commits