linux-stable/drivers/vdpa/vdpa_sim
Jason Wang 477f719714 vdpa_sim_net: support feature provisioning
This patch implements features provisioning for vdpa_sim_net.

1) validating the provisioned features to be a subset of the parent
   features.
2) clearing the features that is not wanted by the userspace

For example:

vdpasim_net:
  supported_classes net
  max_supported_vqs 3
  dev_features MTU MAC CTRL_VQ CTRL_MAC_ADDR ANY_LAYOUT VERSION_1 ACCESS_PLATFORM

1) provision vDPA device with all features that are supported by the
   net simulator

dev1: mac 00:00:00:00:00:00 link up link_announce false mtu 1500
  negotiated_features MTU MAC CTRL_VQ CTRL_MAC_ADDR VERSION_1 ACCESS_PLATFORM

2) provision vDPA device with a subset of the features

dev1: mac 00:00:00:00:00:00 link up link_announce false mtu 1500
  negotiated_features CTRL_VQ VERSION_1 ACCESS_PLATFORM

Reviewed-by: Eli Cohen <elic@nvidia.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220927074810.28627-3-jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
2022-10-07 09:32:40 -04:00
..
Makefile vdpa: add vdpa simulator for block device 2021-05-03 04:55:53 -04:00
vdpa_sim.c vdpa_sim_net: support feature provisioning 2022-10-07 09:32:40 -04:00
vdpa_sim.h vdpa_sim_net: support feature provisioning 2022-10-07 09:32:40 -04:00
vdpa_sim_blk.c vdpa_sim_net: support feature provisioning 2022-10-07 09:32:40 -04:00
vdpa_sim_net.c vdpa_sim_net: support feature provisioning 2022-10-07 09:32:40 -04:00