* [PATCH net-next] docs: netdev: refine netdevsim testing guidance
@ 2026-03-04 15:16 Jakub Kicinski
2026-03-06 14:39 ` Simon Horman
2026-03-06 21:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2026-03-04 15:16 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, Jakub Kicinski,
corbet, skhan, workflows, linux-doc
The library to create tests for both NIC HW and netdevsim has existed
for almost a year. netdevsim-only tests we get increasingly feel like
a waste, we should try to write tests that work both on netdevsim and
real HW. Refine the guidance accordingly.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: corbet@lwn.net
CC: skhan@linuxfoundation.org
CC: workflows@vger.kernel.org
CC: linux-doc@vger.kernel.org
---
Documentation/process/maintainer-netdev.rst | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/Documentation/process/maintainer-netdev.rst b/Documentation/process/maintainer-netdev.rst
index 6bce4507d5d3..3aa13bc2405d 100644
--- a/Documentation/process/maintainer-netdev.rst
+++ b/Documentation/process/maintainer-netdev.rst
@@ -479,8 +479,14 @@ netdevsim
``netdevsim`` is a test driver which can be used to exercise driver
configuration APIs without requiring capable hardware.
-Mock-ups and tests based on ``netdevsim`` are strongly encouraged when
-adding new APIs, but ``netdevsim`` in itself is **not** considered
+Mock-ups and tests based on ``netdevsim`` are encouraged when
+adding new APIs with complex logic in the stack. The tests should
+be written so that they can run both against ``netdevsim`` and a real
+device (see ``tools/testing/selftests/drivers/net/README.rst``).
+``netdevsim``-only tests should focus on testing corner cases
+and failure paths in the core which are hard to exercise with a real driver.
+
+``netdevsim`` in itself is **not** considered
a use case/user. You must also implement the new APIs in a real driver.
We give no guarantees that ``netdevsim`` won't change in the future
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] docs: netdev: refine netdevsim testing guidance
2026-03-04 15:16 [PATCH net-next] docs: netdev: refine netdevsim testing guidance Jakub Kicinski
@ 2026-03-06 14:39 ` Simon Horman
2026-03-06 21:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2026-03-06 14:39 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, corbet, skhan,
workflows, linux-doc
On Wed, Mar 04, 2026 at 07:16:46AM -0800, Jakub Kicinski wrote:
> The library to create tests for both NIC HW and netdevsim has existed
> for almost a year. netdevsim-only tests we get increasingly feel like
> a waste, we should try to write tests that work both on netdevsim and
> real HW. Refine the guidance accordingly.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: corbet@lwn.net
> CC: skhan@linuxfoundation.org
> CC: workflows@vger.kernel.org
> CC: linux-doc@vger.kernel.org
Reviewed-by: Simon Horman <horms@kernel.org>
> ---
> Documentation/process/maintainer-netdev.rst | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/process/maintainer-netdev.rst b/Documentation/process/maintainer-netdev.rst
> index 6bce4507d5d3..3aa13bc2405d 100644
> --- a/Documentation/process/maintainer-netdev.rst
> +++ b/Documentation/process/maintainer-netdev.rst
> @@ -479,8 +479,14 @@ netdevsim
>
> ``netdevsim`` is a test driver which can be used to exercise driver
> configuration APIs without requiring capable hardware.
> -Mock-ups and tests based on ``netdevsim`` are strongly encouraged when
> -adding new APIs, but ``netdevsim`` in itself is **not** considered
> +Mock-ups and tests based on ``netdevsim`` are encouraged when
> +adding new APIs with complex logic in the stack. The tests should
> +be written so that they can run both against ``netdevsim`` and a real
> +device (see ``tools/testing/selftests/drivers/net/README.rst``).
> +``netdevsim``-only tests should focus on testing corner cases
> +and failure paths in the core which are hard to exercise with a real driver.
> +
> +``netdevsim`` in itself is **not** considered
> a use case/user. You must also implement the new APIs in a real driver.
I don't know if it's desirable, but the line wrapping could
also be updated.
>
> We give no guarantees that ``netdevsim`` won't change in the future
> --
> 2.53.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] docs: netdev: refine netdevsim testing guidance
2026-03-04 15:16 [PATCH net-next] docs: netdev: refine netdevsim testing guidance Jakub Kicinski
2026-03-06 14:39 ` Simon Horman
@ 2026-03-06 21:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-06 21:20 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, corbet,
skhan, workflows, linux-doc
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 4 Mar 2026 07:16:46 -0800 you wrote:
> The library to create tests for both NIC HW and netdevsim has existed
> for almost a year. netdevsim-only tests we get increasingly feel like
> a waste, we should try to write tests that work both on netdevsim and
> real HW. Refine the guidance accordingly.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
>
> [...]
Here is the summary with links:
- [net-next] docs: netdev: refine netdevsim testing guidance
https://git.kernel.org/netdev/net-next/c/8e235bc43326
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-06 21:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 15:16 [PATCH net-next] docs: netdev: refine netdevsim testing guidance Jakub Kicinski
2026-03-06 14:39 ` Simon Horman
2026-03-06 21:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox