OSDN Git Service

devlink: introduce framework for selftests
authorVikas Gupta <vikas.gupta@broadcom.com>
Wed, 27 Jul 2022 16:57:20 +0000 (22:27 +0530)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Jul 2022 04:56:53 +0000 (21:56 -0700)
commit08f588fa301bef264576fc915da6bf31b585a824
tree50d145246f44d78fb22ac7816834bd4c867e4e51
parent68be7b82e77f5ddf4a216f49fd965e74caf3f2e8
devlink: introduce framework for selftests

Add a framework for running selftests.
Framework exposes devlink commands and test suite(s) to the user
to execute and query the supported tests by the driver.

Below are new entries in devlink_nl_ops
devlink_nl_cmd_selftests_show_doit/dumpit: To query the supported
selftests by the drivers.
devlink_nl_cmd_selftests_run: To execute selftests. Users can
provide a test mask for executing group tests or standalone tests.

Documentation/networking/devlink/ path is already part of MAINTAINERS &
the new files come under this path. Hence no update needed to the
MAINTAINERS

Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/networking/devlink/devlink-selftests.rst [new file with mode: 0644]
include/net/devlink.h
include/uapi/linux/devlink.h
net/core/devlink.c