From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, pabeni@redhat.com, davem@davemloft.net,
edumazet@google.com, leon@kernel.org, saeedm@nvidia.com,
moshe@nvidia.com, jesse.brandeburg@intel.com,
anthony.l.nguyen@intel.com, tariqt@nvidia.com, idosch@nvidia.com,
petrm@nvidia.com, simon.horman@corigine.com,
ecree.xilinx@gmail.com, habetsm.xilinx@gmail.com,
michal.wilczynski@intel.com, jacob.e.keller@intel.com
Subject: Re: [patch net-next 05/15] devlink: move port_split/unsplit() ops into devlink_port_ops
Date: Thu, 25 May 2023 08:05:22 +0200 [thread overview]
Message-ID: <ZG76ohK00xF2LHeK@nanopsycho> (raw)
In-Reply-To: <20230524215301.02ae701e@kernel.org>
Thu, May 25, 2023 at 06:53:01AM CEST, kuba@kernel.org wrote:
>On Wed, 24 May 2023 14:18:26 +0200 Jiri Pirko wrote:
>> /**
>> * struct devlink_port_ops - Port operations
>> + * @port_split: Callback used to split the port into multiple ones.
>> + * @port_unsplit: Callback used to unsplit the port group back into
>> + * a single port.
>> */
>> struct devlink_port_ops {
>> + int (*port_split)(struct devlink *devlink, struct devlink_port *port,
>> + unsigned int count, struct netlink_ext_ack *extack);
>> + int (*port_unsplit)(struct devlink *devlink, struct devlink_port *port,
>> + struct netlink_ext_ack *extack);
>> };
>
>Two random take it or leave it comments: (1) since these are port ops
>now do they need the port_* prefix? (2) I've become partial to adding
Yeah, I'd like to leave them, for grepability purposes.
>the kdoc inline in op structs:
>
>/**
> * struct x - it is the X struct
> */
>struct x {
> /** @an_op: its an op */
> int (*an_op)(int arg);
>};
>
>I think it's because every time I look at struct net_device_ops
>a little part of me gives up.
Does this work? I checked the existing layout of devlink_ops and the
internal comments are ignored by kdoc. Actually the whole devlink_ops
struct is omitted in kdoc. See:
$ scripts/kernel-doc include/net/devlink.h
I followed the format we have for the other ops structures in devlink.h
which works with kernel-doc script.
next prev parent reply other threads:[~2023-05-25 6:05 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 12:18 [patch net-next 00/15] devlink: move port ops into separate structure Jiri Pirko
2023-05-24 12:18 ` [patch net-next 01/15] devlink: introduce port ops placeholder Jiri Pirko
2023-05-25 4:48 ` Jakub Kicinski
2023-05-25 6:07 ` Jiri Pirko
2023-05-24 12:18 ` [patch net-next 02/15] ice: register devlink port for PF with ops Jiri Pirko
2023-05-24 17:30 ` Jesse Brandeburg
2023-05-24 12:18 ` [patch net-next 03/15] mlxsw_core: register devlink port " Jiri Pirko
2023-05-25 12:36 ` Petr Machata
2023-05-24 12:18 ` [patch net-next 04/15] nfp: devlink: " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 05/15] devlink: move port_split/unsplit() ops into devlink_port_ops Jiri Pirko
2023-05-24 17:32 ` Jesse Brandeburg
2023-05-25 4:53 ` Jakub Kicinski
2023-05-25 6:05 ` Jiri Pirko [this message]
2023-05-25 15:27 ` Jakub Kicinski
2023-05-25 16:53 ` Jiri Pirko
2023-05-25 12:37 ` Petr Machata
2023-05-24 12:18 ` [patch net-next 06/15] mlx4: register devlink port with ops Jiri Pirko
2023-05-24 12:18 ` [patch net-next 07/15] devlink: move port_type_set() op into devlink_port_ops Jiri Pirko
2023-05-24 12:18 ` [patch net-next 08/15] sfc: register devlink port with ops Jiri Pirko
2023-05-24 17:57 ` Alejandro Lucero Palau
2023-05-25 6:10 ` Jiri Pirko
2023-05-25 15:13 ` Alejandro Lucero Palau
2023-05-25 16:52 ` Jiri Pirko
2023-05-24 12:18 ` [patch net-next 09/15] mlx5: register devlink ports " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 10/15] devlink: move port_fn_hw_addr_get/set() to devlink_port_ops Jiri Pirko
2023-05-24 12:18 ` [patch net-next 11/15] devlink: move port_fn_roce_get/set() " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 12/15] devlink: move port_fn_migratable_get/set() " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 13/15] devlink: move port_fn_state_get/set() " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 14/15] devlink: move port_del() " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 15/15] devlink: save devlink_port_ops into a variable in devlink_port_function_validate() Jiri Pirko
2023-05-25 4:55 ` Jakub Kicinski
2023-05-25 5:58 ` Jiri Pirko
2023-05-25 15:29 ` Jakub Kicinski
2023-05-26 8:53 ` Jiri Pirko
2023-05-24 14:02 ` [patch net-next 00/15] devlink: move port ops into separate structure Petr Machata
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=ZG76ohK00xF2LHeK@nanopsycho \
--to=jiri@resnulli.us \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=habetsm.xilinx@gmail.com \
--cc=idosch@nvidia.com \
--cc=jacob.e.keller@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=michal.wilczynski@intel.com \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=saeedm@nvidia.com \
--cc=simon.horman@corigine.com \
--cc=tariqt@nvidia.com \
/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;
as well as URLs for NNTP newsgroup(s).