Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43adff39 authored by Tatyana Nikolova's avatar Tatyana Nikolova Committed by Roland Dreier
Browse files

RDMA/nes: Fix for passing a valid QP pointer to the user space library

parent 4ac79a70
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -657,7 +657,7 @@ static void build_rdma0_msg(struct nes_cm_node *cm_node, struct nes_qp **nesqp_a
	struct nes_qp *nesqp = *nesqp_addr;
	struct nes_hw_qp_wqe *wqe = &nesqp->hwqp.sq_vbase[0];

	u64temp = (unsigned long)nesqp;
	u64temp = (unsigned long)nesqp->nesuqp_addr;
	u64temp |= NES_SW_CONTEXT_ALIGN >> 1;
	set_wqe_64bit_value(wqe->wqe_words, NES_IWARP_SQ_WQE_COMP_CTX_LOW_IDX, u64temp);

+3 −2
Original line number Diff line number Diff line
@@ -39,8 +39,8 @@

#include <linux/types.h>

#define NES_ABI_USERSPACE_VER 1
#define NES_ABI_KERNEL_VER    1
#define NES_ABI_USERSPACE_VER 2
#define NES_ABI_KERNEL_VER    2

/*
 * Make sure that all structs defined in this file remain laid out so
@@ -78,6 +78,7 @@ struct nes_create_cq_req {

struct nes_create_qp_req {
	__u64 user_wqe_buffers;
	__u64 user_qp_buffer;
};

enum iwnes_memreg_type {
+2 −0
Original line number Diff line number Diff line
@@ -1191,6 +1191,8 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
				if (req.user_wqe_buffers) {
					virt_wqs = 1;
				}
				if (req.user_qp_buffer)
					nesqp->nesuqp_addr = req.user_qp_buffer;
				if ((ibpd->uobject) && (ibpd->uobject->context)) {
					nesqp->user_mode = 1;
					nes_ucontext = to_nesucontext(ibpd->uobject->context);
+1 −0
Original line number Diff line number Diff line
@@ -184,5 +184,6 @@ struct nes_qp {
	u8                    pau_busy;
	u8                    pau_pending;
	u8                    pau_state;
	__u64                 nesuqp_addr;
};
#endif			/* NES_VERBS_H */