]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite40c336f9a3c2e0af3cacf56fb0b5bfe4340a7a4
treefa992eb9aab4fa3537eb0d9f0760a27913b5fe07
parent5b5d00f7934b24a509c566ba3e68540bb3cf8e17
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