[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230524215301.02ae701e@kernel.org>
Date: Wed, 24 May 2023 21:53:01 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, pabeni@...hat.com, davem@...emloft.net,
edumazet@...gle.com, leon@...nel.org, saeedm@...dia.com, moshe@...dia.com,
jesse.brandeburg@...el.com, anthony.l.nguyen@...el.com, tariqt@...dia.com,
idosch@...dia.com, petrm@...dia.com, simon.horman@...igine.com,
ecree.xilinx@...il.com, habetsm.xilinx@...il.com,
michal.wilczynski@...el.com, jacob.e.keller@...el.com
Subject: Re: [patch net-next 05/15] devlink: move port_split/unsplit() ops
into devlink_port_ops
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
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.
Powered by blists - more mailing lists