From: Shannon Nelson <shnelson@amd.com>
To: Leon Romanovsky <leon@kernel.org>, Shannon Nelson <snelson@pensando.io>
Cc: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org,
drivers@pensando.io
Subject: Re: [PATCH net-next 3/5] ionic: new ionic device identity level and VF start control
Date: Tue, 25 Oct 2022 01:35:08 -0700 [thread overview]
Message-ID: <e9bf1b39-a2fa-2c85-8874-e3676e4dd7dd@amd.com> (raw)
In-Reply-To: <Y1aCGgypfvK/+iwn@unreal>
On 10/24/22 5:16 AM, Leon Romanovsky wrote:
>
> 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@pensando.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
I'll clean that up - thanks.
sln
next prev parent reply other threads:[~2022-10-25 8:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-24 10:17 [PATCH net-next 0/5] ionic: VF attr replay and other updates Shannon Nelson
2022-10-24 10:17 ` [PATCH net-next 1/5] ionic: replay VF attributes after fw crash recovery Shannon Nelson
2022-10-24 12:12 ` Leon Romanovsky
2022-10-25 8:34 ` Shannon Nelson
2022-10-24 10:17 ` [PATCH net-next 2/5] ionic: only save the user set VF attributes Shannon Nelson
2022-10-24 10:17 ` [PATCH net-next 3/5] ionic: new ionic device identity level and VF start control Shannon Nelson
2022-10-24 12:16 ` Leon Romanovsky
2022-10-25 8:35 ` Shannon Nelson [this message]
2022-10-24 10:17 ` [PATCH net-next 4/5] ionic: enable tunnel offloads Shannon Nelson
2022-10-24 10:17 ` [PATCH net-next 5/5] ionic: refactor use of ionic_rx_fill() Shannon Nelson
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=e9bf1b39-a2fa-2c85-8874-e3676e4dd7dd@amd.com \
--to=shnelson@amd.com \
--cc=davem@davemloft.net \
--cc=drivers@pensando.io \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=snelson@pensando.io \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.