On Tue, Nov 08, 2022 at 10:29:57AM -0600, Shiraz Saleem wrote: > From: Mustafa Ismail <mustafa.ismail@xxxxxxxxx> > > The opcode written by HW, in the RQ CQE, is the > RoCEv2/iWARP protocol opcode from the received > packet and not the SW opcode as currently assumed. > Fix this by returning the raw operation type and > queue type in the CQE to irdma_process_cqe and add > 2 helpers set_ib_wc_op_sq set_ib_wc_op_rq to map > IRDMA HW op types to IB op types. > > Note that for iWARP, only Write with Immediate is > supported so the opcode can only be IB_WC_RECV_RDMA_WITH_IMM > when there is immediate data present. > > Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") > Signed-off-by: Mustafa Ismail <mustafa.ismail@xxxxxxxxx> > Signed-off-by: Shiraz Saleem <shiraz.saleem@xxxxxxxxx> > --- > drivers/infiniband/hw/irdma/uk.c | 19 +++----- > drivers/infiniband/hw/irdma/user.h | 1 + > drivers/infiniband/hw/irdma/utils.c | 2 + > drivers/infiniband/hw/irdma/verbs.c | 91 +++++++++++++++++++++++-------------- > 4 files changed, 68 insertions(+), 45 deletions(-) <...> > +static inline void set_ib_wc_op_sq(struct irdma_cq_poll_info *cq_poll_info, > + struct ib_wc *entry) > +{ > + switch (cq_poll_info->op_type) { > + case IRDMA_OP_TYPE_RDMA_WRITE: > + case IRDMA_OP_TYPE_RDMA_WRITE_SOL: > + entry->opcode = IB_WC_RDMA_WRITE; 1. Please run clang formatter on your series, I see wrong indentation here. 2. We are honoring 80-symbol limit, when it is possible. First patch is full of such warnings. 3. No inline functions in .c code please. Thanks