[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250108093139.126716e9@kernel.org>
Date: Wed, 8 Jan 2025 09:31:39 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Xiao Liang <shaw.leon@...il.com>
Cc: netdev@...r.kernel.org, linux-kselftest@...r.kernel.org, Kuniyuki
Iwashima <kuniyu@...zon.com>, Donald Hunter <donald.hunter@...il.com>,
"David S. Miller" <davem@...emloft.net>, David Ahern <dsahern@...nel.org>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Ido
Schimmel <idosch@...dia.com>, Andrew Lunn <andrew+netdev@...n.ch>, Simon
Horman <horms@...nel.org>, Shuah Khan <shuah@...nel.org>, Jiri Pirko
<jiri@...nulli.us>, Hangbin Liu <liuhangbin@...il.com>,
linux-rdma@...r.kernel.org, linux-can@...r.kernel.org,
osmocom-net-gprs@...ts.osmocom.org, bpf@...r.kernel.org,
linux-ppp@...r.kernel.org, wireguard@...ts.zx2c4.com,
linux-wireless@...r.kernel.org, b.a.t.m.a.n@...ts.open-mesh.org,
bridge@...ts.linux.dev, linux-wpan@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v7 02/11] rtnetlink: Pack newlink() params into
struct
On Wed, 8 Jan 2025 16:36:26 +0800 Xiao Liang wrote:
> On Wed, Jan 8, 2025 at 4:38 AM Jakub Kicinski <kuba@...nel.org> wrote:
> >
> > On Sat, 4 Jan 2025 20:57:23 +0800 Xiao Liang wrote:
> > > -static int amt_newlink(struct net *net, struct net_device *dev,
> > > - struct nlattr *tb[], struct nlattr *data[],
> > > - struct netlink_ext_ack *extack)
> > > +static int amt_newlink(struct rtnl_newlink_params *params)
> > > {
> > > - struct amt_dev *amt = netdev_priv(dev);
> > > + struct netlink_ext_ack *extack = params->extack;
> > > + struct net_device *dev = params->dev;
> > > + struct nlattr **data = params->data;
> > > + struct nlattr **tb = params->tb;
> > > + struct net *net = params->net;
> > > + struct amt_dev *amt;
> >
> > IMHO you packed a little too much into the struct.
> > Could you take the dev and the extack back out?
>
> Sure. I thought you were suggesting packing them all
> in review of v3...
Sorry about that, I wasn't very clear :(
What I had in mind was similar to how we define ethtool ops,
(especially the more recent ones which have extack)
for example:
int (*set_mm)(struct net_device *dev, struct ethtool_mm_cfg *cfg,
struct netlink_ext_ack *extack);
Powered by blists - more mailing lists