[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <66cb6b22-0239-6784-851c-02652487a62d@intel.com>
Date: Wed, 24 May 2023 10:30:51 -0700
From: Jesse Brandeburg <jesse.brandeburg@...el.com>
To: Jiri Pirko <jiri@...nulli.us>, <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>, <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: Re: [patch net-next 02/15] ice: register devlink port for PF with ops
On 5/24/2023 5:18 AM, Jiri Pirko wrote:
> 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/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);
Looks good to me.
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@...el.com>
Powered by blists - more mailing lists