The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b125b736eaf7da334b07dead671e48ecad3211b3
commit b125b736eaf7da334b07dead671e48ecad3211b3 Author: Slava Shwartsman <[email protected]> AuthorDate: 2026-07-02 15:06:39 +0000 Commit: Konstantin Belousov <[email protected]> CommitDate: 2026-07-06 10:15:02 +0000 ibcore: Fix GID sysctl fallback formatting When a GID table entry is empty or not yet present in the cache, show_port_gid() falls back to printing a zero GID. Use the existing GID_PRINT_FMT/GID_PRINT_ARGS helpers instead of Linux's %pI6 format, which FreeBSD printf treats as a pointer followed by "I6". This makes empty GID sysctl entries consistently report 0000:0000:0000:0000:0000:0000:0000:0000. Tested by: Wafa Hamzah <[email protected]> (mlx5_ib) Reviewed by: jhb, kib Sponsored by: NVIDIA Networking Fixes: 6a75471dbcf0 ("OFED: Various changes from Linux 4.19") Differential Revision: https://reviews.freebsd.org/D58042 --- sys/ofed/drivers/infiniband/core/ib_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ofed/drivers/infiniband/core/ib_sysfs.c b/sys/ofed/drivers/infiniband/core/ib_sysfs.c index b44d4b1d85f7..b9e8c57ddd67 100644 --- a/sys/ofed/drivers/infiniband/core/ib_sysfs.c +++ b/sys/ofed/drivers/infiniband/core/ib_sysfs.c @@ -421,7 +421,7 @@ static ssize_t show_port_gid(struct ib_port *p, struct port_attribute *attr, * space throwing such error on fail to read gid, return zero * GID as before. This maintains backward compatibility. */ - return sprintf(buf, "%pI6\n", zgid.raw); + return sprintf(buf, GID_PRINT_FMT"\n", GID_PRINT_ARGS(zgid.raw)); } ret = sprintf(buf, GID_PRINT_FMT"\n", GID_PRINT_ARGS(gid_attr->gid.raw));
