Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

RDMA/rtrs: Extend log message when a port fails

Add HCA name and port of this HCA.
This would help with analysing and debugging the logs.

The logs would looks something like this,

rtrs_server L2516: Handling event: port error (10).
HCA name: mlx4_0, port num: 2
rtrs_client L3326: Handling event: port error (10).
HCA name: mlx4_0, port num: 1

Signed-off-by: Kim Zhu <zhu.yanjun@ionos.com>
Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Grzegorz Prajsner <grzegorz.prajsner@ionos.com>
Link: https://patch.msgid.link/20260107161517.56357-9-haris.iqbal@ionos.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>

authored by

Kim Zhu and committed by
Leon Romanovsky
6405f72e b034a10f

+10 -4
+5 -2
drivers/infiniband/ulp/rtrs/rtrs-clt.c
··· 3178 3178 void rtrs_clt_ib_event_handler(struct ib_event_handler *handler, 3179 3179 struct ib_event *ibevent) 3180 3180 { 3181 - pr_info("Handling event: %s (%d).\n", ib_event_msg(ibevent->event), 3182 - ibevent->event); 3181 + struct ib_device *idev = ibevent->device; 3182 + u32 port_num = ibevent->element.port_num; 3183 + 3184 + pr_info("Handling event: %s (%d). HCA name: %s, port num: %u\n", 3185 + ib_event_msg(ibevent->event), ibevent->event, idev->name, port_num); 3183 3186 } 3184 3187 3185 3188
+5 -2
drivers/infiniband/ulp/rtrs/rtrs-srv.c
··· 2342 2342 void rtrs_srv_ib_event_handler(struct ib_event_handler *handler, 2343 2343 struct ib_event *ibevent) 2344 2344 { 2345 - pr_info("Handling event: %s (%d).\n", ib_event_msg(ibevent->event), 2346 - ibevent->event); 2345 + struct ib_device *idev = ibevent->device; 2346 + u32 port_num = ibevent->element.port_num; 2347 + 2348 + pr_info("Handling event: %s (%d). HCA name: %s, port num: %u\n", 2349 + ib_event_msg(ibevent->event), ibevent->event, idev->name, port_num); 2347 2350 } 2348 2351 2349 2352 static int rtrs_srv_ib_dev_init(struct rtrs_ib_dev *dev)