Skip to content

add framework for selftests in devlink

Vikas Gupta linux-doc lkml netdev 9 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest2 patches 5 repliesApplied 2/2
  2. v82 patches 4 repliesSuperseded
  3. v72 patches 2 repliesSuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v62 patches7 repliesSuperseded
v52 patches2 repliesSuperseded
v43 patches7 repliesSuperseded
v33 patches2 repliesSuperseded
v23 patches10 repliesSuperseded
v13 patches1 replySuperseded

Changes in v9 from the cover letter

Only SOB line fixed in 2/2.

Patches in v9 All 2 applied

#Subject and filesSizeRepliesApplied
1/2devlink: introduce framework for selftestsDocumentation/networking/devlink/devlink-selftests.rst include/net/devlink.h include/uapi/linux/devlink.h +1 more+304 -02 repliesApplied
2/2bnxt_en: implement callbacks for devlink selftestsdrivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.h+85 -122 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAndy GospodarekJiri Pirko
1/2R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v9 thread

Cover letter [PATCH net-next v9 0/2] add framework for selftests in devlink

Hi,
This patchset adds support for selftests in the devlink framework. It adds a callback .selftests_check and .selftests_run in devlink_ops. User can add test(s) suite which is subsequently passed to the driver and driver can opt for running particular tests based on its capabilities.

Patchset adds a flash based test for the bnxt_en driver.

Suggested commands at user level would be as below:

changes from:
v8->v9:
Only SOB line fixed in 2/2.

v7->v8:
Some nits requested by [email protected] in v7.

v6->v7:
1) Changed the macros/enums name as suggested by [email protected].
2) Rebase with latest net-next. Dumpit impacted due to recent patches
by [email protected].
net: devlink: make sure that devlink_try_get() works with valid pointer during xarray iteration
net: devlink: move net check into devlinks_xa_for_each_registered_get()

v5->v6:
Addressed change in .rst file only suggested by [email protected] in patch v5.

v4->v5:
Addressed the changes requested by [email protected] in patch v4.

v3->v4:
Addressed the changes requested by [email protected] in patch v3.

v2->v3:
1)
After discussions with [email protected], passing a testmask from user to kernel is removed and a flag based arguments are adopted. This way we can have more than 32/64 selftests defined in the kernel.
Below is the format from user to kernel and vice-versa.

Kernel to user for show command . Users can know what all tests are supported by the driver. A return from kernel to user if driver supports TEST1, TEST4, and TEST7.

	______
	|NEST |
	|_____ |TEST1|TEST4|TEST7|...


    User to kernel to execute test: If user wants to execute test4, test8,
	test1...
	______
	|NEST |
	|_____ |TEST4|TEST8|TEST1|...

	After executing the tests kernel return to user.
	|NEST |
	|_____ | NEST|       |NEST|       |NEST|
	        TEST4,RES4   TEST8,RES8   TEST1, RES1
    
    2) Added dumpit in devlink for list/show command.

v1->v2:
Addressed the changes requested by [email protected] in patch v1. Fixed the style issues.

Thanks,
Vikas

*** BLURB HERE ***

Vikas Gupta (1):
devlink: introduce framework for selftests

vikas (1):
bnxt_en: implement callbacks for devlink selftests

 .../networking/devlink/devlink-selftests.rst  |  38 +++
 .../net/ethernet/broadcom/bnxt/bnxt_devlink.c |  61 +++++
 .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  24 +-
 .../net/ethernet/broadcom/bnxt/bnxt_ethtool.h |  12 +
 include/net/devlink.h                         |  21 ++
 include/uapi/linux/devlink.h                  |  29 +++
 net/core/devlink.c                            | 216 ++++++++++++++++++
 7 files changed, 389 insertions(+), 12 deletions(-)
 create mode 100644 Documentation/networking/devlink/devlink-selftests.rst
Signature · 1 line
2.31.1