[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221205152257.454610-9-jiri@resnulli.us>
Date: Mon, 5 Dec 2022 16:22:57 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
edumazet@...gle.com, michael.chan@...adcom.com,
ioana.ciornei@....com, dmichail@...gible.com,
jesse.brandeburg@...el.com, anthony.l.nguyen@...el.com,
tchornyi@...vell.com, tariqt@...dia.com, saeedm@...dia.com,
leon@...nel.org, idosch@...dia.com, petrm@...dia.com,
vladimir.oltean@....com, claudiu.manoil@....com,
alexandre.belloni@...tlin.com, simon.horman@...igine.com,
shannon.nelson@....com, brett.creeley@....com
Subject: [patch net-next 8/8] devlink: remove port notifications from devlink_register/unregister()
From: Jiri Pirko <jiri@...dia.com>
Now when all drivers do call devl_port_register/unregister() within the
time frame during which the devlink is registered, don't walk
through empty list for port notifications in
devlink_register/unregister().
Signed-off-by: Jiri Pirko <jiri@...dia.com>
---
RFC->v1:
- new patch
---
net/core/devlink.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/net/core/devlink.c b/net/core/devlink.c
index 9b9775bc10b3..1293069896c9 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -9859,9 +9859,6 @@ static void devlink_notify_register(struct devlink *devlink)
list_for_each_entry(linecard, &devlink->linecard_list, list)
devlink_linecard_notify(linecard, DEVLINK_CMD_LINECARD_NEW);
- xa_for_each(&devlink->ports, port_index, devlink_port)
- devlink_port_notify(devlink_port, DEVLINK_CMD_PORT_NEW);
-
list_for_each_entry(policer_item, &devlink->trap_policer_list, list)
devlink_trap_policer_notify(devlink, policer_item,
DEVLINK_CMD_TRAP_POLICER_NEW);
@@ -9916,8 +9913,6 @@ static void devlink_notify_unregister(struct devlink *devlink)
devlink_trap_policer_notify(devlink, policer_item,
DEVLINK_CMD_TRAP_POLICER_DEL);
- xa_for_each(&devlink->ports, port_index, devlink_port)
- devlink_port_notify(devlink_port, DEVLINK_CMD_PORT_DEL);
devlink_notify(devlink, DEVLINK_CMD_DEL);
}
--
2.37.3
Powered by blists - more mailing lists