Re: [Patch v2] hv_netvsc: Mark VF as slave before exposing it to user-mode

From: Jakub Kicinski
Date: Mon Oct 30 2023 - 17:25:48 EST


On Fri, 27 Oct 2023 13:59:50 -0700 longli@xxxxxxxxxxxxxxxxx wrote:
> When a VF is being exposed form the kernel, it should be marked as "slave"
> before exposing to the user-mode. The VF is not usable without netvsc running
> as master. The user-mode should never see a VF without the "slave" flag.
>
> This commit moves the code of setting the slave flag to the time before VF is
> exposed to user-mode.

Can you give a real example in the commit message of a flow in user
space which would get confused by seeing the VF netdev without
IFF_SLAVE?

You're only moving setting IFF_SLAVE but not linking the master,
is there no code which would assume that if SLAVE is set there
is a master?