From cf6fe7cb51e23e99db070af56b4a75bc041b9751 Mon Sep 17 00:00:00 2001 From: chenjiji09 Date: Thu, 23 Mar 2023 16:48:08 +0800 Subject: [PATCH] Fix a m_buf pool was not freed bug for test and support CPPC cpufreq for l3fwd-power. Patchs are as follow: - test/mbuf: fix mbuf reset test - examples/l3fwd-power: support CPPC cpufreq --- 0255-test-mbuf-fix-mbuf-reset-test.patch | 35 ++++++++++++ ...les-l3fwd-power-support-CPPC-cpufreq.patch | 53 +++++++++++++++++++ dpdk.spec | 10 +++- 3 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 0255-test-mbuf-fix-mbuf-reset-test.patch create mode 100644 0256-examples-l3fwd-power-support-CPPC-cpufreq.patch diff --git a/0255-test-mbuf-fix-mbuf-reset-test.patch b/0255-test-mbuf-fix-mbuf-reset-test.patch new file mode 100644 index 0000000..b66b2a3 --- /dev/null +++ b/0255-test-mbuf-fix-mbuf-reset-test.patch @@ -0,0 +1,35 @@ +From b6f800b2897f8e2008d0897ceaa491a357eab1cf Mon Sep 17 00:00:00 2001 +From: Jie Hai +Date: Tue, 31 Jan 2023 10:48:51 +0800 +Subject: test/mbuf: fix mbuf reset test + +[ upstream commit bf47fb83a61a4bc6bf45e1ec6e3ddd239a856190 ] + +Retest "mbuf_autotest" will fail because the mbuf pool was +not freed after previous test successful done. +This patch fixes it. + +Fixes: efc6f9104c80 ("mbuf: fix reset on mbuf free") +Cc: stable@dpdk.org + +Signed-off-by: Jie Hai +Reviewed-by: David Marchand +--- + app/test/test_mbuf.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c +index f54d1d7c00..cd9f8fd8cf 100644 +--- a/app/test/test_mbuf.c ++++ b/app/test/test_mbuf.c +@@ -2769,6 +2769,7 @@ test_nb_segs_and_next_reset(void) + m2->nb_segs != 1 || m2->next != NULL) + GOTO_FAIL("nb_segs or next was not reset properly"); + ++ rte_mempool_free(pool); + return 0; + + fail: +-- +2.23.0 + diff --git a/0256-examples-l3fwd-power-support-CPPC-cpufreq.patch b/0256-examples-l3fwd-power-support-CPPC-cpufreq.patch new file mode 100644 index 0000000..8100126 --- /dev/null +++ b/0256-examples-l3fwd-power-support-CPPC-cpufreq.patch @@ -0,0 +1,53 @@ +From 9f45602b8df4c7a0eca4228ab94de824b1c5337b Mon Sep 17 00:00:00 2001 +From: Jie Hai +Date: Tue, 31 Jan 2023 10:58:52 +0800 +Subject: examples/l3fwd-power: support CPPC cpufreq + +[ upstream commit bc6fe48468767df2b6a31c9de06796164981cbaf ] + +Currently the l3fwd-power only supports ACPI cpufreq and Pstate +cpufreq, This patch adds CPPC cpufreq. + +Signed-off-by: Jie Hai +Acked-by: David Hunt +Acked-by: Dongdong Liu +--- + examples/l3fwd-power/main.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c +index 20e5b59af9..a2eb35d6e2 100644 +--- a/examples/l3fwd-power/main.c ++++ b/examples/l3fwd-power/main.c +@@ -2290,9 +2290,10 @@ init_power_library(void) + /* we're not supporting the VM channel mode */ + env = rte_power_get_env(); + if (env != PM_ENV_ACPI_CPUFREQ && +- env != PM_ENV_PSTATE_CPUFREQ) { ++ env != PM_ENV_PSTATE_CPUFREQ && ++ env != PM_ENV_CPPC_CPUFREQ) { + RTE_LOG(ERR, POWER, +- "Only ACPI and PSTATE mode are supported\n"); ++ "Only ACPI, PSTATE and CPPC mode are supported\n"); + return -1; + } + } +@@ -2456,12 +2457,14 @@ autodetect_mode(void) + /* + * Empty poll and telemetry modes have to be specifically requested to + * be enabled, but we can auto-detect between interrupt mode with or +- * without frequency scaling. Both ACPI and pstate can be used. ++ * without frequency scaling. Any of ACPI, pstate and CPPC can be used. + */ + if (rte_power_check_env_supported(PM_ENV_ACPI_CPUFREQ)) + return APP_MODE_LEGACY; + if (rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ)) + return APP_MODE_LEGACY; ++ if (rte_power_check_env_supported(PM_ENV_CPPC_CPUFREQ)) ++ return APP_MODE_LEGACY; + + RTE_LOG(NOTICE, L3FWD_POWER, "Frequency scaling not supported, selecting interrupt-only mode\n"); + +-- +2.23.0 + diff --git a/dpdk.spec b/dpdk.spec index 7463b57..09d7e5f 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -1,6 +1,6 @@ Name: dpdk Version: 21.11 -Release: 35 +Release: 36 Packager: packaging@6wind.com URL: http://dpdk.org %global source_version 21.11 @@ -272,6 +272,8 @@ Patch9251: 0251-net-hns3-allow-adding-queue-buffer-size-hash-rule.patch Patch9252: 0252-net-hns3-separate-flow-RSS-config-from-RSS-conf.patch Patch9253: 0253-net-hns3-reimplement-hash-flow-function.patch Patch9254: 0254-net-hns3-add-verification-of-RSS-types.patch +Patch9255: 0255-test-mbuf-fix-mbuf-reset-test.patch +Patch9256: 0256-examples-l3fwd-power-support-CPPC-cpufreq.patch Summary: Data Plane Development Kit core Group: System Environment/Libraries @@ -414,6 +416,12 @@ strip -g $RPM_BUILD_ROOT/lib/modules/%{kern_devel_ver}/extra/dpdk/igb_uio.ko /usr/sbin/depmod %changelog +* Thu Mar 23 2023 chenjiji - 21.11-36 + Fix a m_buf pool was not freed bugs for test and support + CPPC cpufreq for l3fwd-power. Patchs are as follow: + - test/mbuf: fix mbuf reset test + - examples/l3fwd-power: support CPPC cpufreq + * Wed Mar 15 2023 chenjiji - 21.11-35 Fix some RSS bugs and reimplement hash flow function for hns3: - fix some RSS bugs and optimize RSS codes for hns3 -- Gitee