selftests: pp-bench: remove unneeded linux/version.h
Subsystems (3)
PATCH 1/2 selftests: pp-bench: remove unneeded linux/version.h
linux/version.h was used by the out-of-tree version, but not needed in the upstream one anymore.
While I'm at it, sort the includes.
--- .../selftests/net/bench/page_pool/bench_page_pool_simple.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
tools/testing/selftests/net/bench/page_pool/bench_page_pool_simple.c +2 -5
@@ -5,15 +5,12 @@*/ #define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/interrupt.h> +#include <linux/limits.h> #include <linux/module.h> #include <linux/mutex.h> - -#include <linux/version.h> #include <net/page_pool/helpers.h> -#include <linux/interrupt.h> -#include <linux/limits.h> -#include "time_bench.h" static int verbose =1 ;
base-commit: 8efa26fcbf8a7f783fd1ce7dd2a409e9b7758df0
Signature · 1 line
2.50.0.727.gbf7dc18ff4-goog
PATCH 2/2 selftests: pp-bench: remove page_pool_put_page wrapper
Minor cleanup: remove the pointless looking _ wrapper around page_pool_put_page, and just do the call directly.
--- .../net/bench/page_pool/bench_page_pool_simple.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
tools/testing/selftests/net/bench/page_pool/bench_page_pool_simple.c +3 -9
@@ -16,12 +16,6 @@static int verbose =1 ;#define MY_POOL_SIZE 1024 -static void _page_pool_put_page (struct page_pool *pool,struct page *page, -bool allow_direct) -{ -page_pool_put_page (pool, page,-1 , allow_direct); -} -/* Makes tests selectable. Useful for perf-record to analyze a single test. * Hint: Bash shells support writing binary number like: $((2#101010) *
@@ -121,7 +115,7 @@ static void pp_fill_ptr_ring(struct page_pool *pp, int elems)for (i =0 ; i < elems; i++) array[i] =page_pool_alloc_pages (pp, gfp_mask);for (i =0 ; i < elems; i++) -_page_pool_put_page (pp, array[i], false); +page_pool_put_page (pp, array[i],-1 , false);kfree (array); }
@@ -180,14 +174,14 @@ static int time_bench_page_pool(struct time_bench_record *rec, void *data, }else if (type == type_ptr_ring) {/* Normal return path */ -_page_pool_put_page (pp, page, false); +page_pool_put_page (pp, page,-1 , false); }else if (type == type_page_allocator) {/* Test if not pages are recycled, but instead * returned back into systems page allocator */ get_page (page);/* cause no-recycling */ -_page_pool_put_page (pp, page, false); +page_pool_put_page (pp, page,-1 , false);put_page (page); }else {BUILD_BUG ();
Signature · 1 line
2.50.0.727.gbf7dc18ff4-goog
Re: [PATCH net-next v1 2/2] selftests: pp-bench: remove page_pool_put_page wrapper
Quoted 4 lines · Mina Almasry
Minor cleanup: remove the pointless looking _ wrapper around
page_pool_put_page, and just do the call directly.Signed-off-by Mina Almasry <[email protected]>
Re: [PATCH net-next v1 2/2] selftests: pp-bench: remove page_pool_put_page wrapper
In reply to Mina AlmasryQuoted 4 lines · Mina Almasry
Minor cleanup: remove the pointless looking _ wrapper around
page_pool_put_page, and just do the call directly.Signed-off-by Mina Almasry <[email protected]>
Re: [PATCH net-next v1 2/2] selftests: pp-bench: remove page_pool_put_page wrapper
In reply to Mina AlmasryQuoted 5 lines · Mina Almasry
Minor cleanup: remove the pointless looking _ wrapper around
page_pool_put_page, and just do the call directly.Signed-off-by Mina Almasry <[email protected]>
Quoted 50 lines
--- .../net/bench/page_pool/bench_page_pool_simple.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)tools/testing/selftests/net/bench/page_pool/bench_page_pool_simple.c +3
-10@@ -16,12 +16,6 @@static int verbose =1 ;#define MY_POOL_SIZE 1024 -static void _page_pool_put_page (struct page_pool *pool,struct page *page, -bool allow_direct) -{ -page_pool_put_page (pool, page,-1 , allow_direct); -} -/* Makes tests selectable. Useful for perf-record to analyze a single test. * Hint: Bash shells support writing binary number like: $((2#101010) * @@ -121,7 +115,7 @@ static void pp_fill_ptr_ring(struct page_pool *pp, int elems)for (i =0 ; i < elems; i++) array[i] =page_pool_alloc_pages (pp, gfp_mask);for (i =0 ; i < elems; i++) -_page_pool_put_page (pp, array[i], false); +page_pool_put_page (pp, array[i],-1 , false);kfree (array); }@@ -180,14 +174,14 @@ static int time_bench_page_pool(struct time_bench_record *rec, void *data, }else if (type == type_ptr_ring) {/* Normal return path */ -_page_pool_put_page (pp, page, false); +page_pool_put_page (pp, page,-1 , false); }else if (type == type_page_allocator) {/* Test if not pages are recycled, but instead * returned back into systems page allocator */ get_page (page);/* cause no-recycling */ -_page_pool_put_page (pp, page, false); +page_pool_put_page (pp, page,-1 , false);put_page (page); }else {BUILD_BUG (); --2.50.0.727.gbf7dc18ff4-goog
Re: [PATCH net-next v1 2/2] selftests: pp-bench: remove page_pool_put_page wrapper
In reply to Mina AlmasryQuoted 39 lines · Mina Almasry
Minor cleanup: remove the pointless looking _ wrapper around
page_pool_put_page, and just do the call directly.Signed-off-by Mina Almasry <[email protected]>--- .../net/bench/page_pool/bench_page_pool_simple.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)tools/testing/selftests/net/bench/page_pool/bench_page_pool_simple.c +1
-8@@ -16,12 +16,6 @@static int verbose =1 ;#define MY_POOL_SIZE 1024 -static void _page_pool_put_page (struct page_pool *pool,struct page *page, -bool allow_direct) -{ -page_pool_put_page (pool, page,-1 , allow_direct); -} -/* Makes tests selectable. Useful for perf-record to analyze a single test. * Hint: Bash shells support writing binary number like: $((2#101010) * @@ -121,7 +115,7 @@ static void pp_fill_ptr_ring(struct page_pool *pp, int elems)for (i =0 ; i < elems; i++) array[i] =page_pool_alloc_pages (pp, gfp_mask);for (i =0 ; i < elems; i++) -_page_pool_put_page (pp, array[i], false); +page_pool_put_page (pp, array[i],-1 , false);kfree (array); }@@ -180,14 +174,14 @@ static int time_bench_page_pool(struct time_bench_record *rec, void *data, }else if (type == type_ptr_ring) {/* Normal return path */ -_page_pool_put_page (pp, page, false);
tools/testing/selftests/net/bench/page_pool/bench_page_pool_simple.c static int time_bench_page_pool(struct time_bench_record *rec, void *data, · line 185
Quoted 10 lines
tools/testing/selftests/net/bench/page_pool/bench_page_pool_simple.c +2
-1+page_pool_put_page (pp, page,-1 , false); }else if (type == type_page_allocator) {/* Test if not pages are recycled, but instead * returned back into systems page allocator */ get_page (page);/* cause no-recycling */ -_page_pool_put_page (pp, page, false); +page_pool_put_page (pp, page,-1 , false);put_page (page);
The get_page() + put_page() trick is a fairly ugly workaround that I added when Jakub removed page_pool_release_page() in commit 535b9c61bdef ("net: page_pool: hide page_pool_release_page()").
These extra refcnt increments will make the test slower, but if we are just aware of this, then we can still compare incremental changes.
Quoted 2 lines
tools/testing/selftests/net/bench/page_pool/bench_page_pool_simple.c +0
-0}else {BUILD_BUG ();
Quoted 8 lines · Mina Almasry
linux/version.hwas used by the out-of-tree version, but not needed in the upstream one anymore.While I'm at it, sort the includes.
Reported-by kernel test robot <[email protected]>Signed-off-by Mina Almasry <[email protected]>
Quoted 8 lines · Mina Almasry
linux/version.hwas used by the out-of-tree version, but not needed in the upstream one anymore.While I'm at it, sort the includes.
Reported-by kernel test robot <[email protected]>Signed-off-by Mina Almasry <[email protected]>
Quoted 4 lines · Mina Almasry
linux/version.hwas used by the out-of-tree version, but not needed in the upstream one anymore.
Quoted 8 lines
While I'm at it, sort the includes.
Reported-by kernel test robot <[email protected]>Signed-off-by Mina Almasry <[email protected]>--- .../selftests/net/bench/page_pool/bench_page_pool_simple.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
Quoted 28 lines
tools/testing/selftests/net/bench/page_pool/bench_page_pool_simple.c +2
-5@@ -5,15 +5,12 @@*/ #define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/interrupt.h> +#include <linux/limits.h> #include <linux/module.h> #include <linux/mutex.h> - -#include <linux/version.h> #include <net/page_pool/helpers.h> -#include <linux/interrupt.h> -#include <linux/limits.h> -#include "time_bench.h" static int verbose =1 ;base-commit:
8efa26fcbf8a7f783fd1ce7dd2a409e9b7758df0--
2.50.0.727.gbf7dc18ff4-goog
Quoted 11 lines · Mina Almasry
linux/version.hwas used by the out-of-tree version, but not needed in the upstream one anymore.While I'm at it, sort the includes.
Reported-by kernel test robot <[email protected]>Signed-off-by Mina Almasry <[email protected]>--- .../selftests/net/bench/page_pool/bench_page_pool_simple.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Fri, 27 Jun 2025 20:04:51 +0000 you wrote:
linux/version.hwas used by the out-of-tree version, but not needed in the upstream one anymore.While I'm at it, sort the includes.
Reported-by kernel test robot <[email protected]>Signed-off-by Mina Almasry <[email protected]>[...]
Here is the summary with links:
- [net-next,v1,1/2] selftests: pp-bench: remove unneeded linux/version.h
https://git.kernel.org/netdev/net-next/c/8d3e0982f7c2 - [net-next,v1,2/2] selftests: pp-bench: remove page_pool_put_page wrapper https://git.kernel.org/netdev/net-next/c/be75d319d1b3
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html