net/mlx5: Add support for configuring max device MTU
authorEli Cohen <elic@nvidia.com>
Mon, 21 Feb 2022 12:19:27 +0000 (14:19 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 28 Mar 2022 20:52:58 +0000 (16:52 -0400)
commit1e00e821e4ca6355c7fff9f69a4c5ecd78e348a0
treefa992eb9aab4fa3537eb0d9f0760a27913b5fe07
parentea993de113b85557ed34da8f7b4af0629550e023
net/mlx5: Add support for configuring max device MTU

Allow an admin creating a vdpa device to specify the max MTU for the
net device.

For example, to create a device with max MTU of 1000, the following
command can be used:

$ vdpa dev add name vdpa-a mgmtdev auxiliary/mlx5_core.sf.1 mtu 1000

This configuration mechanism assumes that vdpa is the sole real user of
the function. mlx5_core could theoretically change the mtu of the
function using the ip command on the mlx5_core net device but this
should not be done.

Reviewed-by: Si-Wei Liu<si-wei.liu@oracle.com>
Signed-off-by: Eli Cohen <elic@nvidia.com>
Link: https://lore.kernel.org/r/20220221121927.194728-1-elic@nvidia.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
drivers/vdpa/mlx5/net/mlx5_vnet.c