Lines Matching refs:path
74 struct rtrs_path *path = con->path; in rtrs_iu_post_recv() local
80 list.lkey = path->dev->ib_pd->local_dma_lkey; in rtrs_iu_post_recv()
83 rtrs_wrn(con->path, in rtrs_iu_post_recv()
131 struct rtrs_path *path = con->path; in rtrs_iu_post_send() local
140 list.lkey = path->dev->ib_pd->local_dma_lkey; in rtrs_iu_post_send()
193 struct rtrs_path *path = con->path; in rtrs_post_rdma_write_imm_empty() local
197 sflags = (atomic_inc_return(&con->wr_cnt) % path->signal_interval) ? in rtrs_post_rdma_write_imm_empty()
216 rtrs_info(con->path, "QP event %s (%d) received\n", in qp_event_handler()
221 rtrs_info(con->path, "Unhandled QP event %s (%d) received\n", in qp_event_handler()
229 return con->cid >= con->path->irq_con_num; in is_pollqueue()
245 rtrs_err(con->path, "Creating completion queue failed, errno: %ld\n", in create_cq()
276 rtrs_err(con->path, "Creating QP failed, err: %d\n", ret); in create_qp()
295 int rtrs_cq_qp_create(struct rtrs_path *path, struct rtrs_con *con, in rtrs_cq_qp_create() argument
306 err = create_qp(con, path->dev->ib_pd, max_send_wr, max_recv_wr, in rtrs_cq_qp_create()
312 con->path = path; in rtrs_cq_qp_create()
328 static void schedule_hb(struct rtrs_path *path) in schedule_hb() argument
330 queue_delayed_work(path->hb_wq, &path->hb_dwork, in schedule_hb()
331 msecs_to_jiffies(path->hb_interval_ms)); in schedule_hb()
334 void rtrs_send_hb_ack(struct rtrs_path *path) in rtrs_send_hb_ack() argument
336 struct rtrs_con *usr_con = path->con[0]; in rtrs_send_hb_ack()
341 err = rtrs_post_rdma_write_imm_empty(usr_con, path->hb_cqe, imm, in rtrs_send_hb_ack()
344 rtrs_err(path, "send HB ACK failed, errno: %d\n", err); in rtrs_send_hb_ack()
345 path->hb_err_handler(usr_con); in rtrs_send_hb_ack()
354 struct rtrs_path *path; in hb_work() local
358 path = container_of(to_delayed_work(work), typeof(*path), hb_dwork); in hb_work()
359 usr_con = path->con[0]; in hb_work()
361 if (path->hb_missed_cnt > path->hb_missed_max) { in hb_work()
362 rtrs_err(path, "HB missed max reached.\n"); in hb_work()
363 path->hb_err_handler(usr_con); in hb_work()
366 if (path->hb_missed_cnt++) { in hb_work()
368 schedule_hb(path); in hb_work()
372 path->hb_last_sent = ktime_get(); in hb_work()
375 err = rtrs_post_rdma_write_imm_empty(usr_con, path->hb_cqe, imm, in hb_work()
378 rtrs_err(path, "HB send failed, errno: %d\n", err); in hb_work()
379 path->hb_err_handler(usr_con); in hb_work()
383 schedule_hb(path); in hb_work()
386 void rtrs_init_hb(struct rtrs_path *path, struct ib_cqe *cqe, in rtrs_init_hb() argument
391 path->hb_cqe = cqe; in rtrs_init_hb()
392 path->hb_interval_ms = interval_ms; in rtrs_init_hb()
393 path->hb_err_handler = err_handler; in rtrs_init_hb()
394 path->hb_wq = wq; in rtrs_init_hb()
395 path->hb_missed_max = missed_max; in rtrs_init_hb()
396 path->hb_missed_cnt = 0; in rtrs_init_hb()
397 INIT_DELAYED_WORK(&path->hb_dwork, hb_work); in rtrs_init_hb()
401 void rtrs_start_hb(struct rtrs_path *path) in rtrs_start_hb() argument
403 schedule_hb(path); in rtrs_start_hb()
407 void rtrs_stop_hb(struct rtrs_path *path) in rtrs_stop_hb() argument
409 cancel_delayed_work_sync(&path->hb_dwork); in rtrs_stop_hb()
410 path->hb_missed_cnt = 0; in rtrs_stop_hb()