mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-17 22:23:45 -04:00
vdpa: Add set/get_vq_affinity callbacks in vdpa_config_ops
This introduces set/get_vq_affinity callbacks in vdpa_config_ops to support virtqueue affinity management for vdpa device drivers. Signed-off-by: Xie Yongji <xieyongji@bytedance.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20230323053043.35-3-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
aaf0594829
commit
1d24692732
@@ -250,6 +250,15 @@ struct vdpa_map_file {
|
||||
* @vdev: vdpa device
|
||||
* Returns the iova range supported by
|
||||
* the device.
|
||||
* @set_vq_affinity: Set the affinity of virtqueue (optional)
|
||||
* @vdev: vdpa device
|
||||
* @idx: virtqueue index
|
||||
* @cpu_mask: the affinity mask
|
||||
* Returns integer: success (0) or error (< 0)
|
||||
* @get_vq_affinity: Get the affinity of virtqueue (optional)
|
||||
* @vdev: vdpa device
|
||||
* @idx: virtqueue index
|
||||
* Returns the affinity mask
|
||||
* @set_group_asid: Set address space identifier for a
|
||||
* virtqueue group (optional)
|
||||
* @vdev: vdpa device
|
||||
@@ -340,6 +349,10 @@ struct vdpa_config_ops {
|
||||
const void *buf, unsigned int len);
|
||||
u32 (*get_generation)(struct vdpa_device *vdev);
|
||||
struct vdpa_iova_range (*get_iova_range)(struct vdpa_device *vdev);
|
||||
int (*set_vq_affinity)(struct vdpa_device *vdev, u16 idx,
|
||||
const struct cpumask *cpu_mask);
|
||||
const struct cpumask *(*get_vq_affinity)(struct vdpa_device *vdev,
|
||||
u16 idx);
|
||||
|
||||
/* DMA ops */
|
||||
int (*set_map)(struct vdpa_device *vdev, unsigned int asid,
|
||||
|
||||
Reference in New Issue
Block a user