Hi,

> -----Original Message-----
> From: Ma, WenwuX <[email protected]>
> Sent: Tuesday, September 7, 2021 4:49 AM
> To: [email protected]
> Cc: [email protected]; Xia, Chenbo <[email protected]>; Jiang,
> Cheng1 <[email protected]>; Hu, Jiayu <[email protected]>; Pai G, Sunil
> <[email protected]>; Yang, YvonneX <[email protected]>; Ma, WenwuX
> <[email protected]>
> Subject: [PATCH 2/4] examples/vhost: refactor vhost enqueue and dequeue
> datapaths
> 
> Previously, by judging the flag, we call different enqueue/dequeue
> functions in data path.
> 
> Now, we use an ops that was initialized when Vhost was created,
> so that we can call ops directly in Vhost data path without any more
> flag judgment.
> 
> Signed-off-by: Wenwu Ma <[email protected]>
> Reviewed-by: Maxime Coquelin <[email protected]>
> ---
>  examples/vhost/main.c       | 100 +++++++++++++++++++++---------------
>  examples/vhost/main.h       |  31 +++++++++--
>  examples/vhost/virtio_net.c |  16 +++++-
>  3 files changed, 101 insertions(+), 46 deletions(-)
> 
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index a4a8214e05..e246b640ea 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -106,6 +106,8 @@ static uint32_t burst_rx_retry_num = BURST_RX_RETRIES;
>  static char *socket_files;

[...]

> 
> @@ -87,7 +100,19 @@ void vs_vhost_net_remove(struct vhost_dev *dev);
>  uint16_t vs_enqueue_pkts(struct vhost_dev *dev, uint16_t queue_id,
>                        struct rte_mbuf **pkts, uint32_t count);
> 
> -uint16_t vs_dequeue_pkts(struct vhost_dev *dev, uint16_t queue_id,
> -                      struct rte_mempool *mbuf_pool,
> -                      struct rte_mbuf **pkts, uint16_t count);
> +uint16_t builtin_enqueue_pkts(struct vhost_dev *dev, uint16_t queue_id,
> +                     struct rte_mbuf **pkts, uint32_t count);
> +uint16_t builtin_dequeue_pkts(struct vhost_dev *dev, uint16_t queue_id,
> +                     struct rte_mempool *mbuf_pool,
> +                     struct rte_mbuf **pkts, uint16_t count);
> +uint16_t sync_enqueue_pkts(struct vhost_dev *dev, uint16_t queue_id,
> +                      struct rte_mbuf **pkts, uint32_t count);
> +uint16_t sync_dequeue_pkts(struct vhost_dev *dev, uint16_t queue_id,
> +                     struct rte_mempool *mbuf_pool,
> +                     struct rte_mbuf **pkts, uint16_t count);
> +uint16_t async_enqueue_pkts(struct vhost_dev *dev, uint16_t queue_id,
> +                      struct rte_mbuf **pkts, uint32_t count);
> +uint16_t async_dequeue_pkts(struct vhost_dev *dev, uint16_t queue_id,
> +                     struct rte_mempool *mbuf_pool,
> +                     struct rte_mbuf **pkts, uint16_t count);

This func is defined in the 4th. So please remove it here.

Thanks,
Chenbo

Reply via email to