rte_virtio: rename virtio_pci_ops to virtio_dev_ops
Removed another vtpci leftover. Change-Id: I3bcc200a07ff82adf824c4a5579644ec906e86da Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/385626 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
ec0b92faf2
commit
f7370b65bd
@ -268,7 +268,7 @@ virtio_negotiate_features(struct virtio_dev *dev, uint64_t req_features)
|
||||
}
|
||||
|
||||
struct virtio_dev *
|
||||
virtio_dev_construct(const struct virtio_pci_ops *ops, void *ctx)
|
||||
virtio_dev_construct(const struct virtio_dev_ops *ops, void *ctx)
|
||||
{
|
||||
struct virtio_dev *vdev;
|
||||
unsigned vdev_num;
|
||||
@ -695,7 +695,7 @@ virtio_dev_get_status(struct virtio_dev *dev)
|
||||
return virtio_dev_backend_ops(dev)->get_status(dev);
|
||||
}
|
||||
|
||||
const struct virtio_pci_ops *
|
||||
const struct virtio_dev_ops *
|
||||
virtio_dev_backend_ops(struct virtio_dev *dev)
|
||||
{
|
||||
return dev->backend_ops;
|
||||
|
@ -81,7 +81,7 @@
|
||||
/* Extra status define for readability */
|
||||
#define VIRTIO_CONFIG_S_RESET 0
|
||||
|
||||
struct virtio_pci_ops;
|
||||
struct virtio_dev_ops;
|
||||
|
||||
struct virtio_dev {
|
||||
struct virtqueue **vqs;
|
||||
@ -108,7 +108,7 @@ struct virtio_dev {
|
||||
pthread_mutex_t mutex;
|
||||
|
||||
/** Backend-specific callbacks. */
|
||||
const struct virtio_pci_ops *backend_ops;
|
||||
const struct virtio_dev_ops *backend_ops;
|
||||
|
||||
/** Context for the backend ops */
|
||||
void *ctx;
|
||||
@ -116,7 +116,7 @@ struct virtio_dev {
|
||||
TAILQ_ENTRY(virtio_dev) tailq;
|
||||
};
|
||||
|
||||
struct virtio_pci_ops {
|
||||
struct virtio_dev_ops {
|
||||
void (*read_dev_cfg)(struct virtio_dev *hw, size_t offset,
|
||||
void *dst, int len);
|
||||
void (*write_dev_cfg)(struct virtio_dev *hw, size_t offset,
|
||||
@ -247,7 +247,7 @@ int virtio_xmit_pkt(struct virtqueue *vq, struct virtio_req *req);
|
||||
* \param ops backend callbacks
|
||||
* \param ctx argument for the backend callbacks
|
||||
*/
|
||||
struct virtio_dev *virtio_dev_construct(const struct virtio_pci_ops *ops, void *ctx);
|
||||
struct virtio_dev *virtio_dev_construct(const struct virtio_dev_ops *ops, void *ctx);
|
||||
|
||||
int virtio_dev_init(struct virtio_dev *hw, uint64_t req_features);
|
||||
void virtio_dev_free(struct virtio_dev *dev);
|
||||
@ -411,7 +411,7 @@ void virtio_dev_read_dev_config(struct virtio_dev *vdev, size_t offset, void *ds
|
||||
*
|
||||
* \param vdev virtio device
|
||||
*/
|
||||
const struct virtio_pci_ops *virtio_dev_backend_ops(struct virtio_dev *vdev);
|
||||
const struct virtio_dev_ops *virtio_dev_backend_ops(struct virtio_dev *vdev);
|
||||
|
||||
/**
|
||||
* Check if the device has negotiated given feature bit.
|
||||
@ -455,6 +455,6 @@ struct virtio_dev *virtio_user_dev_init(const char *name, const char *path,
|
||||
uint16_t requested_queues,
|
||||
uint32_t queue_size, uint16_t fixed_queue_num);
|
||||
|
||||
extern const struct virtio_pci_ops virtio_user_ops;
|
||||
extern const struct virtio_dev_ops virtio_user_ops;
|
||||
|
||||
#endif /* SPDK_VIRTIO_H */
|
||||
|
@ -293,7 +293,7 @@ modern_notify_queue(struct virtio_dev *dev, struct virtqueue *vq)
|
||||
spdk_mmio_write_2(vq->notify_addr, vq->vq_queue_index);
|
||||
}
|
||||
|
||||
const struct virtio_pci_ops modern_ops = {
|
||||
const struct virtio_dev_ops modern_ops = {
|
||||
.read_dev_cfg = modern_read_dev_config,
|
||||
.write_dev_cfg = modern_write_dev_config,
|
||||
.get_status = modern_get_status,
|
||||
|
@ -439,7 +439,7 @@ virtio_user_dump_json_config(struct virtio_dev *vdev, struct spdk_json_write_ctx
|
||||
spdk_json_write_string(w, dev->path);
|
||||
}
|
||||
|
||||
const struct virtio_pci_ops virtio_user_ops = {
|
||||
const struct virtio_dev_ops virtio_user_ops = {
|
||||
.read_dev_cfg = virtio_user_read_dev_config,
|
||||
.write_dev_cfg = virtio_user_write_dev_config,
|
||||
.get_status = virtio_user_get_status,
|
||||
|
Loading…
Reference in New Issue
Block a user