[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250113143719.7948-9-shaw.leon@gmail.com>
Date: Mon, 13 Jan 2025 22:37:16 +0800
From: Xiao Liang <shaw.leon@...il.com>
To: netdev@...r.kernel.org,
linux-kselftest@...r.kernel.org,
Kuniyuki Iwashima <kuniyu@...zon.com>,
Jakub Kicinski <kuba@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>,
David Ahern <dsahern@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
Simon Horman <horms@...nel.org>,
Shuah Khan <shuah@...nel.org>,
Donald Hunter <donald.hunter@...il.com>,
Alexander Aring <alex.aring@...il.com>,
Stefan Schmidt <stefan@...enfreihafen.org>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Steffen Klassert <steffen.klassert@...unet.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
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: [PATCH net-next v8 08/11] rtnetlink: Remove "net" from newlink params
Now that devices have been converted to use the specific netns instead
of ambiguous "net", let's remove it from newlink parameters.
Signed-off-by: Xiao Liang <shaw.leon@...il.com>
---
include/net/rtnetlink.h | 2 --
net/core/rtnetlink.c | 6 ------
2 files changed, 8 deletions(-)
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index 00c086ca0c11..dd51240431b8 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -72,7 +72,6 @@ static inline int rtnl_msg_family(const struct nlmsghdr *nlh)
/**
* struct rtnl_newlink_params - parameters of rtnl_link_ops::newlink()
*
- * @net: Netns of interest
* @src_net: Source netns of rtnetlink socket
* @link_net: Link netns by IFLA_LINK_NETNSID, NULL if not specified
* @peer_net: Peer netns
@@ -80,7 +79,6 @@ static inline int rtnl_msg_family(const struct nlmsghdr *nlh)
* @data: IFLA_INFO_DATA attributes
*/
struct rtnl_newlink_params {
- struct net *net;
struct net *src_net;
struct net *link_net;
struct net *peer_net;
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 7ff5e96f6ba7..cce5bcd1f257 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -3767,7 +3767,6 @@ static int rtnl_newlink_create(struct sk_buff *skb, struct ifinfomsg *ifm,
char ifname[IFNAMSIZ];
int err;
struct rtnl_newlink_params params = {
- .net = net,
.src_net = net,
.link_net = link_net,
.peer_net = peer_net,
@@ -3794,11 +3793,6 @@ static int rtnl_newlink_create(struct sk_buff *skb, struct ifinfomsg *ifm,
dev->ifindex = ifm->ifi_index;
- if (link_net)
- params.net = link_net;
- if (peer_net)
- params.net = peer_net;
-
if (ops->newlink)
err = ops->newlink(dev, ¶ms, extack);
else
--
2.47.1
Powered by blists - more mailing lists