summaryrefslogtreecommitdiff
path: root/drivers/vdpa/vdpa.c
diff options
context:
space:
mode:
authorEli Cohen <elic@nvidia.com>2022-01-05 14:46:33 +0300
committerMichael S. Tsirkin <mst@redhat.com>2022-01-15 02:50:53 +0300
commita64917bc2e9b1e0aa716b783c4ec879fdd280300 (patch)
tree63b04363f3e8d383b1273899916c5fcc26f97f64 /drivers/vdpa/vdpa.c
parent870aaff92e959e29d40f9cfdb5ed06ba2fc2dae0 (diff)
downloadlinux-a64917bc2e9b1e0aa716b783c4ec879fdd280300.tar.xz
vdpa: Provide interface to read driver features
Provide an interface to read the negotiated features. This is needed when building the netlink message in vdpa_dev_net_config_fill(). Also fix the implementation of vdpa_dev_net_config_fill() to use the negotiated features instead of the device features. To make APIs clearer, make the following name changes to struct vdpa_config_ops so they better describe their operations: get_features -> get_device_features set_features -> set_driver_features Finally, add get_driver_features to return the negotiated features and add implementation to all the upstream drivers. Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Eli Cohen <elic@nvidia.com> Link: https://lore.kernel.org/r/20220105114646.577224-2-elic@nvidia.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vdpa/vdpa.c')
-rw-r--r--drivers/vdpa/vdpa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c
index 59d0b8bbb79c..42d71d60d5dc 100644
--- a/drivers/vdpa/vdpa.c
+++ b/drivers/vdpa/vdpa.c
@@ -808,7 +808,7 @@ static int vdpa_dev_net_config_fill(struct vdpa_device *vdev, struct sk_buff *ms
if (nla_put_u16(msg, VDPA_ATTR_DEV_NET_CFG_MTU, val_u16))
return -EMSGSIZE;
- features = vdev->config->get_features(vdev);
+ features = vdev->config->get_driver_features(vdev);
return vdpa_dev_net_mq_config_fill(vdev, msg, features, &config);
}