From: Leon Romanovsky <leon@kernel.org>
To: Ivan Vecera <ivecera@redhat.com>
Cc: netdev@vger.kernel.org, mschmidt@redhat.com,
Michael Chan <michael.chan@broadcom.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] bnxt_en: Allow to set switchdev mode without existing VFs
Date: Sun, 9 Apr 2023 12:02:24 +0300 [thread overview]
Message-ID: <20230409090224.GE14869@unreal> (raw)
In-Reply-To: <20230406130455.1155362-1-ivecera@redhat.com>
On Thu, Apr 06, 2023 at 03:04:55PM +0200, Ivan Vecera wrote:
> Remove an inability of bnxt_en driver to set eswitch to switchdev
> mode without existing VFs by:
>
> 1. Allow to set switchdev mode in bnxt_dl_eswitch_mode_set() so
> representors are created only when num_vfs > 0 otherwise just
> set bp->eswitch_mode
> 2. Do not automatically change bp->eswitch_mode during
> bnxt_vf_reps_create() and bnxt_vf_reps_destroy() calls so
> the eswitch mode is managed only by an user by devlink.
> Just set temporarily bp->eswitch_mode to legacy to avoid
> re-opening of representors during destroy.
> 3. Create representors in bnxt_sriov_enable() if current eswitch
> mode is switchdev one
>
> Tested by this sequence:
> 1. Set PF interface up
> 2. Set PF's eswitch mode to switchdev
> 3. Created N VFs
> 4. Checked that N representors were created
> 5. Set eswitch mode to legacy
> 6. Checked that representors were deleted
> 7. Set eswitch mode back to switchdev
> 8. Checked that representros were re-created
Why do you think that this last item is the right behavior?
IMHO all configurations which were done after you switched mode
should be cleared and not recreated while toggling.
Thanks
> 9. Deleted all VFs
> 10. Checked that all representors were deleted as well
> 11. Checked that current eswitch mode is still switchdev
>
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
> ---
next prev parent reply other threads:[~2023-04-09 9:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 13:04 [PATCH net-next] bnxt_en: Allow to set switchdev mode without existing VFs Ivan Vecera
2023-04-09 9:02 ` Leon Romanovsky [this message]
2023-04-11 5:40 ` Ivan Vecera
2023-04-11 10:22 ` Paolo Abeni
2023-04-11 12:02 ` Ivan Vecera
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=20230409090224.GE14869@unreal \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ivecera@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=mschmidt@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).