> -----Original Message----- > From: David Marchand <david.march...@redhat.com> > Sent: Thursday, November 12, 2020 4:58 PM > To: Liu, Yong <yong....@intel.com>; Maxime Coquelin > <maxime.coque...@redhat.com> > Cc: Xia, Chenbo <chenbo....@intel.com>; dev <dev@dpdk.org>; Richardson, > Bruce <bruce.richard...@intel.com> > Subject: Re: [dpdk-dev] [PATCH] net/virtio: enable packet data prefetch on > x86 > > On Thu, Nov 12, 2020 at 9:48 AM Maxime Coquelin > <maxime.coque...@redhat.com> wrote: > > 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 <yong....@intel.com> > > > > > > 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. > > Yes and this will also solve https://patchwork.dpdk.org/patch/83468/. > Thanks. >
Agreed, original patch was intended to recover prefetch configuration in meson build. Please check http://patchwork.dpdk.org/patch/78451/. And it leaded a discussion about how to utilize prefetch function optimally. Due to no conclusion for current position is best for other platforms except x86, now only enable prefetch in virtio + x86. > -- > David Marchand