lkml.org 
[lkml]   [2022]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v2 1/3] devlink: introduce framework for selftests
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 = {
>

\
 
 \ /
  Last update: 2022-07-10 11:01    [W:0.490 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site