public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: kuba@kernel.org
Cc: netdev@vger.kernel.org
Subject: ynl - mutiple policies for one nested attr used in multiple cmds
Date: Fri, 4 Aug 2023 19:29:31 +0200	[thread overview]
Message-ID: <ZM01ezEkJw4D27Xl@nanopsycho> (raw)

Hi Kuba.

I need to have one nested attribute but according to what cmd it is used
with, there will be different nested policy.

If I'm looking at the codes correctly, that is not currenly supported,
correct?

If not, why idea how to format this in yaml file?
Pehaps something like:

      -
        name: dump-selector
        type: nest
        nested-attributes: dl-dump-selector

  -
    name: dl-dev-dump-selector
    subset-of: devlink
    attributes:
      -
        name: bus-name
        type: string
      -
        name: dev-name
        type: string

  -
    name: dl-port-dump-selector
    subset-of: devlink
    attributes:
      -
        name: bus-name
        type: string
      -
        name: dev-name
        type: string
      -
        name: port-index
	type: u32

And then:
      dump:
        pre: devlink-nl-start
        post: devlink-nl-done
        request:
          attributes:
            - dump-selector@dl-dev-dump-selector
...
      dump:
        pre: devlink-nl-start
        post: devlink-nl-done
        request:
          attributes:
            - dump-selector@dl-port-dump-selector

Idk, looks a bit odd though to parse the attr strings.

Any idea?

             reply	other threads:[~2023-08-04 17:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-04 17:29 Jiri Pirko [this message]
2023-08-04 19:58 ` ynl - mutiple policies for one nested attr used in multiple cmds Jakub Kicinski
2023-08-05  6:33   ` Jiri Pirko
2023-08-07 17:03     ` Jakub Kicinski
2023-08-07 17:12       ` Jiri Pirko
2023-08-07 17:24         ` Jakub Kicinski
2023-08-08  7:38           ` Jiri Pirko
2023-08-18  8:37   ` Jiri Pirko
2023-08-18 15:55     ` Jakub Kicinski
2023-08-18 18:11       ` Jiri Pirko
2023-08-18 20:24         ` Jakub Kicinski
2023-08-21 11:16           ` Jiri Pirko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZM01ezEkJw4D27Xl@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox