Re: [PATCH net-next v7 02/11] rtnetlink: Pack newlink() params into struct

From
Jakub Kicinski <kuba@kernel.org>
Date
2025-01-07 20:38:07
Also in
batman, bpf, bridge, linux-can, linux-kselftest, linux-rdma, linux-wireless, lkml
Reply to
Xiao Liang, 2025-01-04
On Sat,  4 Jan 2025 20:57:23 +0800 Xiao Liang wrote:
quoted hunk ↗ jump to hunk
-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?
Thread (19 messages) 19 messages, 3 authors, last reply 2025-01-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help