lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZG777R0b631bkN54@nanopsycho>
Date: Thu, 25 May 2023 08:10:53 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Alejandro Lucero Palau <alucerop@....com>
Cc: netdev@...r.kernel.org, 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: Re: [patch net-next 08/15] sfc: register devlink port with ops

Wed, May 24, 2023 at 07:57:50PM CEST, alucerop@....com wrote:
>Hi Jiri,
>
>On 5/24/23 13:18, Jiri Pirko wrote:
>> CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.

Awesome, could you manage to remove this irrelevant text in your mailer?


>> 
>> 
>> 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/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.

Nope, in the original code, efx_devlink_add_port() is under this ifdef
too. So ifdef-wise, this patch does not change anything. Why do you
think so?


>
>Apart from that, it looks OK. I'll test it and report back.
>
>>   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
>> 
>> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ