--- dpdk-stable-23.11.1/drivers/common/mlx5/linux/mlx5_common_os.c 2024-05-17 14:46:11.000000000 +0800 +++ dpdk-stable-23.11.1-mr/drivers/common/mlx5/linux/mlx5_common_os.c 2024-07-17 12:03:35.232571545 +0800 @@ -325,6 +325,11 @@ DRV_LOG(DEBUG, "Looking for rdma-core glue as " "\"%s\"", name); handle = dlopen(name, RTLD_LAZY); + if(!handle) { + dlmsg = dlerror(); + if (dlmsg) + DRV_LOG(WARNING, "Cannot load glue library: %s", dlmsg); + } break; } while (1); path[i] = end + 1; @@ -333,9 +338,6 @@ } if (!handle) { rte_errno = EINVAL; - dlmsg = dlerror(); - if (dlmsg) - DRV_LOG(WARNING, "Cannot load glue library: %s", dlmsg); goto glue_error; } sym = dlsym(handle, "mlx5_glue");