Subject: Re: [patch net-next 05/15] devlink: move port_split/unsplit() ops into devlink_port_ops

From: Jakub Kicinski <[email-masked]>
Date: Wed, 24 May 2023 21:53:01 -0700

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.