On Thu, Jul 07, 2022 at 06:20:22PM -0700, Jakub Kicinski wrote: > On Thu, 7 Jul 2022 23:59:48 +0530 Vikas Gupta wrote: > > static const struct genl_small_ops devlink_nl_ops[] = { > > @@ -9361,6 +9493,18 @@ static const struct genl_small_ops devlink_nl_ops[] = { > > .doit = devlink_nl_cmd_trap_policer_set_doit, > > .flags = GENL_ADMIN_PERM, > > }, > > + { > > + .cmd = DEVLINK_CMD_SELFTESTS_SHOW, > > + .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, > > I think we can validate strict for new commands, so no validation flags > needed. > > > + .doit = devlink_nl_cmd_selftests_show, > > What about dump? Listing all tests on all devices? > > > + .flags = GENL_ADMIN_PERM, Related to Jakub's question, is there a reason that the show command requires 'GENL_ADMIN_PERM' ? > > + }, > > + { > > + .cmd = DEVLINK_CMD_SELFTESTS_RUN, > > + .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, > > + .doit = devlink_nl_cmd_selftests_run, > > + .flags = GENL_ADMIN_PERM, > > + }, > > }; > > > > static struct genl_family devlink_nl_family __ro_after_init = { >