Subject: Re: [Draft PATCH net-next 1/3] Documentation: netlink: add a YAML spec for team

From: Hangbin Liu <[email-masked]>
Date: Thu, 14 Dec 2023 11:44:10 +0800

On Wed, Dec 13, 2023 at 04:36:32PM +0100, Jiri Pirko wrote:
> >+operations:
> >+  list:
> >+    -
> >+      name: noop
> >+      doc: No operation
> >+      value: 0
> >+      attribute-set: team
> >+      dont-validate: [ strict, dump ]
> 
> What is this good for?
> 
> 
> >+
> >+      do:
> >+        # Actually it only reply the team netlink family
> >+        reply:
> >+          attributes:
> >+            - team-ifindex
> >+
> >+    -
> >+      name: options-set
> >+      doc: Set team options
> >+      attribute-set: team
> >+      dont-validate: [ strict, dump ]
> 
> There is no dump op. Same below.
> 
Hi Jiri,

I just copied this from the current team.c code. e.g.

static const struct genl_small_ops team_nl_ops[] = {
        {
                .cmd = TEAM_CMD_NOOP,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
                .doit = team_nl_cmd_noop,
        },
        {
                .cmd = TEAM_CMD_OPTIONS_SET,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
                .doit = team_nl_cmd_options_set,
                .flags = GENL_ADMIN_PERM,
        },

Do you want to remove all the GENL_DONT_VALIDATE_DUMP flags from team_nl_ops?

Thanks
Hangbin