[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230526102841.2226553-5-jiri@resnulli.us>
Date: Fri, 26 May 2023 12:28:30 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: kuba@...nel.org,
pabeni@...hat.com,
davem@...emloft.net,
edumazet@...gle.com,
leon@...nel.org,
saeedm@...dia.com,
moshe@...dia.com,
jesse.brandeburg@...el.com,
anthony.l.nguyen@...el.com,
tariqt@...dia.com,
idosch@...dia.com,
petrm@...dia.com,
simon.horman@...igine.com,
ecree.xilinx@...il.com,
habetsm.xilinx@...il.com,
michal.wilczynski@...el.com,
jacob.e.keller@...el.com
Subject: [patch net-next v2 04/15] nfp: devlink: register devlink port with ops
From: Jiri Pirko <jiri@...dia.com>
Use newly introduce devlink port registration function variant and
register devlink port passing ops.
Signed-off-by: Jiri Pirko <jiri@...dia.com>
---
drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c
index bf6bae557158..4e4296ecae7c 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c
@@ -321,6 +321,9 @@ const struct devlink_ops nfp_devlink_ops = {
.flash_update = nfp_devlink_flash_update,
};
+static const struct devlink_port_ops nfp_devlink_port_ops = {
+};
+
int nfp_devlink_port_register(struct nfp_app *app, struct nfp_port *port)
{
struct devlink_port_attrs attrs = {};
@@ -351,7 +354,8 @@ int nfp_devlink_port_register(struct nfp_app *app, struct nfp_port *port)
devlink = priv_to_devlink(app->pf);
- return devl_port_register(devlink, &port->dl_port, port->eth_id);
+ return devl_port_register_with_ops(devlink, &port->dl_port,
+ port->eth_id, &nfp_devlink_port_ops);
}
void nfp_devlink_port_unregister(struct nfp_port *port)
--
2.39.2
Powered by blists - more mailing lists