Subject: Re: [PATCH net-next 1/2] ethtool: netlink: handle SET intro/outro in the common code

From: Jakub Kicinski <[email-masked]>
Date: Tue, 24 Jan 2023 16:37:19 -0800

On Tue, 24 Jan 2023 12:34:23 +0100 Paolo Abeni wrote:
> On Fri, 2023-01-20 at 21:44 -0800, Jakub Kicinski wrote:
> > diff --git a/net/ethtool/pause.c b/net/ethtool/pause.c
> > index a8c113d244db..8e9aced3eeec 100644
> > --- a/net/ethtool/pause.c
> > +++ b/net/ethtool/pause.c
> > @@ -114,18 +114,6 @@ static int pause_fill_reply(struct sk_buff *skb,
> >  	return 0;
> >  }
> >  
> > -const struct ethnl_request_ops ethnl_pause_request_ops = {
> > -	.request_cmd		= ETHTOOL_MSG_PAUSE_GET,
> > -	.reply_cmd		= ETHTOOL_MSG_PAUSE_GET_REPLY,
> > -	.hdr_attr		= ETHTOOL_A_PAUSE_HEADER,
> > -	.req_info_size		= sizeof(struct pause_req_info),
> > -	.reply_data_size	= sizeof(struct pause_reply_data),
> > -
> > -	.prepare_data		= pause_prepare_data,
> > -	.reply_size		= pause_reply_size,
> > -	.fill_reply		= pause_fill_reply,
> > -};
> > -
> >  /* PAUSE_SET */
> >  
> >  const struct nla_policy ethnl_pause_set_policy[] = {  
> 
> This chunk does not apply cleanly due to commit 04692c9020b7 ("net:
> ethtool: netlink: retrieve stats from multiple sources (eMAC, pMAC)")
> 
> Could you please rebase?

Ah, sorry, didn't realize that series was changing request_ops.

I'll repost once Vladimir's fixes are in, because I think we should
add attrs and extack to req_info. That way we avoid all the bugs
with people expecting info to not be NULL and also one fewer param
for all the functions.