netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Alejandro Lucero Palau <alucerop@amd.com>
Cc: netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com,
	davem@davemloft.net, edumazet@google.com, leon@kernel.org,
	saeedm@nvidia.com, moshe@nvidia.com, jesse.brandeburg@intel.com,
	anthony.l.nguyen@intel.com, tariqt@nvidia.com, idosch@nvidia.com,
	petrm@nvidia.com, simon.horman@corigine.com,
	ecree.xilinx@gmail.com, habetsm.xilinx@gmail.com,
	michal.wilczynski@intel.com, jacob.e.keller@intel.com
Subject: Re: [patch net-next 08/15] sfc: register devlink port with ops
Date: Thu, 25 May 2023 18:52:51 +0200	[thread overview]
Message-ID: <ZG+SY1rfCaBsbp6K@nanopsycho> (raw)
In-Reply-To: <90e4c411-4159-2836-acbd-c1e7a9c7ce37@amd.com>

Thu, May 25, 2023 at 05:13:57PM CEST, alucerop@amd.com wrote:
>
>On 5/24/23 18:57, Alejandro Lucero Palau wrote:
>> Hi Jiri,
>> 
>> On 5/24/23 13:18, Jiri Pirko wrote:
>> > 
>> > From: Jiri Pirko <jiri@nvidia.com>
>> > 
>> > Use newly introduce devlink port registration function variant and
>> > register devlink port passing ops.
>> > 
>> > Signed-off-by: Jiri Pirko <jiri@nvidia.com>
>> > ---
>> >   drivers/net/ethernet/sfc/efx_devlink.c | 8 +++++++-
>> >   1 file changed, 7 insertions(+), 1 deletion(-)
>> > 
>> > diff --git a/drivers/net/ethernet/sfc/efx_devlink.c
>> > b/drivers/net/ethernet/sfc/efx_devlink.c
>> > index 381b805659d3..f93437757ba3 100644
>> > --- a/drivers/net/ethernet/sfc/efx_devlink.c
>> > +++ b/drivers/net/ethernet/sfc/efx_devlink.c
>> > @@ -25,6 +25,10 @@ struct efx_devlink {
>> >   };
>> > 
>> >   #ifdef CONFIG_SFC_SRIOV
>> > +
>> > +static const struct devlink_port_ops sfc_devlink_port_ops = {
>> > +};
>> > +
>> 
>> We can have devlink port without SRIOV, so we need this outside the
>> previous ifdef.
>> 
>> Apart from that, it looks OK. I'll test it and report back.
>> 
>Apart from the change requested:

Did you see the reply to your email?

>
>Reviewed-by: Alejandro Lucero<alucerop@amd.com>
>Tested-by: Alejandro Lucero<alucerop@amd.com>
>
>> >   static void efx_devlink_del_port(struct devlink_port *dl_port)
>> >   {
>> >          if (!dl_port)
>> > @@ -57,7 +61,9 @@ static int efx_devlink_add_port(struct efx_nic *efx,
>> > 
>> >          mport->dl_port.index = mport->mport_id;
>> > 
>> > -       return devl_port_register(efx->devlink, &mport->dl_port,
>> > mport->mport_id);
>> > +       return devl_port_register_with_ops(efx->devlink,
>> > &mport->dl_port,
>> > +                                          mport->mport_id,
>> > + &sfc_devlink_port_ops);
>> >   }
>> > 
>> >   static int efx_devlink_port_addr_get(struct devlink_port *port, u8
>> > *hw_addr,
>> > -- 
>> > 2.39.2
>> > 
>> > 
>> 

  reply	other threads:[~2023-05-25 16:52 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24 12:18 [patch net-next 00/15] devlink: move port ops into separate structure Jiri Pirko
2023-05-24 12:18 ` [patch net-next 01/15] devlink: introduce port ops placeholder Jiri Pirko
2023-05-25  4:48   ` Jakub Kicinski
2023-05-25  6:07     ` Jiri Pirko
2023-05-24 12:18 ` [patch net-next 02/15] ice: register devlink port for PF with ops Jiri Pirko
2023-05-24 17:30   ` Jesse Brandeburg
2023-05-24 12:18 ` [patch net-next 03/15] mlxsw_core: register devlink port " Jiri Pirko
2023-05-25 12:36   ` Petr Machata
2023-05-24 12:18 ` [patch net-next 04/15] nfp: devlink: " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 05/15] devlink: move port_split/unsplit() ops into devlink_port_ops Jiri Pirko
2023-05-24 17:32   ` Jesse Brandeburg
2023-05-25  4:53   ` Jakub Kicinski
2023-05-25  6:05     ` Jiri Pirko
2023-05-25 15:27       ` Jakub Kicinski
2023-05-25 16:53         ` Jiri Pirko
2023-05-25 12:37   ` Petr Machata
2023-05-24 12:18 ` [patch net-next 06/15] mlx4: register devlink port with ops Jiri Pirko
2023-05-24 12:18 ` [patch net-next 07/15] devlink: move port_type_set() op into devlink_port_ops Jiri Pirko
2023-05-24 12:18 ` [patch net-next 08/15] sfc: register devlink port with ops Jiri Pirko
2023-05-24 17:57   ` Alejandro Lucero Palau
2023-05-25  6:10     ` Jiri Pirko
2023-05-25 15:13     ` Alejandro Lucero Palau
2023-05-25 16:52       ` Jiri Pirko [this message]
2023-05-24 12:18 ` [patch net-next 09/15] mlx5: register devlink ports " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 10/15] devlink: move port_fn_hw_addr_get/set() to devlink_port_ops Jiri Pirko
2023-05-24 12:18 ` [patch net-next 11/15] devlink: move port_fn_roce_get/set() " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 12/15] devlink: move port_fn_migratable_get/set() " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 13/15] devlink: move port_fn_state_get/set() " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 14/15] devlink: move port_del() " Jiri Pirko
2023-05-24 12:18 ` [patch net-next 15/15] devlink: save devlink_port_ops into a variable in devlink_port_function_validate() Jiri Pirko
2023-05-25  4:55   ` Jakub Kicinski
2023-05-25  5:58     ` Jiri Pirko
2023-05-25 15:29       ` Jakub Kicinski
2023-05-26  8:53         ` Jiri Pirko
2023-05-24 14:02 ` [patch net-next 00/15] devlink: move port ops into separate structure Petr Machata

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZG+SY1rfCaBsbp6K@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=alucerop@amd.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=habetsm.xilinx@gmail.com \
    --cc=idosch@nvidia.com \
    --cc=jacob.e.keller@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=michal.wilczynski@intel.com \
    --cc=moshe@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=saeedm@nvidia.com \
    --cc=simon.horman@corigine.com \
    --cc=tariqt@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).