From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6DAEFC636CC for ; Tue, 7 Feb 2023 10:12:11 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CC95410DF; Tue, 7 Feb 2023 11:12:10 +0100 (CET) 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 7E9AB40042 for ; Tue, 7 Feb 2023 11:12:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675764729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2lrFl1YMx1x6ke8nqbR8RqaZWt2P8GrOM3aXZNp3ZGY=; b=IfGQT7rG6lxFI9dpoXOl1lnqgq/t4Oti2+6W1YGU6WCtkJH2PppHUokrGqrqHYMzTXVE/I j2It/AYiXN69c6+MXWSx2Ecs1rpM5Lb5zI+wOloXJyE6yQhZrQ071Xg4HStB8nw2UIV5nf Fz69Dvrjido6UoaugK+n0QNsHhXZOuk= 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-216-sFG4w-OaMgufJE2r3zqzIQ-1; Tue, 07 Feb 2023 05:12:06 -0500 X-MC-Unique: sFG4w-OaMgufJE2r3zqzIQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A3BAF811E9C; Tue, 7 Feb 2023 10:12:05 +0000 (UTC) Received: from [10.39.208.26] (unknown [10.39.208.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BEC742166B2B; Tue, 7 Feb 2023 10:12:04 +0000 (UTC) Message-ID: <3f4d5e89-b2fb-5f2e-4b0d-e108d6f9b3a4@redhat.com> Date: Tue, 7 Feb 2023 11:12:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v1 10/21] net/virtio: alloc Rx SW ring only if vectorized path To: "Xia, Chenbo" , "dev@dpdk.org" , "david.marchand@redhat.com" , "eperezma@redhat.com" References: <20221130155639.150553-1-maxime.coquelin@redhat.com> <20221130155639.150553-11-maxime.coquelin@redhat.com> From: Maxime Coquelin In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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 On 1/30/23 08:49, Xia, Chenbo wrote: > Hi Maxime, > >> -----Original Message----- >> From: Maxime Coquelin >> Sent: Wednesday, November 30, 2022 11:56 PM >> To: dev@dpdk.org; Xia, Chenbo ; >> david.marchand@redhat.com; eperezma@redhat.com >> Cc: Maxime Coquelin >> Subject: [PATCH v1 10/21] net/virtio: alloc Rx SW ring only if vectorized >> path >> >> This patch only allocates the SW ring when vectorized >> datapath is used. It also moves the SW ring and fake mbuf >> in the virtnet_rx struct since this is Rx-only. >> >> Signed-off-by: Maxime Coquelin >> --- >> drivers/net/virtio/virtio_ethdev.c | 88 ++++++++++++------- >> drivers/net/virtio/virtio_rxtx.c | 8 +- >> drivers/net/virtio/virtio_rxtx.h | 4 +- >> drivers/net/virtio/virtio_rxtx_simple.h | 2 +- >> .../net/virtio/virtio_rxtx_simple_altivec.c | 4 +- >> drivers/net/virtio/virtio_rxtx_simple_neon.c | 4 +- >> drivers/net/virtio/virtio_rxtx_simple_sse.c | 4 +- >> drivers/net/virtio/virtqueue.c | 6 +- >> drivers/net/virtio/virtqueue.h | 1 - >> 9 files changed, 72 insertions(+), 49 deletions(-) >> >> --- a/drivers/net/virtio/virtio_rxtx_simple_altivec.c >> +++ b/drivers/net/virtio/virtio_rxtx_simple_altivec.c >> @@ -103,8 +103,8 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf >> **rx_pkts, >> >> desc_idx = (uint16_t)(vq->vq_used_cons_idx & (vq->vq_nentries - 1)); >> rused = &vq->vq_split.ring.used->ring[desc_idx]; >> - sw_ring = &vq->sw_ring[desc_idx]; >> - sw_ring_end = &vq->sw_ring[vq->vq_nentries]; >> + sw_ring = &vq->rxq.sw_ring[desc_idx]; > > After sw_ring, there are two spaces, should be only one. Right, it was here before but I fixed it in v2 here and elsewhere. Thanks, Maxime