vdpa: Enable user to set mac and mtu of vdpa device
authorParav Pandit <parav@nvidia.com>
Tue, 26 Oct 2021 17:55:15 +0000 (20:55 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 1 Nov 2021 09:26:49 +0000 (05:26 -0400)
commitd8ca2fa5be1bdb9d08cfe1f831cddb622a01dfd4
treee97bbd7599b9c4331ac88cac79ccbe905a5fc86b
parent960deb33be3d08e55a39e40e0286a51c7448e053
vdpa: Enable user to set mac and mtu of vdpa device

$ vdpa dev add name bar mgmtdev vdpasim_net mac 00:11:22:33:44:55 mtu 9000

$ vdpa dev config show
bar: mac 00:11:22:33:44:55 link up link_announce false mtu 9000

$ vdpa dev config show -jp
{
    "config": {
        "bar": {
            "mac": "00:11:22:33:44:55",
            "link ": "up",
            "link_announce ": false,
            "mtu": 9000,
        }
    }
}

Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Eli Cohen <elic@nvidia.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20211026175519.87795-5-parav@nvidia.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
drivers/vdpa/ifcvf/ifcvf_main.c
drivers/vdpa/mlx5/net/mlx5_vnet.c
drivers/vdpa/vdpa.c
drivers/vdpa/vdpa_sim/vdpa_sim_blk.c
drivers/vdpa/vdpa_sim/vdpa_sim_net.c
drivers/vdpa/vdpa_user/vduse_dev.c
include/linux/vdpa.h