search for: vdpa_devic

Displaying 20 results from an estimated 36 matches for "vdpa_devic".

Did you mean: vdpa_device
2023 Jun 30
4
[PATCH virtio 0/4] pds_vdpa: mac, reset, and irq updates
v2 for internal review - heavily reworked NET_F_MAC patch, matches recent PR-68875 - reordered to put "clean and reset vqs" before "alloc-irq" to make them slightly simpler patches - other minor cleanups for simpler patches These are some fixes for device providing a MAC address, for allocating irq resources later to support vhost use, and for properly cleaning vq info
2023 Jun 30
4
[PATCH virtio 0/4] pds_vdpa: mac, reset, and irq updates
v2 for internal review - heavily reworked NET_F_MAC patch, matches recent PR-68875 - reordered to put "clean and reset vqs" before "alloc-irq" to make them slightly simpler patches - other minor cleanups for simpler patches These are some fixes for device providing a MAC address, for allocating irq resources later to support vhost use, and for properly cleaning vq info
2023 Jul 07
1
[PATCH virtio 1/4] pds_vdpa: reset to vdpa specified mac
...ions(-) >> >> diff --git a/drivers/vdpa/pds/vdpa_dev.c b/drivers/vdpa/pds/vdpa_dev.c >> index 5071a4d58f8d..e2e99bb0be2b 100644 >> --- a/drivers/vdpa/pds/vdpa_dev.c >> +++ b/drivers/vdpa/pds/vdpa_dev.c >> @@ -409,6 +409,8 @@ static void pds_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status) >> pdsv->vqs[i].avail_idx = 0; >> pdsv->vqs[i].used_idx = 0; >> } >> + >> + pds_vdpa_cmd_set_mac(pdsv, pdsv->mac); > > So this is not necessarily cal...
2018 Apr 02
2
[RFC] vhost: introduce mdev based hardware vhost backend
...*vdpa); typedef int (*vdpa_set_eventfd_t)(struct vdpa_dev *vdpa, int vector, int fd); typedef u64 (*vdpa_supported_features_t)(struct vdpa_dev *vdpa); typedef void (*vdpa_notify_device_t)(struct vdpa_dev *vdpa, int qid); typedef u64 (*vdpa_get_notify_addr_t)(struct vdpa_dev *vdpa, int qid); struct vdpa_device_ops { vdpa_start_device_t start; vdpa_stop_device_t stop; vdpa_dma_map_t dma_map; vdpa_dma_unmap_t dma_unmap; vdpa_set_eventfd_t set_eventfd; vdpa_supported_features_t supported_features; vdpa_notify_device_t notify; vdpa_get_notify_addr_t get_notify_addr; }; struct vdpa_dev { st...
2018 Apr 02
2
[RFC] vhost: introduce mdev based hardware vhost backend
...*vdpa); typedef int (*vdpa_set_eventfd_t)(struct vdpa_dev *vdpa, int vector, int fd); typedef u64 (*vdpa_supported_features_t)(struct vdpa_dev *vdpa); typedef void (*vdpa_notify_device_t)(struct vdpa_dev *vdpa, int qid); typedef u64 (*vdpa_get_notify_addr_t)(struct vdpa_dev *vdpa, int qid); struct vdpa_device_ops { vdpa_start_device_t start; vdpa_stop_device_t stop; vdpa_dma_map_t dma_map; vdpa_dma_unmap_t dma_unmap; vdpa_set_eventfd_t set_eventfd; vdpa_supported_features_t supported_features; vdpa_notify_device_t notify; vdpa_get_notify_addr_t get_notify_addr; }; struct vdpa_dev { st...
2018 Apr 10
0
[RFC] vhost: introduce mdev based hardware vhost backend
...pa_set_eventfd_t)(struct vdpa_dev *vdpa, int vector, int fd); > typedef u64 (*vdpa_supported_features_t)(struct vdpa_dev *vdpa); > typedef void (*vdpa_notify_device_t)(struct vdpa_dev *vdpa, int qid); > typedef u64 (*vdpa_get_notify_addr_t)(struct vdpa_dev *vdpa, int qid); > > struct vdpa_device_ops { > vdpa_start_device_t start; > vdpa_stop_device_t stop; > vdpa_dma_map_t dma_map; > vdpa_dma_unmap_t dma_unmap; > vdpa_set_eventfd_t set_eventfd; > vdpa_supported_features_t supported_features; > vdpa_notify_device_t notify; > vdpa_get_notify_addr_t ge...
2023 May 08
1
[PATCH V2 1/5] vDPA/ifcvf: virt queue ops take immediate actions
...vf->vring[i].last_avail_idx = 0; - vf->vring[i].desc = 0; - vf->vring[i].avail = 0; - vf->vring[i].used = 0; - vf->vring[i].ready = 0; vf->vring[i].cb.callback = NULL; vf->vring[i].cb.private = NULL; } @@ -542,14 +538,14 @@ static void ifcvf_vdpa_set_vq_ready(struct vdpa_device *vdpa_dev, { struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); - vf->vring[qid].ready = ready; + ifcvf_set_vq_ready(vf, qid, ready); } static bool ifcvf_vdpa_get_vq_ready(struct vdpa_device *vdpa_dev, u16 qid) { struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); - return vf->vring[qid].read...
2019 Jul 03
0
[RFC v2] vhost: introduce mdev based hardware vhost backend
...uct vdpa_dev *vdpa, int queue_idx, int fd); > +typedef u64 (*vdpa_supported_features_t)(struct vdpa_dev *vdpa); > +typedef void (*vdpa_notify_device_t)(struct vdpa_dev *vdpa, int queue_idx); > +typedef u64 (*vdpa_get_notify_addr_t)(struct vdpa_dev *vdpa, int queue_idx); > + > +struct vdpa_device_ops { > + vdpa_start_device_t start; > + vdpa_stop_device_t stop; > + vdpa_set_eventfd_t set_eventfd; > + vdpa_supported_features_t supported_features; > + vdpa_notify_device_t notify; > + vdpa_get_notify_addr_t get_notify_addr; > + vdpa_set_features_t set_features; >...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...(*vdpa_set_eventfd_t)(struct vdpa_dev *vdpa, int queue_idx, int fd); +typedef u64 (*vdpa_supported_features_t)(struct vdpa_dev *vdpa); +typedef void (*vdpa_notify_device_t)(struct vdpa_dev *vdpa, int queue_idx); +typedef u64 (*vdpa_get_notify_addr_t)(struct vdpa_dev *vdpa, int queue_idx); + +struct vdpa_device_ops { + vdpa_start_device_t start; + vdpa_stop_device_t stop; + vdpa_set_eventfd_t set_eventfd; + vdpa_supported_features_t supported_features; + vdpa_notify_device_t notify; + vdpa_get_notify_addr_t get_notify_addr; + vdpa_set_features_t set_features; +}; + +struct vdpa_vring_info { + u64 d...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...(*vdpa_set_eventfd_t)(struct vdpa_dev *vdpa, int queue_idx, int fd); +typedef u64 (*vdpa_supported_features_t)(struct vdpa_dev *vdpa); +typedef void (*vdpa_notify_device_t)(struct vdpa_dev *vdpa, int queue_idx); +typedef u64 (*vdpa_get_notify_addr_t)(struct vdpa_dev *vdpa, int queue_idx); + +struct vdpa_device_ops { + vdpa_start_device_t start; + vdpa_stop_device_t stop; + vdpa_set_eventfd_t set_eventfd; + vdpa_supported_features_t supported_features; + vdpa_notify_device_t notify; + vdpa_get_notify_addr_t get_notify_addr; + vdpa_set_features_t set_features; +}; + +struct vdpa_vring_info { + u64 d...
2023 Mar 31
7
[PATCH 0/5] vDPA/ifcvf: implement immediate initialization mechanism
Formerly, ifcvf driver has implemented a lazy-initialization mechanism for the virtqueues and other config space contents, it would store all configurations that passed down from the userspace, then load them to the device config space upon DRIVER_OK. This can not serve live migration, so this series implement an immediate initialization mechanism, which means rather than the former store-load
2023 May 08
6
[PATCH V2 0/5] vDPA/ifcvf: implement immediate initialization mechanism
Formerly, ifcvf driver has implemented a lazy-initialization mechanism for the virtqueues and other config space contents, it would store all configurations that passed down from the userspace, then load them to the device config space upon DRIVER_OK. This can not serve live migration, so this series implement an immediate initialization mechanism, which means rather than the former store-load
2023 Mar 31
1
[PATCH 1/5] virt queue ops take immediate actions
...vf->vring[i].last_avail_idx = 0; - vf->vring[i].desc = 0; - vf->vring[i].avail = 0; - vf->vring[i].used = 0; - vf->vring[i].ready = 0; vf->vring[i].cb.callback = NULL; vf->vring[i].cb.private = NULL; } @@ -542,14 +538,14 @@ static void ifcvf_vdpa_set_vq_ready(struct vdpa_device *vdpa_dev, { struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); - vf->vring[qid].ready = ready; + ifcvf_set_vq_ready(vf, qid, ready); } static bool ifcvf_vdpa_get_vq_ready(struct vdpa_device *vdpa_dev, u16 qid) { struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); - return vf->vring[qid].read...
2023 May 08
1
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...) -{ - struct ifcvf_hw *vf = adapter->vf; - int i; - - for (i = 0; i < vf->nr_vring; i++) { - vf->vring[i].last_avail_idx = 0; - vf->vring[i].cb.callback = NULL; - vf->vring[i].cb.private = NULL; - } - - ifcvf_reset(vf); -} - static struct ifcvf_adapter *vdpa_to_adapter(struct vdpa_device *vdpa_dev) { return container_of(vdpa_dev, struct ifcvf_adapter, vdpa); @@ -462,23 +438,15 @@ static void ifcvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status) static int ifcvf_vdpa_reset(struct vdpa_device *vdpa_dev) { - struct ifcvf_adapter *adapter; - struct ifcvf_hw *vf; - u8 s...
2023 May 24
2
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...+) { > - vf->vring[i].last_avail_idx = 0; > - vf->vring[i].cb.callback = NULL; > - vf->vring[i].cb.private = NULL; > - } > - > - ifcvf_reset(vf); > -} > - > static struct ifcvf_adapter *vdpa_to_adapter(struct vdpa_device *vdpa_dev) > { > return container_of(vdpa_dev, struct ifcvf_adapter, vdpa); > @@ -462,23 +438,15 @@ static void ifcvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status) > > static int ifcvf_vdpa_reset(struct vdpa_device *vdpa_dev) > { > - struct ifcvf_ad...
2023 Mar 17
0
[PATCH RFC v2 virtio 2/7] pds_vdpa: get vdpa management info
...t; >> + const struct vdpa_dev_set_config *add_config) > >> +{ > >> + return -EOPNOTSUPP; > >> +} > >> + > >> +static void pds_vdpa_dev_del(struct vdpa_mgmt_dev *mdev, > >> + struct vdpa_device *vdpa_dev) > >> +{ > >> +} > >> + > >> +static const struct vdpa_mgmtdev_ops pds_vdpa_mgmt_dev_ops = { > >> + .dev_add = pds_vdpa_dev_add, > >> + .dev_del = pds_vdpa_dev_del > >> +}; > >> + > >> +int pds_v...
2020 May 12
1
[PATCH] ifcvf: move IRQ request/free to status change handlers
...+ >>> +??? return 0; >>> +} >>> + >>> ? static int ifcvf_start_datapath(void *private) >>> ? { >>> ????? struct ifcvf_hw *vf = ifcvf_private_to_vf(private); >>> @@ -118,9 +172,12 @@ static void ifcvf_vdpa_set_status(struct >>> vdpa_device *vdpa_dev, u8 status) >>> ? { >>> ????? struct ifcvf_adapter *adapter; >>> ????? struct ifcvf_hw *vf; >>> +??? u8 status_old; >>> +??? int ret; >>> ? ????? vf? = vdpa_to_vf(vdpa_dev); >>> ????? adapter = dev_get_drvdata(vdpa_dev->de...
2023 May 08
1
[PATCH V2 2/5] vDPA/ifcvf: get_driver_features from virtio registers
...vf_hw *hw); #endif /* _IFCVF_H_ */ diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index 1357c67014ab..4588484bd53d 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -410,7 +410,7 @@ static u64 ifcvf_vdpa_get_device_features(struct vdpa_device *vdpa_dev) u64 features; if (type == VIRTIO_ID_NET || type == VIRTIO_ID_BLOCK) - features = ifcvf_get_features(vf); + features = ifcvf_get_dev_features(vf); else { features = 0; IFCVF_ERR(pdev, "VIRTIO ID %u not supported\n", vf->dev_type); @@ -428,7 +428,7 @@ static i...
2020 Apr 09
2
[PATCH] vdpa: allow a 32 bit vq alignment
...changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index 28d9e5de5675..abf6a061cab6 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -226,7 +226,7 @@ static u32 ifcvf_vdpa_get_vendor_id(struct vdpa_device *vdpa_dev) return IFCVF_SUBSYS_VENDOR_ID; } -static u16 ifcvf_vdpa_get_vq_align(struct vdpa_device *vdpa_dev) +static u32 ifcvf_vdpa_get_vq_align(struct vdpa_device *vdpa_dev) { return IFCVF_QUEUE_ALIGNMENT; } diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim....
2023 Mar 31
2
[PATCH 2/5] get_driver_features from virito registers
...vf_hw *hw); #endif /* _IFCVF_H_ */ diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index 1357c67014ab..4588484bd53d 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -410,7 +410,7 @@ static u64 ifcvf_vdpa_get_device_features(struct vdpa_device *vdpa_dev) u64 features; if (type == VIRTIO_ID_NET || type == VIRTIO_ID_BLOCK) - features = ifcvf_get_features(vf); + features = ifcvf_get_dev_features(vf); else { features = 0; IFCVF_ERR(pdev, "VIRTIO ID %u not supported\n", vf->dev_type); @@ -428,7 +428,7 @@ static i...