From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5B05AA0555; Thu, 9 Jun 2022 15:03:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4293540689; Thu, 9 Jun 2022 15:03:47 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id B739540220 for ; Thu, 9 Jun 2022 15:03:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654779825; 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=f8eFx/QZU3qGB1ar8QT0wC2NIXqdTsQoUQ31cNv9kEI=; b=XfvqFyl0jtP4wNYthQXPVr+BoMUTMvlkOFaCMC8jNUyNH1iIf4I5A8d3Nc2RuA0hEb69VS LEhWwLtCZtS1m8DNCej0zAo/sgEG8h2PfuHlWw27iVx7Q/AOC26LLHIPwpAhnnvJjhMvks osWuzGUyUFNUHifm0/enfwucSIZYLEU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-622-Hly_7zRmPuibWvh5QQ5qjg-1; Thu, 09 Jun 2022 09:03:39 -0400 X-MC-Unique: Hly_7zRmPuibWvh5QQ5qjg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6A93E801E67; Thu, 9 Jun 2022 13:03:39 +0000 (UTC) Received: from [10.39.208.20] (unknown [10.39.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1B7BC41047E8; Thu, 9 Jun 2022 13:03:37 +0000 (UTC) Message-ID: Date: Thu, 9 Jun 2022 15:03:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 To: Cheng Jiang , chenbo.xia@intel.com Cc: dev@dpdk.org, jiayu.hu@intel.com, xuan.ding@intel.com, wenwux.ma@intel.com, yuanx.wang@intel.com, yvonnex.yang@intel.com References: <20220407082549.3852-1-cheng1.jiang@intel.com> <20220530045633.21737-1-cheng1.jiang@intel.com> From: Maxime Coquelin Subject: Re: [RFC v3] add support for async vhost packed ring dequeue In-Reply-To: <20220530045633.21737-1-cheng1.jiang@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hi Cheng, On 5/30/22 06:56, Cheng Jiang wrote: > This RFC patch implements packed ring dequeue data path for asynchronous > vhost. Please remove RFC in the next revision. > Signed-off-by: Cheng Jiang > --- > lib/vhost/virtio_net.c | 217 ++++++++++++++++++++++++++++++++++++----- > 1 file changed, 191 insertions(+), 26 deletions(-) > > diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c ... > + > +static __rte_always_inline int > +virtio_dev_tx_async_single_packed(struct virtio_net *dev, > + struct vhost_virtqueue *vq, > + struct rte_mempool *mbuf_pool, > + struct rte_mbuf *pkts, > + uint16_t slot_idx, > + bool legacy_ol_flags) > +{ > + int err; > + uint16_t buf_id, desc_count = 0; > + uint16_t nr_vec = 0; > + uint32_t buf_len; > + struct buf_vector buf_vec[BUF_VECTOR_MAX]; > + static bool allocerr_warned; > + > + if (unlikely(fill_vec_buf_packed(dev, vq, vq->last_avail_idx, &desc_count, > + buf_vec, &nr_vec, &buf_id, &buf_len, > + VHOST_ACCESS_RO) < 0)) > + return -1; > + > + if (unlikely(virtio_dev_pktmbuf_prep(dev, pkts, buf_len))) { > + if (!allocerr_warned) { > + VHOST_LOG_DATA(ERR, "Failed mbuf alloc of size %d from %s on %s.\n", > + buf_len, mbuf_pool->name, dev->ifname); We have defined a common format for all Vhost logs to ease logs filtering: VHOST_LOG_DATA(ERR, "(%s) Failed mbuf alloc of size %d from %s.\n", dev->ifname, buf_len, mbuf_pool->name); Could you please fix it here and everywhere else in the patch? With above minor comments fixed, feel free to add: Reviewed-by: Maxime Coquelin Thanks, Maxime