From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 176E7A0527; Mon, 9 Nov 2020 17:32:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E9AC76A6F; Mon, 9 Nov 2020 17:32:30 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id B58DC5F13 for ; Mon, 9 Nov 2020 17:32:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604939547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G8FmtNGkfmruO7xitBw1xY6jhzbzReBRZF/GHe4vsxI=; b=a0Q1okCV8msXw/ZP1077+h/yTiYO8y4xBebugxO7+8dIe6Zstw2r/7psAsqSzoibzY06w0 nBy5ZlV9kwIeeKxZ2VCZ2akMCWgqDYcxA6LmD2UBQXBL62QNIT0Y1nHfUYX3mf1Ox0Udbz OW04bewhbw32+b9VlINpgxJ58GKOVug= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-411-D1Lv_FgnN6yqpHmnpX2lZQ-1; Mon, 09 Nov 2020 11:32:23 -0500 X-MC-Unique: D1Lv_FgnN6yqpHmnpX2lZQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C01478C8980; Mon, 9 Nov 2020 16:32:21 +0000 (UTC) Received: from [10.36.110.32] (unknown [10.36.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 54A5460BF1; Mon, 9 Nov 2020 16:32:20 +0000 (UTC) To: Patrick Fu , dev@dpdk.org, chenbo.xia@intel.com Cc: jiayu.hu@intel.com References: <20201103053501.2805-1-patrick.fu@intel.com> From: Maxime Coquelin Message-ID: <9571d2b2-48be-f528-1a2a-18ae204711b2@redhat.com> Date: Mon, 9 Nov 2020 17:32:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201103053501.2805-1-patrick.fu@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v1] vhost: fix async inflight packet counter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 11/3/20 6:35 AM, Patrick Fu wrote: > Async inflight packet counter should take failed packets into account. > Failed packets will be deducted in the error handling logic. > > Fixes: 6b3c81db8bb7 ("vhost: simplify async copy completion") > Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring") > > Signed-off-by: Patrick Fu > --- > lib/librte_vhost/virtio_net.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c > index 10dec5e54..6c5128665 100644 > --- a/lib/librte_vhost/virtio_net.c > +++ b/lib/librte_vhost/virtio_net.c > @@ -1567,7 +1567,7 @@ virtio_dev_rx_async_submit_split(struct virtio_net *dev, > src_it = it_pool; > dst_it = it_pool + 1; > segs_await = 0; > - vq->async_pkts_inflight_n += n_pkts; > + vq->async_pkts_inflight_n += pkt_burst_idx; > > if (unlikely(n_pkts < (int)pkt_burst_idx)) { > /* > @@ -1587,7 +1587,7 @@ virtio_dev_rx_async_submit_split(struct virtio_net *dev, > if (pkt_burst_idx) { > n_pkts = vq->async_ops.transfer_data(dev->vid, > queue_id, tdes, 0, pkt_burst_idx); > - vq->async_pkts_inflight_n += n_pkts; > + vq->async_pkts_inflight_n += pkt_burst_idx; > > if (unlikely(n_pkts < (int)pkt_burst_idx)) > pkt_err = pkt_burst_idx - n_pkts; > Applied to dpdk-next-virtio/main. Thanks, Maxime