HomeFreeBSD

ibcore: Declare ib_post_send() and ib_post_recv() arguments const

Description

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)

Details

Provenance
hselaskyAuthored on Jun 16 2021, 1:01 PM
Parents
rGb383248ef6dc: mlx5: Set default timestamp format for mlx5en(4) and mlx5ib.
Branches
Unknown
Tags
Unknown