Hello Jason and Doug, The RDMA 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. Changes compared to v3: - Modified ib_post_(send|recv|srq_recv)() such that these accept a NULL pointer as third argument. - Split patch 4/4 from v3 of this series in multiple patches to make reviewing easier. Changes compared to v2: - Addressed Leon's feedback in patch 3/4, the patch that modifies begin_wqe() in the mlx5 driver. - Removed a whitespace-only change from patch 2/4. Changes compared to v1: - Instead of only modifying the RDMA hw and sw drivers, also modify ib_post_*() and all ULP drivers. Bart Van Assche (17): 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 IB/core: Allow ULPs to specify NULL as the third ib_post_(send|recv|srq_recv)() argument RDMA/core: Simplify ib_post_(send|recv|srq_recv)() calls IB/IPoIB: Simplify ib_post_(send|recv|srq_recv)() calls IB/iser: Simplify ib_post_(send|recv|srq_recv)() calls IB/isert: Simplify ib_post_(send|recv|srq_recv)() calls IB/srp: Simplify ib_post_(send|recv|srq_recv)() calls IB/srpt: Simplify ib_post_(send|recv|srq_recv)() calls nvme-fabrics: Simplify ib_post_(send|recv|srq_recv)() calls fs/cifs: Simplify ib_post_(send|recv|srq_recv)() calls net/9p: Simplify ib_post_(send|recv|srq_recv)() calls net/rds: Simplify ib_post_(send|recv|srq_recv)() calls net/smc: Simplify ib_post_(send|recv|srq_recv)() calls net/xprtrdma: Simplify ib_post_(send|recv|srq_recv)() calls RDMA, core and ULPs: Declare ib_post_send() and ib_post_recv() arguments const drivers/infiniband/core/mad.c | 14 ++-- drivers/infiniband/core/rw.c | 4 +- drivers/infiniband/core/uverbs_cmd.c | 9 +- drivers/infiniband/core/verbs.c | 7 +- 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 | 82 ++++++++++--------- 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 | 13 +-- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 6 +- drivers/infiniband/ulp/iser/iser_memory.c | 5 +- drivers/infiniband/ulp/iser/iser_verbs.c | 14 ++-- drivers/infiniband/ulp/isert/ib_isert.c | 21 ++--- drivers/infiniband/ulp/srp/ib_srp.c | 14 ++-- drivers/infiniband/ulp/srpt/ib_srpt.c | 17 ++-- drivers/nvme/host/rdma.c | 11 ++- drivers/nvme/target/rdma.c | 10 +-- fs/cifs/smbdirect.c | 19 ++--- include/rdma/ib_verbs.h | 47 ++++++----- net/9p/trans_rdma.c | 8 +- net/rds/ib_frmr.c | 11 +-- net/rds/ib_recv.c | 6 +- net/rds/ib_send.c | 6 +- net/smc/smc_tx.c | 3 +- net/smc/smc_wr.c | 9 +- net/smc/smc_wr.h | 3 +- net/sunrpc/xprtrdma/fmr_ops.c | 4 +- net/sunrpc/xprtrdma/frwr_ops.c | 7 +- net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 3 +- net/sunrpc/xprtrdma/svc_rdma_rw.c | 5 +- net/sunrpc/xprtrdma/svc_rdma_sendto.c | 3 +- net/sunrpc/xprtrdma/verbs.c | 3 +- 66 files changed, 459 insertions(+), 461 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