[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1f5f60cb-c4a5-44b9-896f-1c1b8ec6a382@openvpn.net>
Date: Wed, 25 Sep 2024 13:36:53 +0200
From: Antonio Quartulli <antonio@...nvpn.net>
To: Donald Hunter <donald.hunter@...il.com>
Cc: netdev@...r.kernel.org, kuba@...nel.org, pabeni@...hat.com,
ryazanov.s.a@...il.com, edumazet@...gle.com, andrew@...n.ch,
sd@...asysnail.net
Subject: Re: [PATCH net-next v7 04/25] ovpn: add basic netlink support
Donald,
On 18/09/2024 12:07, Donald Hunter wrote:
[...]
> nl80211 is maybe not a good example to follow because it predates the
> ynl specs and code generation. The netdev.yaml spec is a good example of
> a modern genetlink spec. It specifies ops for 'dev-add-ntf' and
> 'dev-del-ntf' that both reuse the definition from 'dev-get' with the
> 'notify: dev-get' attribute:
>
> -
> name: dev-get
> doc: Get / dump information about a netdev.
> attribute-set: dev
> do:
> request:
> attributes:
> - ifindex
> reply: &dev-all
> attributes:
> - ifindex
> - xdp-features
> - xdp-zc-max-segs
> - xdp-rx-metadata-features
> - xsk-features
> dump:
> reply: *dev-all
> -
> name: dev-add-ntf
> doc: Notification about device appearing.
> notify: dev-get
> mcgrp: mgmt
> -
> name: dev-del-ntf
> doc: Notification about device disappearing.
> notify: dev-get
> mcgrp: mgmt
>
> The notify ops get distinct ids so they should never be confused with
> normal command responses.
I see most (if not all) modules have named ops dev-del/add/get, while in
ovpn I am going with new/del-dev (action and object are inverted).
Do you think it'd make sense to change all the op names to follow the
convention used by the other modules?
Cheers,
--
Antonio Quartulli
OpenVPN Inc.
Powered by blists - more mailing lists