diff --git a/backport-rdma-Add-support-to-dump-SRQ-resource-in-raw-format.patch b/backport-rdma-Add-support-to-dump-SRQ-resource-in-raw-format.patch deleted file mode 100644 index 6367810f3553e4126aeb985746e25bcc3e77452f..0000000000000000000000000000000000000000 --- a/backport-rdma-Add-support-to-dump-SRQ-resource-in-raw-format.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 07bfa4482d49cc87a7b7c810c99397b9e8f794f6 Mon Sep 17 00:00:00 2001 -From: wenglianfa -Date: Tue, 10 Oct 2023 15:55:26 +0800 -Subject: [PATCH] rdma: Add support to dump SRQ resource in raw format - -Add support to dump SRQ resource in raw format. - -This patch relies on the corresponding kernel commit aebf8145e11a -("RDMA/core: Add support to dump SRQ resource in RAW format") - -Example: -$ rdma res show srq -r -dev hns3 149000... - -$ rdma res show srq -j -r -[{"ifindex":0,"ifname":"hns3","data":[149,0,0,...]}] - -Signed-off-by: wenglianfa -Reviewed-by: Leon Romanovsky -Signed-off-by: David Ahern ---- - rdma/res-srq.c | 20 ++++++++++++++++++-- - rdma/res.h | 2 ++ - 2 files changed, 20 insertions(+), 2 deletions(-) - -diff --git a/rdma/res-srq.c b/rdma/res-srq.c -index 186ae281..cf9209d7 100644 ---- a/rdma/res-srq.c -+++ b/rdma/res-srq.c -@@ -162,6 +162,20 @@ out: - return -EINVAL; - } - -+static int res_srq_line_raw(struct rd *rd, const char *name, int idx, -+ struct nlattr **nla_line) -+{ -+ if (!nla_line[RDMA_NLDEV_ATTR_RES_RAW]) -+ return MNL_CB_ERROR; -+ -+ open_json_object(NULL); -+ print_dev(rd, idx, name); -+ print_raw_data(rd, nla_line); -+ newline(rd); -+ -+ return MNL_CB_OK; -+} -+ - static int res_srq_line(struct rd *rd, const char *name, int idx, - struct nlattr **nla_line) - { -@@ -248,7 +262,8 @@ int res_srq_idx_parse_cb(const struct nlmsghdr *nlh, void *data) - name = mnl_attr_get_str(tb[RDMA_NLDEV_ATTR_DEV_NAME]); - idx = mnl_attr_get_u32(tb[RDMA_NLDEV_ATTR_DEV_INDEX]); - -- return res_srq_line(rd, name, idx, tb); -+ return (rd->show_raw) ? res_srq_line_raw(rd, name, idx, tb) : -+ res_srq_line(rd, name, idx, tb); - } - - int res_srq_parse_cb(const struct nlmsghdr *nlh, void *data) -@@ -276,7 +291,8 @@ int res_srq_parse_cb(const struct nlmsghdr *nlh, void *data) - if (ret != MNL_CB_OK) - break; - -- ret = res_srq_line(rd, name, idx, nla_line); -+ ret = (rd->show_raw) ? res_srq_line_raw(rd, name, idx, nla_line) : -+ res_srq_line(rd, name, idx, nla_line); - if (ret != MNL_CB_OK) - break; - } -diff --git a/rdma/res.h b/rdma/res.h -index 70e51acd..e880c28b 100644 ---- a/rdma/res.h -+++ b/rdma/res.h -@@ -39,6 +39,8 @@ static inline uint32_t res_get_command(uint32_t command, struct rd *rd) - return RDMA_NLDEV_CMD_RES_CQ_GET_RAW; - case RDMA_NLDEV_CMD_RES_MR_GET: - return RDMA_NLDEV_CMD_RES_MR_GET_RAW; -+ case RDMA_NLDEV_CMD_RES_SRQ_GET: -+ return RDMA_NLDEV_CMD_RES_SRQ_GET_RAW; - default: - return command; - } --- -2.25.1 - diff --git a/backport-rdma-Fix-the-error-of-accessing-string-variable-outs.patch b/backport-rdma-Fix-the-error-of-accessing-string-variable-outs.patch deleted file mode 100644 index 803939070f1b5c858c3e0028fce011fade51e2de..0000000000000000000000000000000000000000 --- a/backport-rdma-Fix-the-error-of-accessing-string-variable-outs.patch +++ /dev/null @@ -1,204 +0,0 @@ -From 3a882b6b4e0ee8c7cfd11176d36a98d30fc449d3 Mon Sep 17 00:00:00 2001 -From: wenglianfa -Date: Fri, 29 Dec 2023 14:52:41 +0800 -Subject: [PATCH] rdma: Fix the error of accessing string variable outside the - lifecycle - -All these SPRINT_BUF(b) definitions are inside the 'if' block, but -accessed outside the 'if' block through the pointers 'comm'. This -leads to empty 'comm' attribute when querying resource information. -So move the definitions to the beginning of the functions to extend -their life cycle. - -Before: -$ rdma res show srq -dev hns_0 srqn 0 type BASIC lqpn 18 pdn 5 pid 7775 comm - -After: -$ rdma res show srq -dev hns_0 srqn 0 type BASIC lqpn 18 pdn 5 pid 7775 comm ib_send_bw - -Fixes: 1808f002dfdd ("lib/fs: fix memory leak in get_task_name()") -Signed-off-by: wenglianfa -Signed-off-by: Junxian Huang -Reviewed-by: Petr Machata -Acked-by: Andrea Claudi -Signed-off-by: Stephen Hemminger ---- - rdma/res-cmid.c | 3 +-- - rdma/res-cq.c | 3 +-- - rdma/res-ctx.c | 3 +-- - rdma/res-mr.c | 3 +-- - rdma/res-pd.c | 3 +-- - rdma/res-qp.c | 3 +-- - rdma/res-srq.c | 3 +-- - rdma/stat.c | 3 +-- - 8 files changed, 8 insertions(+), 16 deletions(-) - -diff --git a/rdma/res-cmid.c b/rdma/res-cmid.c -index 8b6b3497..17a89cc4 100644 ---- a/rdma/res-cmid.c -+++ b/rdma/res-cmid.c -@@ -99,6 +99,7 @@ static int res_cm_id_line(struct rd *rd, const char *name, int idx, - uint32_t lqpn = 0, ps; - uint32_t cm_idn = 0; - char *comm = NULL; -+ SPRINT_BUF(b); - - if (!nla_line[RDMA_NLDEV_ATTR_RES_STATE] || - !nla_line[RDMA_NLDEV_ATTR_RES_PS]) -@@ -156,8 +157,6 @@ static int res_cm_id_line(struct rd *rd, const char *name, int idx, - goto out; - - if (nla_line[RDMA_NLDEV_ATTR_RES_PID]) { -- SPRINT_BUF(b); -- - pid = mnl_attr_get_u32(nla_line[RDMA_NLDEV_ATTR_RES_PID]); - if (!get_task_name(pid, b, sizeof(b))) - comm = b; -diff --git a/rdma/res-cq.c b/rdma/res-cq.c -index 420e935a..0cab3fe0 100644 ---- a/rdma/res-cq.c -+++ b/rdma/res-cq.c -@@ -63,6 +63,7 @@ static int res_cq_line(struct rd *rd, const char *name, int idx, - uint32_t cqn = 0; - uint64_t users; - uint32_t cqe; -+ SPRINT_BUF(b); - - if (!nla_line[RDMA_NLDEV_ATTR_RES_CQE] || - !nla_line[RDMA_NLDEV_ATTR_RES_USECNT]) -@@ -84,8 +85,6 @@ static int res_cq_line(struct rd *rd, const char *name, int idx, - goto out; - - if (nla_line[RDMA_NLDEV_ATTR_RES_PID]) { -- SPRINT_BUF(b); -- - pid = mnl_attr_get_u32(nla_line[RDMA_NLDEV_ATTR_RES_PID]); - if (!get_task_name(pid, b, sizeof(b))) - comm = b; -diff --git a/rdma/res-ctx.c b/rdma/res-ctx.c -index 0a84d016..235c837a 100644 ---- a/rdma/res-ctx.c -+++ b/rdma/res-ctx.c -@@ -13,13 +13,12 @@ static int res_ctx_line(struct rd *rd, const char *name, int idx, - char *comm = NULL; - uint32_t ctxn = 0; - uint32_t pid = 0; -+ SPRINT_BUF(b); - - if (!nla_line[RDMA_NLDEV_ATTR_RES_CTXN]) - return MNL_CB_ERROR; - - if (nla_line[RDMA_NLDEV_ATTR_RES_PID]) { -- SPRINT_BUF(b); -- - pid = mnl_attr_get_u32(nla_line[RDMA_NLDEV_ATTR_RES_PID]); - if (!get_task_name(pid, b, sizeof(b))) - comm = b; -diff --git a/rdma/res-mr.c b/rdma/res-mr.c -index 693d98c1..f6c2534a 100644 ---- a/rdma/res-mr.c -+++ b/rdma/res-mr.c -@@ -31,6 +31,7 @@ static int res_mr_line(struct rd *rd, const char *name, int idx, - uint32_t pdn = 0; - uint32_t mrn = 0; - uint32_t pid = 0; -+ SPRINT_BUF(b); - - if (!nla_line[RDMA_NLDEV_ATTR_RES_MRLEN]) - return MNL_CB_ERROR; -@@ -48,8 +49,6 @@ static int res_mr_line(struct rd *rd, const char *name, int idx, - goto out; - - if (nla_line[RDMA_NLDEV_ATTR_RES_PID]) { -- SPRINT_BUF(b); -- - pid = mnl_attr_get_u32(nla_line[RDMA_NLDEV_ATTR_RES_PID]); - if (!get_task_name(pid, b, sizeof(b))) - comm = b; -diff --git a/rdma/res-pd.c b/rdma/res-pd.c -index 40a3f9bd..8b9f7aa6 100644 ---- a/rdma/res-pd.c -+++ b/rdma/res-pd.c -@@ -16,6 +16,7 @@ static int res_pd_line(struct rd *rd, const char *name, int idx, - uint32_t pid = 0; - uint32_t pdn = 0; - uint64_t users; -+ SPRINT_BUF(b); - - if (!nla_line[RDMA_NLDEV_ATTR_RES_USECNT]) - return MNL_CB_ERROR; -@@ -34,8 +35,6 @@ static int res_pd_line(struct rd *rd, const char *name, int idx, - nla_line[RDMA_NLDEV_ATTR_RES_UNSAFE_GLOBAL_RKEY]); - - if (nla_line[RDMA_NLDEV_ATTR_RES_PID]) { -- SPRINT_BUF(b); -- - pid = mnl_attr_get_u32(nla_line[RDMA_NLDEV_ATTR_RES_PID]); - if (!get_task_name(pid, b, sizeof(b))) - comm = b; -diff --git a/rdma/res-qp.c b/rdma/res-qp.c -index 145292aa..65ff54ab 100644 ---- a/rdma/res-qp.c -+++ b/rdma/res-qp.c -@@ -84,6 +84,7 @@ static int res_qp_line(struct rd *rd, const char *name, int idx, - uint32_t port = 0, pid = 0; - uint32_t pdn = 0; - char *comm = NULL; -+ SPRINT_BUF(b); - - if (!nla_line[RDMA_NLDEV_ATTR_RES_LQPN] || - !nla_line[RDMA_NLDEV_ATTR_RES_SQ_PSN] || -@@ -144,8 +145,6 @@ static int res_qp_line(struct rd *rd, const char *name, int idx, - goto out; - - if (nla_line[RDMA_NLDEV_ATTR_RES_PID]) { -- SPRINT_BUF(b); -- - pid = mnl_attr_get_u32(nla_line[RDMA_NLDEV_ATTR_RES_PID]); - if (!get_task_name(pid, b, sizeof(b))) - comm = b; -diff --git a/rdma/res-srq.c b/rdma/res-srq.c -index 1d35900a..8ab2538a 100644 ---- a/rdma/res-srq.c -+++ b/rdma/res-srq.c -@@ -183,13 +183,12 @@ static int res_srq_line(struct rd *rd, const char *name, int idx, - char qp_str[MAX_QP_STR_LEN] = {}; - char *comm = NULL; - uint8_t type = 0; -+ SPRINT_BUF(b); - - if (!nla_line[RDMA_NLDEV_ATTR_RES_SRQN]) - return MNL_CB_ERROR; - - if (nla_line[RDMA_NLDEV_ATTR_RES_PID]) { -- SPRINT_BUF(b); -- - pid = mnl_attr_get_u32(nla_line[RDMA_NLDEV_ATTR_RES_PID]); - if (!get_task_name(pid, b, sizeof(b))) - comm = b; -diff --git a/rdma/stat.c b/rdma/stat.c -index 46ed1765..bf78f7cc 100644 ---- a/rdma/stat.c -+++ b/rdma/stat.c -@@ -222,6 +222,7 @@ static int res_counter_line(struct rd *rd, const char *name, int index, - struct nlattr *hwc_table, *qp_table; - struct nlattr *nla_entry; - const char *comm = NULL; -+ SPRINT_BUF(b); - bool isfirst; - int err; - -@@ -247,8 +248,6 @@ static int res_counter_line(struct rd *rd, const char *name, int index, - return MNL_CB_OK; - - if (nla_line[RDMA_NLDEV_ATTR_RES_PID]) { -- SPRINT_BUF(b); -- - pid = mnl_attr_get_u32(nla_line[RDMA_NLDEV_ATTR_RES_PID]); - if (!get_task_name(pid, b, sizeof(b))) - comm = b; --- -2.25.1 - diff --git a/backport-rdma-Update-uapi-headers.patch b/backport-rdma-Update-uapi-headers.patch deleted file mode 100644 index 831d9f40b942df7eea967950ff0fea45e29378e0..0000000000000000000000000000000000000000 --- a/backport-rdma-Update-uapi-headers.patch +++ /dev/null @@ -1,32 +0,0 @@ -From cd4315de422ebeb2d9844ddc71ca5a431abc2c2f Mon Sep 17 00:00:00 2001 -From: Junxian Huang -Date: Tue, 10 Oct 2023 15:55:25 +0800 -Subject: [PATCH] rdma: Update uapi headers - -Update rdma_netlink.h file upto kernel commit aebf8145e11a -("RDMA/core: Add support to dump SRQ resource in RAW format") - -Signed-off-by: wenglianfa -Signed-off-by: Junxian Huang -Reviewed-by: Leon Romanovsky -Signed-off-by: David Ahern ---- - rdma/include/uapi/rdma/rdma_netlink.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/rdma/include/uapi/rdma/rdma_netlink.h b/rdma/include/uapi/rdma/rdma_netlink.h -index 92c528a0..84f775be 100644 ---- a/rdma/include/uapi/rdma/rdma_netlink.h -+++ b/rdma/include/uapi/rdma/rdma_netlink.h -@@ -299,6 +299,8 @@ enum rdma_nldev_command { - - RDMA_NLDEV_CMD_STAT_GET_STATUS, - -+ RDMA_NLDEV_CMD_RES_SRQ_GET_RAW, -+ - RDMA_NLDEV_NUM_OPS - }; - --- -2.25.1 - diff --git a/backport-testsuite-fix-testsuite-build-failure-when-iproute-b.patch b/backport-testsuite-fix-testsuite-build-failure-when-iproute-b.patch deleted file mode 100644 index adfd356ecf766383992a2e69da5b18dd72c24b2c..0000000000000000000000000000000000000000 --- a/backport-testsuite-fix-testsuite-build-failure-when-iproute-b.patch +++ /dev/null @@ -1,38 +0,0 @@ -From c0a06885b944e1f14440f601a0b5266233814d54 Mon Sep 17 00:00:00 2001 -From: gaoxingwang -Date: Fri, 10 Feb 2023 16:45:31 +0800 -Subject: [PATCH] testsuite: fix testsuite build failure when iproute build - without libcap-devel - -iproute allows to build without libcap.The testsuite will fail to -compile when libcap dose not exists.It was required in 6d68d7f85d. - -Fixes: 6d68d7f85d ("testsuite: fix build failure") -Signed-off-by: gaoxingwang -Signed-off-by: Stephen Hemminger ---- - testsuite/tools/Makefile | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/testsuite/tools/Makefile b/testsuite/tools/Makefile -index e0162ccc..0356ddae 100644 ---- a/testsuite/tools/Makefile -+++ b/testsuite/tools/Makefile -@@ -1,9 +1,13 @@ - # SPDX-License-Identifier: GPL-2.0 - CFLAGS= -+LDLIBS= - include ../../config.mk -+ifeq ($(HAVE_CAP),y) -+LDLIBS+= -lcap -+endif - - generate_nlmsg: generate_nlmsg.c ../../lib/libnetlink.a ../../lib/libutil.a -- $(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -I../../include -I../../include/uapi -include../../include/uapi/linux/netlink.h -o $@ $^ -lmnl -lcap -+ $(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -I../../include -I../../include/uapi -include../../include/uapi/linux/netlink.h -o $@ $^ -lmnl $(LDLIBS) - - clean: - rm -f generate_nlmsg --- -2.27.0 - diff --git a/iproute.spec b/iproute.spec index 6ae2f222f9ee91215f6a5a04cae14c57606903ae..d9a652fa8c49549db114a3a482823e409d386dac 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,8 +1,8 @@ #needsrootforbuild Name: iproute -Version: 6.6.0 +Version: 6.8.0 Epoch: 1 -Release: 2 +Release: 1 Summary: Linux network configuration utilities License: GPLv2+ and Public Domain URL: https://kernel.org/pub/linux/utils/net/iproute2/ @@ -11,10 +11,6 @@ Source0: https://mirrors.edge.kernel.org/pub/linux/utils/net/iproute2/iproute2-% Patch1: bugfix-iproute2-3.10.0-fix-maddr-show.patch Patch2: bugfix-iproute2-change-proc-to-ipnetnsproc-which-is-private.patch -patch6000: backport-rdma-Update-uapi-headers.patch -patch6001: backport-rdma-Add-support-to-dump-SRQ-resource-in-raw-format.patch -patch6002: backport-rdma-Fix-the-error-of-accessing-string-variable-outs.patch - Patch9000: feature-iproute-add-support-for-ipvlan-l2e-mode.patch Patch9001: bugfix-iproute2-cancel-some-test-cases.patch @@ -49,7 +45,7 @@ Header files for iprout2 %build export LIBDIR='%{_libdir}' export IPT_LIB_DIR='/%{_lib}/xtables' -%configure +%configure --color auto %make_build %check @@ -64,7 +60,7 @@ export SBINDIR='%{_sbindir}' export LIBDIR='%{_libdir}' export DOCDIR='%{_docdir}' -%make_install +%make_install install -m 0755 -d %{buildroot}%{_includedir} install -m 0644 include/libnetlink.h %{buildroot}%{_includedir}/libnetlink.h @@ -74,7 +70,7 @@ install -m 0644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %defattr(-,root,root) %license COPYING %doc README -%attr(644,root,root) %config(noreplace) %{_libdir}/iproute2/* +%attr(644,root,root) %config(noreplace) %{_datadir}/iproute2/* %{_sbindir}/* %{_libdir}/tc/* %{_datadir}/bash-completion/completions/* @@ -91,6 +87,12 @@ install -m 0644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_mandir}/* %changelog +* Tue Apr 16 2024 liweigang - 1:6.8.0-1 +- Type: requirement +- ID: NA +- SUG: NA +- DESC: update to 6.8.0 + * Mon Feb 26 2024 Ran Zhou - 1:6.6.0-2 - Type:feature - ID:NA diff --git a/iproute2-6.6.0.tar.xz b/iproute2-6.6.0.tar.xz deleted file mode 100644 index adafc4dbbcd6f0438a422345bdf1a97e70d31b5f..0000000000000000000000000000000000000000 Binary files a/iproute2-6.6.0.tar.xz and /dev/null differ diff --git a/iproute2-6.8.0.tar.xz b/iproute2-6.8.0.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..17da9bc1d8e0aceed481da5deb808092cab4c6dd Binary files /dev/null and b/iproute2-6.8.0.tar.xz differ