DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Jiayu Hu <jiayu.hu@intel.com>, dev@dpdk.org
Cc: chenbo.xia@intel.com, cheng1.jiang@intel.com, yinan.wang@intel.com
Subject: Re: [dpdk-dev] [PATCH v4 1/2] vhost: cleanup async enqueue
Date: Mon, 11 Jan 2021 15:04:52 +0100	[thread overview]
Message-ID: <86f78cef-8707-c002-9044-a2a74040263b@redhat.com> (raw)
In-Reply-To: <983b5780-5bb9-eb40-7578-f446c220d7de@redhat.com>



On 1/11/21 12:04 PM, Maxime Coquelin wrote:
> 
> 
> On 1/11/21 1:16 PM, Jiayu Hu wrote:
>> This patch removes unnecessary check and function calls, and it changes
>> appropriate types for internal variables and fixes typos.
>>
>> Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
>> Tested-by: Yinan Wang <yinan.wang@intel.com>
>> ---
>>  lib/librte_vhost/rte_vhost_async.h |  8 ++++----
>>  lib/librte_vhost/virtio_net.c      | 16 ++++++++--------
>>  2 files changed, 12 insertions(+), 12 deletions(-)
>>
>> diff --git a/lib/librte_vhost/rte_vhost_async.h b/lib/librte_vhost/rte_vhost_async.h
>> index c73bd7c..03bd558 100644
>> --- a/lib/librte_vhost/rte_vhost_async.h
>> +++ b/lib/librte_vhost/rte_vhost_async.h
>> @@ -112,7 +112,7 @@ struct rte_vhost_async_features {
>>  };
>>  
>>  /**
>> - * register a async channel for vhost
>> + * register an async channel for vhost
>>   *
>>   * @param vid
>>   *  vhost device id async channel to be attached to
>> @@ -147,8 +147,8 @@ __rte_experimental
>>  int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id);
>>  
>>  /**
>> - * This function submit enqueue data to async engine. This function has
>> - * no guranttee to the transfer completion upon return. Applications
>> + * This function submits enqueue data to async engine. This function has
>> + * no guarantee to the transfer completion upon return. Applications
>>   * should poll transfer status by rte_vhost_poll_enqueue_completed()
>>   *
>>   * @param vid
>> @@ -167,7 +167,7 @@ uint16_t rte_vhost_submit_enqueue_burst(int vid, uint16_t queue_id,
>>  		struct rte_mbuf **pkts, uint16_t count);
>>  
>>  /**
>> - * This function check async completion status for a specific vhost
>> + * This function checks async completion status for a specific vhost
>>   * device queue. Packets which finish copying (enqueue) operation
>>   * will be returned in an array.
>>   *
>> diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
>> index fec08b2..0b63940 100644
>> --- a/lib/librte_vhost/virtio_net.c
>> +++ b/lib/librte_vhost/virtio_net.c
>> @@ -1130,8 +1130,11 @@ async_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,
>>  	}
>>  
>>  out:
>> -	async_fill_iter(src_it, tlen, src_iovec, tvec_idx);
>> -	async_fill_iter(dst_it, tlen, dst_iovec, tvec_idx);
>> +	if (tlen) {
>> +		async_fill_iter(src_it, tlen, src_iovec, tvec_idx);
>> +		async_fill_iter(dst_it, tlen, dst_iovec, tvec_idx);
>> +	} else
>> +		src_it->count = 0;
> 
> Minor comment, you need braces for the 'else' as there are braces for
> the 'if'.
> 
> 
> I will fix while applying.

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

> Thanks,
> Maxime
> 


  reply	other threads:[~2021-01-11 14:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11  9:21 [dpdk-dev] [PATCH 0/2] Enhance Async Enqueue for Small Packets Jiayu Hu
2020-12-11  9:21 ` [dpdk-dev] [PATCH 1/2] vhost: cleanup async enqueue Jiayu Hu
2020-12-11  9:21 ` [dpdk-dev] [PATCH 2/2] vhost: enhance async enqueue for small packets Jiayu Hu
2020-12-22  9:46 ` [dpdk-dev] [Patch v2 0/2] Enhance Async Enqueue for Small Packets Jiayu Hu
2020-12-22  9:46   ` [dpdk-dev] [Patch v2 1/2] vhost: cleanup async enqueue Jiayu Hu
2020-12-22  9:46   ` [dpdk-dev] [Patch v2 2/2] vhost: enhance async enqueue for small packets Jiayu Hu
2020-12-25  8:28   ` [dpdk-dev] [PATCH v3 0/2] Enhance Async Enqueue for Small Packets Jiayu Hu
2020-12-25  8:28     ` [dpdk-dev] [PATCH v3 1/2] vhost: cleanup async enqueue Jiayu Hu
2020-12-25  8:28     ` [dpdk-dev] [PATCH v3 2/2] vhost: enhance async enqueue for small packets Jiayu Hu
2021-01-05 11:41     ` [dpdk-dev] [PATCH v3 0/2] Enhance Async Enqueue for Small Packets Wang, Yinan
2021-01-07 10:45     ` Maxime Coquelin
2021-01-11 12:16     ` [dpdk-dev] [PATCH v4 " Jiayu Hu
2021-01-11 12:16       ` [dpdk-dev] [PATCH v4 1/2] vhost: cleanup async enqueue Jiayu Hu
2021-01-11 11:04         ` Maxime Coquelin
2021-01-11 14:04           ` Maxime Coquelin [this message]
2021-01-11 12:16       ` [dpdk-dev] [PATCH v4 2/2] vhost: enhance async enqueue for small packets Jiayu Hu
2021-01-11 12:44         ` Maxime Coquelin
2021-01-11 15:02       ` [dpdk-dev] [PATCH v4 0/2] Enhance Async Enqueue for Small Packets 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=86f78cef-8707-c002-9044-a2a74040263b@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=cheng1.jiang@intel.com \
    --cc=dev@dpdk.org \
    --cc=jiayu.hu@intel.com \
    --cc=yinan.wang@intel.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).