]> git.droids-corp.org - dpdk.git/commitdiff
vhost: rename driver callbacks struct
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Tue, 2 Nov 2021 10:47:48 +0000 (11:47 +0100)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Wed, 3 Nov 2021 10:59:27 +0000 (11:59 +0100)
As previously announced, this patch renames struct
vhost_device_ops to struct rte_vhost_device_ops.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
12 files changed:
doc/guides/prog_guide/vhost_lib.rst
doc/guides/rel_notes/deprecation.rst
doc/guides/rel_notes/release_21_11.rst
drivers/net/vhost/rte_eth_vhost.c
examples/vdpa/main.c
examples/vhost/main.c
examples/vhost_blk/vhost_blk.c
examples/vhost_blk/vhost_blk.h
examples/vhost_crypto/main.c
lib/vhost/rte_vhost.h
lib/vhost/socket.c
lib/vhost/vhost.h

index 171e0096f6d4ca44de6f122cc12ec173ff47a6f4..76f5d303c9df4d352e0decd1b478b4d958efa3e5 100644 (file)
@@ -255,7 +255,7 @@ The following is an overview of some key Vhost API functions:
   performing any locking.
 
   This function is only safe to call in vhost callback functions
-  (i.e., struct vhost_device_ops).
+  (i.e., struct rte_vhost_device_ops).
 
 * ``rte_vhost_async_channel_unregister(vid, queue_id)``
 
@@ -275,7 +275,7 @@ The following is an overview of some key Vhost API functions:
   performing any locking.
 
   This function is only safe to call in vhost callback functions
-  (i.e., struct vhost_device_ops).
+  (i.e., struct rte_vhost_device_ops).
 
 * ``rte_vhost_submit_enqueue_burst(vid, queue_id, pkts, count, comp_pkts, comp_count)``
 
index 03a1d4f98323520ef4cb443d873ba86f64edf41a..48ffb3db1b774c3f0fa832b8f070806386996a5c 100644 (file)
@@ -104,9 +104,6 @@ Deprecation Notices
   is deprecated as ambiguous with respect to the embedded switch. The use of
   these attributes will become invalid starting from DPDK 22.11.
 
-* vhost: rename ``struct vhost_device_ops`` to ``struct rte_vhost_device_ops``
-  in DPDK v21.11.
-
 * cryptodev: Hide structures ``rte_cryptodev_sym_session`` and
   ``rte_cryptodev_asym_session`` to remove unnecessary indirection between
   session and the private data of session. An opaque pointer can be exposed
index 814ecac3ed951e6bf237930dcda4d7b1eab82bc3..c98a7e92191ac5063e6979afc90087bc532d4797 100644 (file)
@@ -529,6 +529,8 @@ ABI Changes
   to be transparent for both users (no changes in user app is required) and
   PMD developers (no changes in PMD is required).
 
+* vhost: rename ``struct vhost_device_ops`` to ``struct rte_vhost_device_ops``.
+
 * cryptodev: Made ``rte_cryptodev``, ``rte_cryptodev_data`` private
   structures internal to DPDK. ``rte_cryptodevs`` can't be accessed directly
   by user any more. While it is an ABI breakage, this change is intended
index 8bb3b27d01d9d00eac60e7275c5de337d59311bb..070f0e6dfd5387daef042787c56d73125fd027a5 100644 (file)
@@ -975,7 +975,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
        return 0;
 }
 
-static struct vhost_device_ops vhost_ops = {
+static struct rte_vhost_device_ops vhost_ops = {
        .new_device          = new_device,
        .destroy_device      = destroy_device,
        .vring_state_changed = vring_state_changed,
index 097a267b8cb16d48ccf663088cc3f058bf218af9..5ab07655aed962674b8e46b1863fb7327a251858 100644 (file)
@@ -153,7 +153,7 @@ destroy_device(int vid)
        }
 }
 
-static const struct vhost_device_ops vdpa_sample_devops = {
+static const struct rte_vhost_device_ops vdpa_sample_devops = {
        .new_device = new_device,
        .destroy_device = destroy_device,
 };
index 58e12aa7108553930e8db25b5610297cf736cc8a..8685dfd81b1dbf46fc49a95a845f2b2e435229b3 100644 (file)
@@ -1519,7 +1519,7 @@ vring_state_changed(int vid, uint16_t queue_id, int enable)
  * These callback allow devices to be added to the data core when configuration
  * has been fully complete.
  */
-static const struct vhost_device_ops virtio_net_device_ops =
+static const struct rte_vhost_device_ops virtio_net_device_ops =
 {
        .new_device =  new_device,
        .destroy_device = destroy_device,
index fe2b4e480373ad3646e82d3d09110d3499e42846..feadacc62ee5ad167214e5192400c349f29c699c 100644 (file)
@@ -753,7 +753,7 @@ new_connection(int vid)
        return 0;
 }
 
-struct vhost_device_ops vhost_blk_device_ops = {
+struct rte_vhost_device_ops vhost_blk_device_ops = {
        .new_device =  new_device,
        .destroy_device = destroy_device,
        .new_connection = new_connection,
index 540998eb1bef20fe06d192b9025f50819dd4cec0..975f0b4065a1d3c5280c93a4459d36be1c78e81a 100644 (file)
@@ -104,7 +104,7 @@ struct vhost_blk_task {
 };
 
 extern struct vhost_blk_ctrlr *g_vhost_ctrlr;
-extern struct vhost_device_ops vhost_blk_device_ops;
+extern struct rte_vhost_device_ops vhost_blk_device_ops;
 
 int vhost_bdev_process_blk_commands(struct vhost_block_dev *bdev,
                                     struct vhost_blk_task *task);
index dea7dcbd0771b8031fc29e828fbb2ce7de6fe71c..7d75623a5eb3cd19f419ee1bd563985ba28e936c 100644 (file)
@@ -363,7 +363,7 @@ destroy_device(int vid)
        RTE_LOG(INFO, USER1, "Vhost Crypto Device %i Removed\n", vid);
 }
 
-static const struct vhost_device_ops virtio_crypto_device_ops = {
+static const struct rte_vhost_device_ops virtio_crypto_device_ops = {
        .new_device =  new_device,
        .destroy_device = destroy_device,
 };
index 6f0915b98fca2619b92ac06367b2310a40d993ee..af0afbcf60e066bc04bc4a8c0f2f7484adadbb6e 100644 (file)
@@ -264,7 +264,7 @@ struct rte_vhost_user_extern_ops {
 /**
  * Device and vring operations.
  */
-struct vhost_device_ops {
+struct rte_vhost_device_ops {
        int (*new_device)(int vid);             /**< Add device. */
        void (*destroy_device)(int vid);        /**< Remove device. */
 
@@ -606,7 +606,7 @@ rte_vhost_get_negotiated_protocol_features(int vid,
 
 /* Register callbacks. */
 int rte_vhost_driver_callback_register(const char *path,
-       struct vhost_device_ops const * const ops);
+       struct rte_vhost_device_ops const * const ops);
 
 /**
  *
index c6548608a33b792e5d339dd389456a785905a126..82963c1e6d20f1cda1bca58dc876e58bc0a3e87f 100644 (file)
@@ -58,7 +58,7 @@ struct vhost_user_socket {
 
        struct rte_vdpa_device *vdpa_dev;
 
-       struct vhost_device_ops const *notify_ops;
+       struct rte_vhost_device_ops const *notify_ops;
 };
 
 struct vhost_user_connection {
@@ -1093,7 +1093,7 @@ again:
  */
 int
 rte_vhost_driver_callback_register(const char *path,
-       struct vhost_device_ops const * const ops)
+       struct rte_vhost_device_ops const * const ops)
 {
        struct vhost_user_socket *vsocket;
 
@@ -1106,7 +1106,7 @@ rte_vhost_driver_callback_register(const char *path,
        return vsocket ? 0 : -1;
 }
 
-struct vhost_device_ops const *
+struct rte_vhost_device_ops const *
 vhost_driver_callback_get(const char *path)
 {
        struct vhost_user_socket *vsocket;
index c07219296ddd404ce7a4242a69e0565dc848e184..7085e0885ca17af609b1955466c82c4d649a7a1c 100644 (file)
@@ -394,7 +394,7 @@ struct virtio_net {
        uint16_t                mtu;
        uint8_t                 status;
 
-       struct vhost_device_ops const *notify_ops;
+       struct rte_vhost_device_ops const *notify_ops;
 
        uint32_t                nr_guest_pages;
        uint32_t                max_guest_pages;
@@ -702,7 +702,7 @@ void vhost_enable_linearbuf(int vid);
 int vhost_enable_guest_notification(struct virtio_net *dev,
                struct vhost_virtqueue *vq, int enable);
 
-struct vhost_device_ops const *vhost_driver_callback_get(const char *path);
+struct rte_vhost_device_ops const *vhost_driver_callback_get(const char *path);
 
 /*
  * Backend-specific cleanup.