mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
vdpa: merge functionally duplicated dev_features attributes
We can merge VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES with VDPA_ATTR_DEV_FEATURES which is functionally equivalent. While at it, tweak the comment in header file to make user provioned device features distinguished from those supported by the parent mgmtdev device: the former of which can be inherited as a whole from the latter, or can be a subset of the latter if explicitly specified. Signed-off-by: Si-Wei Liu <si-wei.liu@oracle.com> Message-Id: <1665422823-18364-1-git-send-email-si-wei.liu@oracle.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
1b929c02af
commit
b9e05399d9
@ -855,7 +855,7 @@ static int vdpa_dev_net_config_fill(struct vdpa_device *vdev, struct sk_buff *ms
|
||||
|
||||
features_device = vdev->config->get_device_features(vdev);
|
||||
|
||||
if (nla_put_u64_64bit(msg, VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES, features_device,
|
||||
if (nla_put_u64_64bit(msg, VDPA_ATTR_DEV_FEATURES, features_device,
|
||||
VDPA_ATTR_PAD))
|
||||
return -EMSGSIZE;
|
||||
|
||||
|
@ -53,11 +53,9 @@ enum vdpa_attr {
|
||||
VDPA_ATTR_DEV_VENDOR_ATTR_NAME, /* string */
|
||||
VDPA_ATTR_DEV_VENDOR_ATTR_VALUE, /* u64 */
|
||||
|
||||
/* virtio features that are provisioned to the vDPA device */
|
||||
VDPA_ATTR_DEV_FEATURES, /* u64 */
|
||||
|
||||
/* virtio features that are supported by the vDPA device */
|
||||
VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES, /* u64 */
|
||||
|
||||
/* new attributes must be added above here */
|
||||
VDPA_ATTR_MAX,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user