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: <Y1aCGgypfvK/+iwn@unreal>
Date:   Mon, 24 Oct 2022 15:16:26 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     Shannon Nelson <snelson@...sando.io>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, kuba@...nel.org,
        drivers@...sando.io
Subject: Re: [PATCH net-next 3/5] ionic: new ionic device identity level and
 VF start control

On Mon, Oct 24, 2022 at 03:17:15AM -0700, Shannon Nelson wrote:
> A new ionic dev_cmd is added to the interface in ionic_if.h,
> with a new capabilities field in the ionic device identity to
> signal its availability in the FW.  The identity level code is
> incremented to '2' to show support for this new capabilities
> bitfield.
> 
> If the driver has indicated with the new identity level that
> it has the VF_CTRL command, newer FW will wait for the start
> command before starting the VFs after a FW update or crash
> recovery.
> 
> This patch updates the driver to make use of the new VF start
> control in fw_up path to be sure that the PF has set the user
> attributes on the VF before the FW allows the VFs to restart.
> 
> Signed-off-by: Shannon Nelson <snelson@...sando.io>
> ---
>  .../net/ethernet/pensando/ionic/ionic_dev.c   | 20 +++++++++
>  .../net/ethernet/pensando/ionic/ionic_dev.h   |  3 ++
>  .../net/ethernet/pensando/ionic/ionic_if.h    | 41 +++++++++++++++++++
>  .../net/ethernet/pensando/ionic/ionic_lif.c   |  2 +
>  .../net/ethernet/pensando/ionic/ionic_main.c  |  2 +-
>  5 files changed, 67 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.c b/drivers/net/ethernet/pensando/ionic/ionic_dev.c
> index 9d0514cfeb5c..20a0d87c9fce 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_dev.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_dev.c
> @@ -481,6 +481,26 @@ int ionic_dev_cmd_vf_getattr(struct ionic *ionic, int vf, u8 attr,
>  	return err;
>  }
>  
> +void ionic_vf_start(struct ionic *ionic, int vf)
> +{
> +	union ionic_dev_cmd cmd = {
> +		.vf_ctrl.opcode = IONIC_CMD_VF_CTRL,
> +	};
> +
> +	if (!(ionic->ident.dev.capabilities & cpu_to_le64(IONIC_DEV_CAP_VF_CTRL)))
> +		return;
> +
> +	if (vf == -1) {
> +		cmd.vf_ctrl.ctrl_opcode = IONIC_VF_CTRL_START_ALL;
> +	} else {
> +		cmd.vf_ctrl.ctrl_opcode = IONIC_VF_CTRL_START;
> +		cmd.vf_ctrl.vf_index = cpu_to_le16(vf);
> +	}

<...>

> +	ionic_vf_start(ionic, -1)

I see only call with "-1" in this series. It is better to add code when
it is actually used.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ