]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
RDMA/rtrs: For HB error add additional clt/srv specific logging
authorMd Haris Iqbal <haris.iqbal@ionos.com>
Wed, 21 Aug 2024 11:22:07 +0000 (13:22 +0200)
committerLeon Romanovsky <leon@kernel.org>
Wed, 28 Aug 2024 12:24:34 +0000 (15:24 +0300)
In case of HB error, we need to know the specific path on which it
happened, for better debugging. Since the clt/srv path structures are not
available in rtrs.c, it needs to be done in the individual HB error
handler.

This commit add those loging. A sample kernel log output after this commit:

rtrs_core L357: <blya>: HB missed max reached.
rtrs_server L717: <blya>: HB err handler for path=ip:x.x.x.x@ip:x.x.x.x
.
.
rtrs_core L357: <blya>: HB missed max reached.
rtrs_client L1519: <blya>: HB err handler for path=ip:x.x.x.x@ip:x.x.x.x

Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Reviewed-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Grzegorz Prajsner <grzegorz.prajsner@ionos.com>
Link: https://patch.msgid.link/20240821112217.41827-2-haris.iqbal@ionos.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/ulp/rtrs/rtrs-clt.c
drivers/infiniband/ulp/rtrs/rtrs-srv.c

index 88106cf5ce550c23e1aa20d8c443296f5d5caa0e..66ac4dba990f9c6b4443237f328ce1e35d9eb860 100644 (file)
@@ -1494,7 +1494,9 @@ static bool rtrs_clt_change_state_get_old(struct rtrs_clt_path *clt_path,
 static void rtrs_clt_hb_err_handler(struct rtrs_con *c)
 {
        struct rtrs_clt_con *con = container_of(c, typeof(*con), c);
+       struct rtrs_clt_path *clt_path = to_clt_path(con->c.path);
 
+       rtrs_err(con->c.path, "HB err handler for path=%s\n", kobject_name(&clt_path->kobj));
        rtrs_rdma_error_recovery(con);
 }
 
index 1d33efb8fb03be74be953c280a9df61fdbba6ac4..f76d483c37842d27c7e5ab6f2ce340497d0adaa3 100644 (file)
@@ -672,6 +672,10 @@ err:
 
 static void rtrs_srv_hb_err_handler(struct rtrs_con *c)
 {
+       struct rtrs_srv_con *con = container_of(c, typeof(*con), c);
+       struct rtrs_srv_path *srv_path = to_srv_path(con->c.path);
+
+       rtrs_err(con->c.path, "HB err handler for path=%s\n", kobject_name(&srv_path->kobj));
        close_path(to_srv_path(c->path));
 }