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 0EE45A09D3; Thu, 12 Nov 2020 09:48:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4C2125953; Thu, 12 Nov 2020 09:48:19 +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 05DB6593A for ; Thu, 12 Nov 2020 09:48:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605170895; 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=9jH+liU00pLrR8mBiSxj01GS5MxBuoBCbOrG3CJ84H0=; b=NqGHfl81Vs377xb3Me36gokL1ZSEiw7ZxX4vDgir2wM/+zT6Qx+bO0XsUtBcipTwKcAL41 JonnVt/oaFb2mK91u/btQwwYLXfy4V17F0i5bouqxdeJYHP7citoZqoyFnuop3YwxGvwmR UYLD1zizh0jhvp28TXedvTgMirg33h8= 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-169-CZevwAcUMru6hzzWLG7W6Q-1; Thu, 12 Nov 2020 03:48:10 -0500 X-MC-Unique: CZevwAcUMru6hzzWLG7W6Q-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 406A01007477; Thu, 12 Nov 2020 08:48:09 +0000 (UTC) Received: from [10.36.110.32] (unknown [10.36.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3810C2CE03; Thu, 12 Nov 2020 08:48:07 +0000 (UTC) To: Marvin Liu , chenbo.xia@intel.com Cc: dev@dpdk.org, "Richardson, Bruce" References: <20201111154007.13426-1-yong.liu@intel.com> From: Maxime Coquelin Message-ID: Date: Thu, 12 Nov 2020 09:48:06 +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: <20201111154007.13426-1-yong.liu@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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: 8bit Subject: Re: [dpdk-dev] [PATCH] net/virtio: enable packet data prefetch on x86 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" Hi Marvin, On 11/11/20 4:40 PM, Marvin Liu wrote: > Data prefetch instruction can preload data into cpu’s hierarchical > cache before data access. Virtio datapath utilized this feature for > data access acceleration. As config RTE_PMD_PACKET_PREFETCH was > discarded, now packet data prefetch is enabled based on architecture. > > Signed-off-by: Marvin Liu > > diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h > index 42c4c9882..0196290a5 100644 > --- a/drivers/net/virtio/virtqueue.h > +++ b/drivers/net/virtio/virtqueue.h > @@ -106,7 +106,7 @@ virtqueue_store_flags_packed(struct vring_packed_desc *dp, > dp->flags = flags; > } > } > -#ifdef RTE_PMD_PACKET_PREFETCH > +#if defined(RTE_ARCH_X86) > #define rte_packet_prefetch(p) rte_prefetch1(p) > #else > #define rte_packet_prefetch(p) do {} while(0) > Thanks for catching this issue. I agree it should be re-enabled by default, and not only on X86, not only on Virtio PMD. AFAICS, prefetch was enabled for all platforms before the switch to Meson, so I see it as an involuntary change that needs to be reverted. Then, I think having a possibility to disable it would be nice, so maybe we should add an option in our build system to do that. Thanks, Maxime