[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230526102841.2226553-3-jiri@resnulli.us>
Date: Fri, 26 May 2023 12:28:28 +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 02/15] ice: register devlink port for PF 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>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@...el.com>
---
drivers/net/ethernet/intel/ice/ice_devlink.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.c b/drivers/net/ethernet/intel/ice/ice_devlink.c
index bc44cc220818..6661d12772a3 100644
--- a/drivers/net/ethernet/intel/ice/ice_devlink.c
+++ b/drivers/net/ethernet/intel/ice/ice_devlink.c
@@ -1512,6 +1512,9 @@ ice_devlink_set_port_split_options(struct ice_pf *pf,
ice_active_port_option = active_idx;
}
+static const struct devlink_port_ops ice_devlink_port_ops = {
+};
+
/**
* ice_devlink_create_pf_port - Create a devlink port for this PF
* @pf: the PF to create a devlink port for
@@ -1551,7 +1554,8 @@ int ice_devlink_create_pf_port(struct ice_pf *pf)
devlink_port_attrs_set(devlink_port, &attrs);
devlink = priv_to_devlink(pf);
- err = devlink_port_register(devlink, devlink_port, vsi->idx);
+ err = devlink_port_register_with_ops(devlink, devlink_port, vsi->idx,
+ &ice_devlink_port_ops);
if (err) {
dev_err(dev, "Failed to create devlink port for PF %d, error %d\n",
pf->hw.pf_id, err);
--
2.39.2
Powered by blists - more mailing lists