[PATCH v2 0/4] Declare RDMA work request pointers that are not modified const

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Jason and Doug,

The RDMA driver functions that submit a work request accept a work request
pointer as input but do not modify that work request. This patch series
makes this explicit by declaring these pointers const. That change allows
the compiler to verify that the input work request is not modified. Please
consider these patches for kernel v4.19.

Thanks,

Bart.

Bart Van Assche (4):
  IB/iser: Inline two work request conversion functions
  RDMA: Constify the argument of the work request conversion functions
  IB/mlx5, ib_post_send(), IB_WR_REG_SIG_MR: Do not modify the 'wr'
    argument
  RDMA, core and ULPs: Declare ib_post_send() and ib_post_recv()
    arguments const

 drivers/infiniband/core/mad.c                 |  9 ++-
 drivers/infiniband/core/rw.c                  |  3 +-
 drivers/infiniband/core/uverbs_cmd.c          |  9 ++-
 drivers/infiniband/core/verbs.c               |  5 +-
 drivers/infiniband/hw/bnxt_re/ib_verbs.c      | 34 ++++----
 drivers/infiniband/hw/bnxt_re/ib_verbs.h      | 12 +--
 drivers/infiniband/hw/cxgb3/iwch_provider.h   |  8 +-
 drivers/infiniband/hw/cxgb3/iwch_qp.c         | 32 ++++----
 drivers/infiniband/hw/cxgb4/iw_cxgb4.h        |  8 +-
 drivers/infiniband/hw/cxgb4/qp.c              | 42 +++++-----
 drivers/infiniband/hw/hns/hns_roce_device.h   | 10 +--
 drivers/infiniband/hw/hns/hns_roce_hw_v1.c    | 13 ++--
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c    | 16 ++--
 drivers/infiniband/hw/i40iw/i40iw_verbs.c     |  9 +--
 drivers/infiniband/hw/mlx4/mad.c              |  7 +-
 drivers/infiniband/hw/mlx4/mlx4_ib.h          | 12 +--
 drivers/infiniband/hw/mlx4/qp.c               | 46 +++++------
 drivers/infiniband/hw/mlx4/srq.c              |  4 +-
 drivers/infiniband/hw/mlx5/gsi.c              |  8 +-
 drivers/infiniband/hw/mlx5/mlx5_ib.h          | 22 +++---
 drivers/infiniband/hw/mlx5/mr.c               |  2 +-
 drivers/infiniband/hw/mlx5/qp.c               | 78 ++++++++++---------
 drivers/infiniband/hw/mlx5/srq.c              |  4 +-
 drivers/infiniband/hw/mthca/mthca_dev.h       | 24 +++---
 drivers/infiniband/hw/mthca/mthca_qp.c        | 24 +++---
 drivers/infiniband/hw/mthca/mthca_srq.c       |  8 +-
 drivers/infiniband/hw/nes/nes_verbs.c         | 11 +--
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c   | 28 +++----
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.h   | 12 +--
 drivers/infiniband/hw/qedr/qedr_roce_cm.c     | 12 +--
 drivers/infiniband/hw/qedr/qedr_roce_cm.h     |  8 +-
 drivers/infiniband/hw/qedr/verbs.c            | 33 ++++----
 drivers/infiniband/hw/qedr/verbs.h            |  8 +-
 drivers/infiniband/hw/qib/qib_verbs.h         |  2 +-
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c  |  8 +-
 drivers/infiniband/hw/usnic/usnic_ib_verbs.h  |  8 +-
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c  | 11 +--
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c |  4 +-
 .../infiniband/hw/vmw_pvrdma/pvrdma_verbs.h   | 12 +--
 drivers/infiniband/sw/rdmavt/qp.c             | 16 ++--
 drivers/infiniband/sw/rdmavt/qp.h             | 12 +--
 drivers/infiniband/sw/rxe/rxe_verbs.c         | 26 +++----
 drivers/infiniband/ulp/ipoib/ipoib_cm.c       | 11 ++-
 drivers/infiniband/ulp/ipoib/ipoib_ib.c       |  4 +-
 drivers/infiniband/ulp/iser/iser_memory.c     |  5 +-
 drivers/infiniband/ulp/iser/iser_verbs.c      |  9 ++-
 drivers/infiniband/ulp/isert/ib_isert.c       | 14 ++--
 drivers/infiniband/ulp/srp/ib_srp.c           | 10 ++-
 drivers/infiniband/ulp/srpt/ib_srpt.c         | 11 ++-
 drivers/nvme/host/rdma.c                      |  8 +-
 drivers/nvme/target/rdma.c                    |  5 +-
 fs/cifs/smbdirect.c                           | 14 ++--
 include/rdma/ib_verbs.h                       | 35 +++++----
 net/9p/trans_rdma.c                           |  6 +-
 net/rds/ib_frmr.c                             |  5 +-
 net/rds/ib_recv.c                             |  4 +-
 net/rds/ib_send.c                             |  6 +-
 net/smc/smc_tx.c                              |  2 +-
 net/smc/smc_wr.c                              |  4 +-
 net/smc/smc_wr.h                              |  2 +-
 net/sunrpc/xprtrdma/fmr_ops.c                 |  2 +-
 net/sunrpc/xprtrdma/frwr_ops.c                |  6 +-
 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c       |  2 +-
 net/sunrpc/xprtrdma/svc_rdma_rw.c             |  3 +-
 net/sunrpc/xprtrdma/svc_rdma_sendto.c         |  2 +-
 net/sunrpc/xprtrdma/verbs.c                   |  3 +-
 66 files changed, 445 insertions(+), 388 deletions(-)

-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux