DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xia, Chenbo" <chenbo.xia@intel.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>
Cc: "Liu, Changpeng" <changpeng.liu@intel.com>
Subject: Re: [dpdk-dev] [PATCH] vhost: rename driver callbacks struct
Date: Wed, 3 Nov 2021 08:16:46 +0000	[thread overview]
Message-ID: <SN6PR11MB35040942741F6318830526549C8C9@SN6PR11MB3504.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211102104748.57078-1-maxime.coquelin@redhat.com>

Hi Maxime,

> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Tuesday, November 2, 2021 6:48 PM
> To: dev@dpdk.org; Xia, Chenbo <chenbo.xia@intel.com>;
> david.marchand@redhat.com
> Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
> Subject: [PATCH] vhost: rename driver callbacks struct
> 
> 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>
> ---
>  doc/guides/rel_notes/deprecation.rst   | 3 ---
>  doc/guides/rel_notes/release_21_11.rst | 2 ++
>  drivers/net/vhost/rte_eth_vhost.c      | 2 +-
>  examples/vdpa/main.c                   | 2 +-
>  examples/vhost/main.c                  | 2 +-
>  examples/vhost_blk/vhost_blk.c         | 2 +-
>  examples/vhost_blk/vhost_blk.h         | 2 +-
>  examples/vhost_crypto/main.c           | 2 +-
>  lib/vhost/rte_vhost.h                  | 4 ++--
>  lib/vhost/socket.c                     | 6 +++---
>  lib/vhost/vhost.h                      | 4 ++--

Miss two in vhost_lib.rst :)

Testing issues reported in patchwork is expected as SPDK uses
this struct, so we can ignore it as SPDK will rename it when it
adapts to DPDK 21.11

With above fixed:

Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>


>  11 files changed, 15 insertions(+), 16 deletions(-)
> 
> diff --git a/doc/guides/rel_notes/deprecation.rst
> b/doc/guides/rel_notes/deprecation.rst
> index 4366015b01..a9e2433988 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -111,9 +111,6 @@ Deprecation Notices
>    ``rte_vhost_host_notifier_ctrl`` and ``rte_vdpa_relay_vring_used`` vDPA
>    driver interface will be marked as internal in DPDK v21.11.
> 
> -* vhost: rename ``struct vhost_device_ops`` to ``struct
> rte_vhost_device_ops``
> -  in DPDK v21.11.
> -
>  * vhost: The experimental tags of ``rte_vhost_driver_get_protocol_features``,
>    ``rte_vhost_driver_get_queue_num``, ``rte_vhost_crypto_create``,
>    ``rte_vhost_crypto_free``, ``rte_vhost_crypto_fetch_requests``,
> diff --git a/doc/guides/rel_notes/release_21_11.rst
> b/doc/guides/rel_notes/release_21_11.rst
> index 98d50a160b..dea038e3ac 100644
> --- a/doc/guides/rel_notes/release_21_11.rst
> +++ b/doc/guides/rel_notes/release_21_11.rst
> @@ -564,6 +564,8 @@ ABI Changes
> 
>  * eventdev: Re-arranged fields in ``rte_event_timer`` to remove holes.
> 
> +* vhost: rename ``struct vhost_device_ops`` to ``struct
> rte_vhost_device_ops``.
> +
> 
>  Known Issues
>  ------------
> diff --git a/drivers/net/vhost/rte_eth_vhost.c
> b/drivers/net/vhost/rte_eth_vhost.c
> index 8bb3b27d01..070f0e6dfd 100644
> --- a/drivers/net/vhost/rte_eth_vhost.c
> +++ b/drivers/net/vhost/rte_eth_vhost.c
> @@ -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,
> diff --git a/examples/vdpa/main.c b/examples/vdpa/main.c
> index 097a267b8c..5ab07655ae 100644
> --- a/examples/vdpa/main.c
> +++ b/examples/vdpa/main.c
> @@ -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,
>  };
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index 58e12aa710..8685dfd81b 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -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,
> diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
> index fe2b4e4803..feadacc62e 100644
> --- a/examples/vhost_blk/vhost_blk.c
> +++ b/examples/vhost_blk/vhost_blk.c
> @@ -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,
> diff --git a/examples/vhost_blk/vhost_blk.h b/examples/vhost_blk/vhost_blk.h
> index 540998eb1b..975f0b4065 100644
> --- a/examples/vhost_blk/vhost_blk.h
> +++ b/examples/vhost_blk/vhost_blk.h
> @@ -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);
> diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
> index dea7dcbd07..7d75623a5e 100644
> --- a/examples/vhost_crypto/main.c
> +++ b/examples/vhost_crypto/main.c
> @@ -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,
>  };
> diff --git a/lib/vhost/rte_vhost.h b/lib/vhost/rte_vhost.h
> index 6f0915b98f..af0afbcf60 100644
> --- a/lib/vhost/rte_vhost.h
> +++ b/lib/vhost/rte_vhost.h
> @@ -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);
> 
>  /**
>   *
> diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
> index c6548608a3..82963c1e6d 100644
> --- a/lib/vhost/socket.c
> +++ b/lib/vhost/socket.c
> @@ -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 @@ rte_vhost_driver_unregister(const char *path)
>   */
>  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;
> diff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h
> index 05ccc35f37..080c67ef99 100644
> --- a/lib/vhost/vhost.h
> +++ b/lib/vhost/vhost.h
> @@ -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.
> --
> 2.31.1


  reply	other threads:[~2021-11-03  8:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 10:47 Maxime Coquelin
2021-11-03  8:16 ` Xia, Chenbo [this message]
2021-11-03  8:36   ` David Marchand
2021-11-03  8:38     ` Maxime Coquelin
2021-11-03  9:52       ` Maxime Coquelin
2021-11-03 13:11         ` [dpdk-dev] [dpdklab] " Lincoln Lavoie
2021-11-03 13:16           ` Maxime Coquelin
2021-11-03 14:38             ` Lincoln Lavoie
2021-11-03  9:10     ` [dpdk-dev] " Xia, Chenbo
2021-11-04  2:48       ` Liu, Changpeng
2021-11-03 13:46 ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SN6PR11MB35040942741F6318830526549C8C9@SN6PR11MB3504.namprd11.prod.outlook.com \
    --to=chenbo.xia@intel.com \
    --cc=changpeng.liu@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).