]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ibcore: Declare ib_post_send() and ib_post_recv() arguments const
authorHans Petter Selasky <hselasky@FreeBSD.org>
Wed, 16 Jun 2021 13:01:54 +0000 (15:01 +0200)
committerHans Petter Selasky <hselasky@FreeBSD.org>
Mon, 26 Jul 2021 16:04:32 +0000 (18:04 +0200)
commit47f7e8e4231f9e2dcf8e6d180ec1a7353c8f94a6
tree0b6932a50f89ca6a81f559872bde7817b9de0910
parentb383248ef6dce0019856de495840b810dad18cb1
ibcore: Declare ib_post_send() and ib_post_recv() arguments const

Since neither ib_post_send() nor ib_post_recv() modify the data structure
their second argument points at, declare that argument const. This change
makes it necessary to declare the 'bad_wr' argument const too and also to
modify all ULPs that call ib_post_send(), ib_post_recv() or
ib_post_srq_recv(). This patch does not change any functionality but makes
it possible for the compiler to verify whether the
ib_post_(send|recv|srq_recv) really do not modify the posted work request.

Linux commit:
f696bf6d64b195b83ca1bdb7cd33c999c9dcf514
7bb1fafc2f163ad03a2007295bb2f57cfdbfb630
d34ac5cd3a73aacd11009c4fc3ba15d7ea62c411

Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

(cherry picked from commit c3987b8ea793c11f61fecb14ef93195a23e3522c)
26 files changed:
sys/contrib/rdma/krping/krping.c
sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
sys/dev/cxgbe/iw_cxgbe/qp.c
sys/dev/iser/iser_memory.c
sys/dev/iser/iser_verbs.c
sys/dev/mlx4/mlx4_ib/mlx4_ib.h
sys/dev/mlx4/mlx4_ib/mlx4_ib_mad.c
sys/dev/mlx4/mlx4_ib/mlx4_ib_qp.c
sys/dev/mlx4/mlx4_ib/mlx4_ib_srq.c
sys/dev/mlx5/mlx5_ib/mlx5_ib.h
sys/dev/mlx5/mlx5_ib/mlx5_ib_gsi.c
sys/dev/mlx5/mlx5_ib/mlx5_ib_mr.c
sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c
sys/dev/mlx5/mlx5_ib/mlx5_ib_srq.c
sys/dev/mthca/mthca_dev.h
sys/dev/mthca/mthca_qp.c
sys/dev/mthca/mthca_srq.c
sys/dev/qlnx/qlnxr/qlnxr_cm.c
sys/dev/qlnx/qlnxr/qlnxr_cm.h
sys/dev/qlnx/qlnxr/qlnxr_verbs.c
sys/dev/qlnx/qlnxr/qlnxr_verbs.h
sys/ofed/drivers/infiniband/core/ib_mad.c
sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c
sys/ofed/drivers/infiniband/core/ib_verbs.c
sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c
sys/ofed/include/rdma/ib_verbs.h