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

Commit 0c7d3757 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
  IB/ehca: Remove obsolete prototypes
  IB/ehca: Remove use of do_mmap()
  RDMA/addr: Handle ethernet neighbour updates during route resolution
  IB: Make sure struct ib_user_mad.data is aligned
  IB/srp: Don't wait for response when QP is in error state.
  IB: Return qp pointer as part of ib_wc
  IB: Include <linux/kref.h> explicitly in <rdma/ib_verbs.h>
parents 2442d310 b45bfcc1
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -360,8 +360,7 @@ static int netevent_callback(struct notifier_block *self, unsigned long event,
	if (event == NETEVENT_NEIGH_UPDATE) {
	if (event == NETEVENT_NEIGH_UPDATE) {
		struct neighbour *neigh = ctx;
		struct neighbour *neigh = ctx;


		if (neigh->dev->type == ARPHRD_INFINIBAND &&
		if (neigh->nud_state & NUD_VALID) {
		    (neigh->nud_state & NUD_VALID)) {
			set_timeout(jiffies);
			set_timeout(jiffies);
		}
		}
	}
	}
+7 −4
Original line number Original line Diff line number Diff line
@@ -642,7 +642,8 @@ static void snoop_recv(struct ib_mad_qp_info *qp_info,
	spin_unlock_irqrestore(&qp_info->snoop_lock, flags);
	spin_unlock_irqrestore(&qp_info->snoop_lock, flags);
}
}


static void build_smp_wc(u64 wr_id, u16 slid, u16 pkey_index, u8 port_num,
static void build_smp_wc(struct ib_qp *qp,
			 u64 wr_id, u16 slid, u16 pkey_index, u8 port_num,
			 struct ib_wc *wc)
			 struct ib_wc *wc)
{
{
	memset(wc, 0, sizeof *wc);
	memset(wc, 0, sizeof *wc);
@@ -652,7 +653,7 @@ static void build_smp_wc(u64 wr_id, u16 slid, u16 pkey_index, u8 port_num,
	wc->pkey_index = pkey_index;
	wc->pkey_index = pkey_index;
	wc->byte_len = sizeof(struct ib_mad) + sizeof(struct ib_grh);
	wc->byte_len = sizeof(struct ib_mad) + sizeof(struct ib_grh);
	wc->src_qp = IB_QP0;
	wc->src_qp = IB_QP0;
	wc->qp_num = IB_QP0;
	wc->qp = qp;
	wc->slid = slid;
	wc->slid = slid;
	wc->sl = 0;
	wc->sl = 0;
	wc->dlid_path_bits = 0;
	wc->dlid_path_bits = 0;
@@ -713,7 +714,8 @@ static int handle_outgoing_dr_smp(struct ib_mad_agent_private *mad_agent_priv,
		goto out;
		goto out;
	}
	}


	build_smp_wc(send_wr->wr_id, be16_to_cpu(smp->dr_slid),
	build_smp_wc(mad_agent_priv->agent.qp,
		     send_wr->wr_id, be16_to_cpu(smp->dr_slid),
		     send_wr->wr.ud.pkey_index,
		     send_wr->wr.ud.pkey_index,
		     send_wr->wr.ud.port_num, &mad_wc);
		     send_wr->wr.ud.port_num, &mad_wc);


@@ -2355,7 +2357,8 @@ static void local_completions(struct work_struct *work)
			 * Defined behavior is to complete response
			 * Defined behavior is to complete response
			 * before request
			 * before request
			 */
			 */
			build_smp_wc((unsigned long) local->mad_send_wr,
			build_smp_wc(recv_mad_agent->agent.qp,
				     (unsigned long) local->mad_send_wr,
				     be16_to_cpu(IB_LID_PERMISSIVE),
				     be16_to_cpu(IB_LID_PERMISSIVE),
				     0, recv_mad_agent->agent.port_num, &wc);
				     0, recv_mad_agent->agent.port_num, &wc);


+1 −1
Original line number Original line Diff line number Diff line
@@ -933,7 +933,7 @@ ssize_t ib_uverbs_poll_cq(struct ib_uverbs_file *file,
		resp->wc[i].vendor_err 	   = wc[i].vendor_err;
		resp->wc[i].vendor_err 	   = wc[i].vendor_err;
		resp->wc[i].byte_len 	   = wc[i].byte_len;
		resp->wc[i].byte_len 	   = wc[i].byte_len;
		resp->wc[i].imm_data 	   = (__u32 __force) wc[i].imm_data;
		resp->wc[i].imm_data 	   = (__u32 __force) wc[i].imm_data;
		resp->wc[i].qp_num 	   = wc[i].qp_num;
		resp->wc[i].qp_num 	   = wc[i].qp->qp_num;
		resp->wc[i].src_qp 	   = wc[i].src_qp;
		resp->wc[i].src_qp 	   = wc[i].src_qp;
		resp->wc[i].wc_flags 	   = wc[i].wc_flags;
		resp->wc[i].wc_flags 	   = wc[i].wc_flags;
		resp->wc[i].pkey_index 	   = wc[i].pkey_index;
		resp->wc[i].pkey_index 	   = wc[i].pkey_index;
+1 −1
Original line number Original line Diff line number Diff line
@@ -153,7 +153,7 @@ static inline int c2_poll_one(struct c2_dev *c2dev,


	entry->status = c2_cqe_status_to_openib(c2_wr_get_result(ce));
	entry->status = c2_cqe_status_to_openib(c2_wr_get_result(ce));
	entry->wr_id = ce->hdr.context;
	entry->wr_id = ce->hdr.context;
	entry->qp_num = ce->handle;
	entry->qp = &qp->ibqp;
	entry->wc_flags = 0;
	entry->wc_flags = 0;
	entry->slid = 0;
	entry->slid = 0;
	entry->sl = 0;
	entry->sl = 0;
+7 −22
Original line number Original line Diff line number Diff line
@@ -119,13 +119,14 @@ struct ehca_qp {
	struct ipz_qp_handle ipz_qp_handle;
	struct ipz_qp_handle ipz_qp_handle;
	struct ehca_pfqp pf;
	struct ehca_pfqp pf;
	struct ib_qp_init_attr init_attr;
	struct ib_qp_init_attr init_attr;
	u64 uspace_squeue;
	u64 uspace_rqueue;
	u64 uspace_fwh;
	struct ehca_cq *send_cq;
	struct ehca_cq *send_cq;
	struct ehca_cq *recv_cq;
	struct ehca_cq *recv_cq;
	unsigned int sqerr_purgeflag;
	unsigned int sqerr_purgeflag;
	struct hlist_node list_entries;
	struct hlist_node list_entries;
	/* mmap counter for resources mapped into user space */
	u32 mm_count_squeue;
	u32 mm_count_rqueue;
	u32 mm_count_galpa;
};
};


/* must be power of 2 */
/* must be power of 2 */
@@ -142,13 +143,14 @@ struct ehca_cq {
	struct ipz_cq_handle ipz_cq_handle;
	struct ipz_cq_handle ipz_cq_handle;
	struct ehca_pfcq pf;
	struct ehca_pfcq pf;
	spinlock_t cb_lock;
	spinlock_t cb_lock;
	u64 uspace_queue;
	u64 uspace_fwh;
	struct hlist_head qp_hashtab[QP_HASHTAB_LEN];
	struct hlist_head qp_hashtab[QP_HASHTAB_LEN];
	struct list_head entry;
	struct list_head entry;
	u32 nr_callbacks;
	u32 nr_callbacks;
	spinlock_t task_lock;
	spinlock_t task_lock;
	u32 ownpid;
	u32 ownpid;
	/* mmap counter for resources mapped into user space */
	u32 mm_count_queue;
	u32 mm_count_galpa;
};
};


enum ehca_mr_flag {
enum ehca_mr_flag {
@@ -248,20 +250,6 @@ struct ehca_ucontext {
	struct ib_ucontext ib_ucontext;
	struct ib_ucontext ib_ucontext;
};
};


struct ehca_module *ehca_module_new(void);

int ehca_module_delete(struct ehca_module *me);

int ehca_eq_ctor(struct ehca_eq *eq);

int ehca_eq_dtor(struct ehca_eq *eq);

struct ehca_shca *ehca_shca_new(void);

int ehca_shca_delete(struct ehca_shca *me);

struct ehca_sport *ehca_sport_new(struct ehca_shca *anchor);

int ehca_init_pd_cache(void);
int ehca_init_pd_cache(void);
void ehca_cleanup_pd_cache(void);
void ehca_cleanup_pd_cache(void);
int ehca_init_cq_cache(void);
int ehca_init_cq_cache(void);
@@ -283,7 +271,6 @@ extern int ehca_port_act_time;
extern int ehca_use_hp_mr;
extern int ehca_use_hp_mr;


struct ipzu_queue_resp {
struct ipzu_queue_resp {
	u64 queue;        /* points to first queue entry */
	u32 qe_size;      /* queue entry size */
	u32 qe_size;      /* queue entry size */
	u32 act_nr_of_sg;
	u32 act_nr_of_sg;
	u32 queue_length; /* queue length allocated in bytes */
	u32 queue_length; /* queue length allocated in bytes */
@@ -296,7 +283,6 @@ struct ehca_create_cq_resp {
	u32 cq_number;
	u32 cq_number;
	u32 token;
	u32 token;
	struct ipzu_queue_resp ipz_queue;
	struct ipzu_queue_resp ipz_queue;
	struct h_galpas galpas;
};
};


struct ehca_create_qp_resp {
struct ehca_create_qp_resp {
@@ -309,7 +295,6 @@ struct ehca_create_qp_resp {
	u32 dummy; /* padding for 8 byte alignment */
	u32 dummy; /* padding for 8 byte alignment */
	struct ipzu_queue_resp ipz_squeue;
	struct ipzu_queue_resp ipz_squeue;
	struct ipzu_queue_resp ipz_rqueue;
	struct ipzu_queue_resp ipz_rqueue;
	struct h_galpas galpas;
};
};


struct ehca_alloc_cq_parms {
struct ehca_alloc_cq_parms {
Loading