From 29cf815b38f04995ceca8cbc12c4ce3c031b145a Mon Sep 17 00:00:00 2001 From: Xinghai Cen Date: Tue, 7 Jan 2025 16:49:00 +0800 Subject: [PATCH] libhns: Add error log Add error log. Signed-off-by: Xinghai Cen --- 0043-libhns-Add-error-logs.patch | 34 ++++++++++++++++++++++++++++++++ rdma-core.spec | 9 ++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0043-libhns-Add-error-logs.patch diff --git a/0043-libhns-Add-error-logs.patch b/0043-libhns-Add-error-logs.patch new file mode 100644 index 0000000..4851c5c --- /dev/null +++ b/0043-libhns-Add-error-logs.patch @@ -0,0 +1,34 @@ +From e6309b6ea19022e254188e733e9f7238f11c86b4 Mon Sep 17 00:00:00 2001 +From: zhangyuyang +Date: Tue, 7 Jan 2025 14:54:46 +0800 +Subject: [PATCH] libhns: Add error logs + +driver inclusion +category: feature +bugzilla: https://gitee.com/src-openeuler/rdma-core/issues/IBFGPH + +---------------------------------------------------------------------- + +Add error logs to help diagnosis. + +Signed-off-by: Xinghai Cen +--- + providers/hns/hns_roce_u_verbs.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/providers/hns/hns_roce_u_verbs.c b/providers/hns/hns_roce_u_verbs.c +index e9acfab..15365c5 100644 +--- a/providers/hns/hns_roce_u_verbs.c ++++ b/providers/hns/hns_roce_u_verbs.c +@@ -1115,6 +1115,8 @@ static int check_qp_create_mask(struct hns_roce_context *ctx, + + if (attr->comp_mask & IBV_QP_INIT_ATTR_SEND_OPS_FLAGS && + !check_comp_mask(attr->send_ops_flags, SEND_OPS_FLAG_MASK)) ++ verbs_err(&ctx->ibv_ctx, "invalid send_flags 0x%x.\n", ++ attr->send_ops_flags); + return -EOPNOTSUPP; + + switch (attr->qp_type) { +-- +2.25.1 + diff --git a/rdma-core.spec b/rdma-core.spec index fa4de9a..1063b86 100644 --- a/rdma-core.spec +++ b/rdma-core.spec @@ -1,6 +1,6 @@ Name: rdma-core Version: 50.0 -Release: 19 +Release: 20 Summary: RDMA core userspace libraries and daemons License: GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause Url: https://github.com/linux-rdma/rdma-core @@ -48,6 +48,7 @@ patch39: 0039-libhns-Fix-the-exception-branch-of-wr_start-is-not-l.patch patch40: 0040-libhns-Fix-memory-leakage-when-DCA-is-enabled.patch patch41: 0041-libhns-Fix-coredump-during-QP-destruction-when-send_.patch patch42: 0042-libhns-Add-error-logs-to-help-diagnosis.patch +patch43: 0043-libhns-Add-error-logs.patch BuildRequires: binutils cmake >= 2.8.11 gcc libudev-devel pkgconfig pkgconfig(libnl-3.0) BuildRequires: pkgconfig(libnl-route-3.0) systemd systemd-devel @@ -625,6 +626,12 @@ fi %doc %{_docdir}/%{name}-%{version}/70-persistent-ipoib.rules %changelog +* Tue Jan 7 2025 Xinghai Cen - 50.0-20 +- Type: requirement +- ID: NA +- SUG: NA +- DESC: Add error logs + * Mon Jan 06 2025 Funda Wang - 50.0-19 - Type: bugfix - ID: NA -- Gitee