Commit d9372794 authored by Vaishali Thakkar's avatar Vaishali Thakkar Committed by Jason Gunthorpe

RDMA/rtrs: Rename rtrs_sess to rtrs_path

rtrs_sess is in fact a path. This makes it confusing and difficult to get
into the code. So let's rename the structure and related use cases of it.

Coccinelle was used to do the transformation for most of the occurrences
and remaining ones were handled manually.

Link: https://lore.kernel.org/r/20220105180708.7774-2-jinpu.wang@ionos.comSigned-off-by: default avatarVaishali Thakkar <vaishali.thakkar@ionos.com>
Signed-off-by: default avatarJack Wang <jinpu.wang@ionos.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 8a3fa72f
......@@ -13,7 +13,7 @@
void rtrs_clt_update_wc_stats(struct rtrs_clt_con *con)
{
struct rtrs_clt_sess *sess = to_clt_sess(con->c.sess);
struct rtrs_clt_sess *sess = to_clt_sess(con->c.path);
struct rtrs_clt_stats *stats = sess->stats;
struct rtrs_clt_stats_pcpu *s;
int cpu;
......@@ -180,7 +180,7 @@ static inline void rtrs_clt_update_rdma_stats(struct rtrs_clt_stats *stats,
void rtrs_clt_update_all_stats(struct rtrs_clt_io_req *req, int dir)
{
struct rtrs_clt_con *con = req->con;
struct rtrs_clt_sess *sess = to_clt_sess(con->c.sess);
struct rtrs_clt_sess *sess = to_clt_sess(con->c.path);
struct rtrs_clt_stats *stats = sess->stats;
unsigned int len;
......
This diff is collapsed.
......@@ -125,7 +125,7 @@ struct rtrs_rbuf {
};
struct rtrs_clt_sess {
struct rtrs_sess s;
struct rtrs_path s;
struct rtrs_clt *clt;
wait_queue_head_t state_wq;
enum rtrs_clt_state state;
......@@ -186,7 +186,7 @@ static inline struct rtrs_clt_con *to_clt_con(struct rtrs_con *c)
return container_of(c, struct rtrs_clt_con, c);
}
static inline struct rtrs_clt_sess *to_clt_sess(struct rtrs_sess *s)
static inline struct rtrs_clt_sess *to_clt_sess(struct rtrs_path *s)
{
return container_of(s, struct rtrs_clt_sess, s);
}
......
......@@ -90,7 +90,7 @@ struct rtrs_ib_dev {
};
struct rtrs_con {
struct rtrs_sess *sess;
struct rtrs_path *path;
struct ib_qp *qp;
struct ib_cq *cq;
struct rdma_cm_id *cm_id;
......@@ -100,7 +100,7 @@ struct rtrs_con {
atomic_t sq_wr_avail;
};
struct rtrs_sess {
struct rtrs_path {
struct list_head entry;
struct sockaddr_storage dst_addr;
struct sockaddr_storage src_addr;
......@@ -313,19 +313,19 @@ int rtrs_iu_post_rdma_write_imm(struct rtrs_con *con, struct rtrs_iu *iu,
int rtrs_post_recv_empty(struct rtrs_con *con, struct ib_cqe *cqe);
int rtrs_cq_qp_create(struct rtrs_sess *sess, struct rtrs_con *con,
int rtrs_cq_qp_create(struct rtrs_path *path, struct rtrs_con *con,
u32 max_send_sge, int cq_vector, int nr_cqe,
u32 max_send_wr, u32 max_recv_wr,
enum ib_poll_context poll_ctx);
void rtrs_cq_qp_destroy(struct rtrs_con *con);
void rtrs_init_hb(struct rtrs_sess *sess, struct ib_cqe *cqe,
void rtrs_init_hb(struct rtrs_path *path, struct ib_cqe *cqe,
unsigned int interval_ms, unsigned int missed_max,
void (*err_handler)(struct rtrs_con *con),
struct workqueue_struct *wq);
void rtrs_start_hb(struct rtrs_sess *sess);
void rtrs_stop_hb(struct rtrs_sess *sess);
void rtrs_send_hb_ack(struct rtrs_sess *sess);
void rtrs_start_hb(struct rtrs_path *path);
void rtrs_stop_hb(struct rtrs_path *path);
void rtrs_send_hb_ack(struct rtrs_path *path);
void rtrs_rdma_dev_pd_init(enum ib_pd_flags pd_flags,
struct rtrs_rdma_dev_pd *pool);
......
......@@ -37,7 +37,7 @@ static ssize_t rtrs_srv_disconnect_store(struct kobject *kobj,
const char *buf, size_t count)
{
struct rtrs_srv_sess *sess;
struct rtrs_sess *s;
struct rtrs_path *s;
char str[MAXHOSTNAMELEN];
sess = container_of(kobj, struct rtrs_srv_sess, kobj);
......@@ -230,7 +230,7 @@ static struct kobj_type ktype_stats = {
static int rtrs_srv_create_stats_files(struct rtrs_srv_sess *sess)
{
int err;
struct rtrs_sess *s = &sess->s;
struct rtrs_path *s = &sess->s;
err = kobject_init_and_add(&sess->stats->kobj_stats, &ktype_stats,
&sess->kobj, "stats");
......@@ -258,7 +258,7 @@ static int rtrs_srv_create_stats_files(struct rtrs_srv_sess *sess)
int rtrs_srv_create_sess_files(struct rtrs_srv_sess *sess)
{
struct rtrs_srv *srv = sess->srv;
struct rtrs_sess *s = &sess->s;
struct rtrs_path *s = &sess->s;
char str[NAME_MAX];
int err;
struct rtrs_addr path = {
......
......@@ -62,7 +62,7 @@ static inline struct rtrs_srv_con *to_srv_con(struct rtrs_con *c)
return container_of(c, struct rtrs_srv_con, c);
}
static inline struct rtrs_srv_sess *to_srv_sess(struct rtrs_sess *s)
static inline struct rtrs_srv_sess *to_srv_sess(struct rtrs_path *s)
{
return container_of(s, struct rtrs_srv_sess, s);
}
......@@ -180,7 +180,7 @@ static inline void rtrs_srv_put_ops_ids(struct rtrs_srv_sess *sess)
static void rtrs_srv_reg_mr_done(struct ib_cq *cq, struct ib_wc *wc)
{
struct rtrs_srv_con *con = to_srv_con(wc->qp->qp_context);
struct rtrs_sess *s = con->c.sess;
struct rtrs_path *s = con->c.path;
struct rtrs_srv_sess *sess = to_srv_sess(s);
if (wc->status != IB_WC_SUCCESS) {
......@@ -197,7 +197,7 @@ static struct ib_cqe local_reg_cqe = {
static int rdma_write_sg(struct rtrs_srv_op *id)
{
struct rtrs_sess *s = id->con->c.sess;
struct rtrs_path *s = id->con->c.path;
struct rtrs_srv_sess *sess = to_srv_sess(s);
dma_addr_t dma_addr = sess->dma_addr[id->msg_id];
struct rtrs_srv_mr *srv_mr;
......@@ -341,7 +341,7 @@ static int rdma_write_sg(struct rtrs_srv_op *id)
static int send_io_resp_imm(struct rtrs_srv_con *con, struct rtrs_srv_op *id,
int errno)
{
struct rtrs_sess *s = con->c.sess;
struct rtrs_path *s = con->c.path;
struct rtrs_srv_sess *sess = to_srv_sess(s);
struct ib_send_wr inv_wr, *wr = NULL;
struct ib_rdma_wr imm_wr;
......@@ -482,14 +482,14 @@ bool rtrs_srv_resp_rdma(struct rtrs_srv_op *id, int status)
{
struct rtrs_srv_sess *sess;
struct rtrs_srv_con *con;
struct rtrs_sess *s;
struct rtrs_path *s;
int err;
if (WARN_ON(!id))
return true;
con = id->con;
s = con->c.sess;
s = con->c.path;
sess = to_srv_sess(s);
id->status = status;
......@@ -564,7 +564,7 @@ static void unmap_cont_bufs(struct rtrs_srv_sess *sess)
static int map_cont_bufs(struct rtrs_srv_sess *sess)
{
struct rtrs_srv *srv = sess->srv;
struct rtrs_sess *ss = &sess->s;
struct rtrs_path *ss = &sess->s;
int i, mri, err, mrs_num;
unsigned int chunk_bits;
int chunks_per_mr = 1;
......@@ -677,7 +677,7 @@ static int map_cont_bufs(struct rtrs_srv_sess *sess)
static void rtrs_srv_hb_err_handler(struct rtrs_con *c)
{
close_sess(to_srv_sess(c->sess));
close_sess(to_srv_sess(c->path));
}
static void rtrs_srv_init_hb(struct rtrs_srv_sess *sess)
......@@ -702,7 +702,7 @@ static void rtrs_srv_stop_hb(struct rtrs_srv_sess *sess)
static void rtrs_srv_info_rsp_done(struct ib_cq *cq, struct ib_wc *wc)
{
struct rtrs_srv_con *con = to_srv_con(wc->qp->qp_context);
struct rtrs_sess *s = con->c.sess;
struct rtrs_path *s = con->c.path;
struct rtrs_srv_sess *sess = to_srv_sess(s);
struct rtrs_iu *iu;
......@@ -788,7 +788,7 @@ static int rtrs_rdma_do_reject(struct rdma_cm_id *cm_id, int errno);
static int process_info_req(struct rtrs_srv_con *con,
struct rtrs_msg_info_req *msg)
{
struct rtrs_sess *s = con->c.sess;
struct rtrs_path *s = con->c.path;
struct rtrs_srv_sess *sess = to_srv_sess(s);
struct ib_send_wr *reg_wr = NULL;
struct rtrs_msg_info_rsp *rsp;
......@@ -889,7 +889,7 @@ static int process_info_req(struct rtrs_srv_con *con,
static void rtrs_srv_info_req_done(struct ib_cq *cq, struct ib_wc *wc)
{
struct rtrs_srv_con *con = to_srv_con(wc->qp->qp_context);
struct rtrs_sess *s = con->c.sess;
struct rtrs_path *s = con->c.path;
struct rtrs_srv_sess *sess = to_srv_sess(s);
struct rtrs_msg_info_req *msg;
struct rtrs_iu *iu;
......@@ -932,7 +932,7 @@ static void rtrs_srv_info_req_done(struct ib_cq *cq, struct ib_wc *wc)
static int post_recv_info_req(struct rtrs_srv_con *con)
{
struct rtrs_sess *s = con->c.sess;
struct rtrs_path *s = con->c.path;
struct rtrs_srv_sess *sess = to_srv_sess(s);
struct rtrs_iu *rx_iu;
int err;
......@@ -969,7 +969,7 @@ static int post_recv_io(struct rtrs_srv_con *con, size_t q_size)
static int post_recv_sess(struct rtrs_srv_sess *sess)
{
struct rtrs_srv *srv = sess->srv;
struct rtrs_sess *s = &sess->s;
struct rtrs_path *s = &sess->s;
size_t q_size;
int err, cid;
......@@ -993,7 +993,7 @@ static void process_read(struct rtrs_srv_con *con,
struct rtrs_msg_rdma_read *msg,
u32 buf_id, u32 off)
{
struct rtrs_sess *s = con->c.sess;
struct rtrs_path *s = con->c.path;
struct rtrs_srv_sess *sess = to_srv_sess(s);
struct rtrs_srv *srv = sess->srv;
struct rtrs_srv_ctx *ctx = srv->ctx;
......@@ -1051,7 +1051,7 @@ static void process_write(struct rtrs_srv_con *con,
struct rtrs_msg_rdma_write *req,
u32 buf_id, u32 off)
{
struct rtrs_sess *s = con->c.sess;
struct rtrs_path *s = con->c.path;
struct rtrs_srv_sess *sess = to_srv_sess(s);
struct rtrs_srv *srv = sess->srv;
struct rtrs_srv_ctx *ctx = srv->ctx;
......@@ -1102,7 +1102,7 @@ static void process_write(struct rtrs_srv_con *con,
static void process_io_req(struct rtrs_srv_con *con, void *msg,
u32 id, u32 off)
{
struct rtrs_sess *s = con->c.sess;
struct rtrs_path *s = con->c.path;
struct rtrs_srv_sess *sess = to_srv_sess(s);
struct rtrs_msg_rdma_hdr *hdr;
unsigned int type;
......@@ -1137,7 +1137,7 @@ static void rtrs_srv_inv_rkey_done(struct ib_cq *cq, struct ib_wc *wc)
struct rtrs_srv_mr *mr =
container_of(wc->wr_cqe, typeof(*mr), inv_cqe);
struct rtrs_srv_con *con = to_srv_con(wc->qp->qp_context);
struct rtrs_sess *s = con->c.sess;
struct rtrs_path *s = con->c.path;
struct rtrs_srv_sess *sess = to_srv_sess(s);
struct rtrs_srv *srv = sess->srv;
u32 msg_id, off;
......@@ -1194,7 +1194,7 @@ static void rtrs_rdma_process_wr_wait_list(struct rtrs_srv_con *con)
static void rtrs_srv_rdma_done(struct ib_cq *cq, struct ib_wc *wc)
{
struct rtrs_srv_con *con = to_srv_con(wc->qp->qp_context);
struct rtrs_sess *s = con->c.sess;
struct rtrs_path *s = con->c.path;
struct rtrs_srv_sess *sess = to_srv_sess(s);
struct rtrs_srv *srv = sess->srv;
u32 imm_type, imm_payload;
......@@ -1633,7 +1633,7 @@ static int create_con(struct rtrs_srv_sess *sess,
unsigned int cid)
{
struct rtrs_srv *srv = sess->srv;
struct rtrs_sess *s = &sess->s;
struct rtrs_path *s = &sess->s;
struct rtrs_srv_con *con;
u32 cq_num, max_send_wr, max_recv_wr, wr_limit;
......@@ -1648,7 +1648,7 @@ static int create_con(struct rtrs_srv_sess *sess,
spin_lock_init(&con->rsp_wr_wait_lock);
INIT_LIST_HEAD(&con->rsp_wr_wait_list);
con->c.cm_id = cm_id;
con->c.sess = &sess->s;
con->c.path = &sess->s;
con->c.cid = cid;
atomic_set(&con->c.wr_cnt, 1);
wr_limit = sess->s.dev->ib_dev->attrs.max_qp_wr;
......@@ -1859,7 +1859,7 @@ static int rtrs_rdma_connect(struct rdma_cm_id *cm_id,
mutex_lock(&srv->paths_mutex);
sess = __find_sess(srv, &msg->sess_uuid);
if (sess) {
struct rtrs_sess *s = &sess->s;
struct rtrs_path *s = &sess->s;
/* Session already holds a reference */
put_srv(srv);
......@@ -1938,12 +1938,12 @@ static int rtrs_srv_rdma_cm_handler(struct rdma_cm_id *cm_id,
struct rdma_cm_event *ev)
{
struct rtrs_srv_sess *sess = NULL;
struct rtrs_sess *s = NULL;
struct rtrs_path *s = NULL;
if (ev->event != RDMA_CM_EVENT_CONNECT_REQUEST) {
struct rtrs_con *c = cm_id->context;
s = c->sess;
s = c->path;
sess = to_srv_sess(s);
}
......
......@@ -72,7 +72,7 @@ struct rtrs_srv_mr {
};
struct rtrs_srv_sess {
struct rtrs_sess s;
struct rtrs_path s;
struct rtrs_srv *srv;
struct work_struct close_work;
enum rtrs_srv_state state;
......
......@@ -69,16 +69,16 @@ EXPORT_SYMBOL_GPL(rtrs_iu_free);
int rtrs_iu_post_recv(struct rtrs_con *con, struct rtrs_iu *iu)
{
struct rtrs_sess *sess = con->sess;
struct rtrs_path *path = con->path;
struct ib_recv_wr wr;
struct ib_sge list;
list.addr = iu->dma_addr;
list.length = iu->size;
list.lkey = sess->dev->ib_pd->local_dma_lkey;
list.lkey = path->dev->ib_pd->local_dma_lkey;
if (list.length == 0) {
rtrs_wrn(con->sess,
rtrs_wrn(con->path,
"Posting receive work request failed, sg list is empty\n");
return -EINVAL;
}
......@@ -126,7 +126,7 @@ static int rtrs_post_send(struct ib_qp *qp, struct ib_send_wr *head,
int rtrs_iu_post_send(struct rtrs_con *con, struct rtrs_iu *iu, size_t size,
struct ib_send_wr *head)
{
struct rtrs_sess *sess = con->sess;
struct rtrs_path *path = con->path;
struct ib_send_wr wr;
struct ib_sge list;
......@@ -135,7 +135,7 @@ int rtrs_iu_post_send(struct rtrs_con *con, struct rtrs_iu *iu, size_t size,
list.addr = iu->dma_addr;
list.length = size;
list.lkey = sess->dev->ib_pd->local_dma_lkey;
list.lkey = path->dev->ib_pd->local_dma_lkey;
wr = (struct ib_send_wr) {
.wr_cqe = &iu->cqe,
......@@ -188,11 +188,11 @@ static int rtrs_post_rdma_write_imm_empty(struct rtrs_con *con,
struct ib_send_wr *head)
{
struct ib_rdma_wr wr;
struct rtrs_sess *sess = con->sess;
struct rtrs_path *path = con->path;
enum ib_send_flags sflags;
atomic_dec_if_positive(&con->sq_wr_avail);
sflags = (atomic_inc_return(&con->wr_cnt) % sess->signal_interval) ?
sflags = (atomic_inc_return(&con->wr_cnt) % path->signal_interval) ?
0 : IB_SEND_SIGNALED;
wr = (struct ib_rdma_wr) {
......@@ -211,12 +211,12 @@ static void qp_event_handler(struct ib_event *ev, void *ctx)
switch (ev->event) {
case IB_EVENT_COMM_EST:
rtrs_info(con->sess, "QP event %s (%d) received\n",
rtrs_info(con->path, "QP event %s (%d) received\n",
ib_event_msg(ev->event), ev->event);
rdma_notify(con->cm_id, IB_EVENT_COMM_EST);
break;
default:
rtrs_info(con->sess, "Unhandled QP event %s (%d) received\n",
rtrs_info(con->path, "Unhandled QP event %s (%d) received\n",
ib_event_msg(ev->event), ev->event);
break;
}
......@@ -224,7 +224,7 @@ static void qp_event_handler(struct ib_event *ev, void *ctx)
static bool is_pollqueue(struct rtrs_con *con)
{
return con->cid >= con->sess->irq_con_num;
return con->cid >= con->path->irq_con_num;
}
static int create_cq(struct rtrs_con *con, int cq_vector, int nr_cqe,
......@@ -240,7 +240,7 @@ static int create_cq(struct rtrs_con *con, int cq_vector, int nr_cqe,
cq = ib_cq_pool_get(cm_id->device, nr_cqe, cq_vector, poll_ctx);
if (IS_ERR(cq)) {
rtrs_err(con->sess, "Creating completion queue failed, errno: %ld\n",
rtrs_err(con->path, "Creating completion queue failed, errno: %ld\n",
PTR_ERR(cq));
return PTR_ERR(cq);
}
......@@ -271,7 +271,7 @@ static int create_qp(struct rtrs_con *con, struct ib_pd *pd,
ret = rdma_create_qp(cm_id, pd, &init_attr);
if (ret) {
rtrs_err(con->sess, "Creating QP failed, err: %d\n", ret);
rtrs_err(con->path, "Creating QP failed, err: %d\n", ret);
return ret;
}
con->qp = cm_id->qp;
......@@ -290,7 +290,7 @@ static void destroy_cq(struct rtrs_con *con)
con->cq = NULL;
}
int rtrs_cq_qp_create(struct rtrs_sess *sess, struct rtrs_con *con,
int rtrs_cq_qp_create(struct rtrs_path *path, struct rtrs_con *con,
u32 max_send_sge, int cq_vector, int nr_cqe,
u32 max_send_wr, u32 max_recv_wr,
enum ib_poll_context poll_ctx)
......@@ -301,13 +301,13 @@ int rtrs_cq_qp_create(struct rtrs_sess *sess, struct rtrs_con *con,
if (err)
return err;
err = create_qp(con, sess->dev->ib_pd, max_send_wr, max_recv_wr,
err = create_qp(con, path->dev->ib_pd, max_send_wr, max_recv_wr,
max_send_sge);
if (err) {
destroy_cq(con);
return err;
}
con->sess = sess;
con->path = path;
return 0;
}
......@@ -323,24 +323,24 @@ void rtrs_cq_qp_destroy(struct rtrs_con *con)
}
EXPORT_SYMBOL_GPL(rtrs_cq_qp_destroy);
static void schedule_hb(struct rtrs_sess *sess)
static void schedule_hb(struct rtrs_path *path)
{
queue_delayed_work(sess->hb_wq, &sess->hb_dwork,
msecs_to_jiffies(sess->hb_interval_ms));
queue_delayed_work(path->hb_wq, &path->hb_dwork,
msecs_to_jiffies(path->hb_interval_ms));
}
void rtrs_send_hb_ack(struct rtrs_sess *sess)
void rtrs_send_hb_ack(struct rtrs_path *path)
{
struct rtrs_con *usr_con = sess->con[0];
struct rtrs_con *usr_con = path->con[0];
u32 imm;
int err;
imm = rtrs_to_imm(RTRS_HB_ACK_IMM, 0);
err = rtrs_post_rdma_write_imm_empty(usr_con, sess->hb_cqe, imm,
err = rtrs_post_rdma_write_imm_empty(usr_con, path->hb_cqe, imm,
NULL);
if (err) {
rtrs_err(sess, "send HB ACK failed, errno: %d\n", err);
sess->hb_err_handler(usr_con);
rtrs_err(path, "send HB ACK failed, errno: %d\n", err);
path->hb_err_handler(usr_con);
return;
}
}
......@@ -349,63 +349,63 @@ EXPORT_SYMBOL_GPL(rtrs_send_hb_ack);
static void hb_work(struct work_struct *work)
{
struct rtrs_con *usr_con;
struct rtrs_sess *sess;
struct rtrs_path *path;
u32 imm;
int err;
sess = container_of(to_delayed_work(work), typeof(*sess), hb_dwork);
usr_con = sess->con[0];
path = container_of(to_delayed_work(work), typeof(*path), hb_dwork);
usr_con = path->con[0];
if (sess->hb_missed_cnt > sess->hb_missed_max) {
rtrs_err(sess, "HB missed max reached.\n");
sess->hb_err_handler(usr_con);
if (path->hb_missed_cnt > path->hb_missed_max) {
rtrs_err(path, "HB missed max reached.\n");
path->hb_err_handler(usr_con);
return;
}
if (sess->hb_missed_cnt++) {
if (path->hb_missed_cnt++) {
/* Reschedule work without sending hb */
schedule_hb(sess);
schedule_hb(path);
return;
}
sess->hb_last_sent = ktime_get();
path->hb_last_sent = ktime_get();
imm = rtrs_to_imm(RTRS_HB_MSG_IMM, 0);
err = rtrs_post_rdma_write_imm_empty(usr_con, sess->hb_cqe, imm,
err = rtrs_post_rdma_write_imm_empty(usr_con, path->hb_cqe, imm,
NULL);
if (err) {
rtrs_err(sess, "HB send failed, errno: %d\n", err);
sess->hb_err_handler(usr_con);
rtrs_err(path, "HB send failed, errno: %d\n", err);
path->hb_err_handler(usr_con);
return;
}
schedule_hb(sess);
schedule_hb(path);
}
void rtrs_init_hb(struct rtrs_sess *sess, struct ib_cqe *cqe,
void rtrs_init_hb(struct rtrs_path *path, struct ib_cqe *cqe,
unsigned int interval_ms, unsigned int missed_max,
void (*err_handler)(struct rtrs_con *con),
struct workqueue_struct *wq)
{
sess->hb_cqe = cqe;
sess->hb_interval_ms = interval_ms;
sess->hb_err_handler = err_handler;
sess->hb_wq = wq;
sess->hb_missed_max = missed_max;
sess->hb_missed_cnt = 0;
INIT_DELAYED_WORK(&sess->hb_dwork, hb_work);
path->hb_cqe = cqe;
path->hb_interval_ms = interval_ms;
path->hb_err_handler = err_handler;
path->hb_wq = wq;
path->hb_missed_max = missed_max;
path->hb_missed_cnt = 0;
INIT_DELAYED_WORK(&path->hb_dwork, hb_work);
}
EXPORT_SYMBOL_GPL(rtrs_init_hb);
void rtrs_start_hb(struct rtrs_sess *sess)
void rtrs_start_hb(struct rtrs_path *path)
{
schedule_hb(sess);
schedule_hb(path);
}
EXPORT_SYMBOL_GPL(rtrs_start_hb);
void rtrs_stop_hb(struct rtrs_sess *sess)
void rtrs_stop_hb(struct rtrs_path *path)
{
cancel_delayed_work_sync(&sess->hb_dwork);
sess->hb_missed_cnt = 0;
cancel_delayed_work_sync(&path->hb_dwork);
path->hb_missed_cnt = 0;
}
EXPORT_SYMBOL_GPL(rtrs_stop_hb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment