Markus Armbruster <arm...@redhat.com> wrote: > We use errno after calling Libibverbs functions that are not > documented to set errno (manual page does not mention errno), or where > the documentation is unclear ("returns [...] the value of errno on > failure"). While this could be read as "sets errno and returns it", > a glance at the source code[*] kills that hope: > > static inline int ibv_post_send(struct ibv_qp *qp, struct ibv_send_wr *wr, > struct ibv_send_wr **bad_wr) > { > return qp->context->ops.post_send(qp, wr, bad_wr); > } > > The callback can be > > static int mana_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr, > struct ibv_send_wr **bad) > { > /* This version of driver supports RAW QP only. > * Posting WR is done directly in the application. > */ > return EOPNOTSUPP; > } > > Neither of them touches errno. > > One of these errno uses is easy to fix, so do that now. Several more > will go away later in the series; add temporary FIXME commments. > Three will remain; add TODO comments. TODO, not FIXME, because the > bug might be in Libibverbs documentation. > > [*] https://github.com/linux-rdma/rdma-core.git > commit 55fa316b4b18f258d8ac1ceb4aa5a7a35b094dcf > > Signed-off-by: Markus Armbruster <arm...@redhat.com>
Reviewed-by: Juan Quintela <quint...@redhat.com> And here I am, re-merging from this patch O:-)