[dpdk-dev] [PATCH 2/2] net/mlx5: avoid unbind step to enable switchdev mode
Slava Ovsiienko
viacheslavo at nvidia.com
Mon Mar 15 16:53:51 CET 2021
Hi, Jan
Yes, bullet [4] explicitly requires to unbind VFs, and detach the netdevs from the mlx5_core driver.
Otherwise, kernel driver refuses to be configured with switchdev mode in [5]. So, [4] can't be skipped.
After setting swithdev mode, VFs can be bound back (if it is needed, and these ones are not mapped to VMs):
echo -n "<device pci address>" > > /sys/bus/pci/drivers/mlx5_core/bind
With best regards,
Slava
> -----Original Message-----
> From: Jan Viktorin <iviktorin at fit.vutbr.cz>
> Sent: Monday, March 15, 2021 17:34
> To: dev at dpdk.org
> Cc: Jan Viktorin <viktorin at cesnet.cz>; Asaf Penso <asafp at nvidia.com>;
> Shahaf Shuler <shahafs at nvidia.com>; Slava Ovsiienko
> <viacheslavo at nvidia.com>; Matan Azrad <matan at nvidia.com>
> Subject: [PATCH 2/2] net/mlx5: avoid unbind step to enable switchdev mode
>
> From: Jan Viktorin <viktorin at cesnet.cz>
>
> The step 4 is a contradiction. It advices to unbind the device from the
> mlx5_core which removes the associated system network interface (e.g.
> eth0). In the step 5, the same system network interface (e.g. eth0) is
> required to exist.
>
> Signed-off-by: Jan Viktorin <viktorin at cesnet.cz>
> ---
> doc/guides/nics/mlx5.rst | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index
> 0a2dc3dee..122d8e0fc 100644
> --- a/doc/guides/nics/mlx5.rst
> +++ b/doc/guides/nics/mlx5.rst
> @@ -1370,11 +1370,7 @@ the DPDK application.
>
> echo <num of vfs > /sys/class/net/<net device>/device/sriov_numvfs
>
> -4. Unbind the device (can be rebind after the switchdev mode)::
> -
> - echo -n "<device pci address>" >
> /sys/bus/pci/drivers/mlx5_core/unbind
> -
> -5. Enable switchdev mode::
> +4. Enable switchdev mode::
>
> echo switchdev > /sys/class/net/<net device>/compat/devlink/mode
>
> --
> 2.30.1
More information about the dev
mailing list