DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/virtio: enable packet data prefetch on x86
@ 2020-11-11 15:40 Marvin Liu
  2020-11-11 15:45 ` David Marchand
  2020-11-12  8:48 ` Maxime Coquelin
  0 siblings, 2 replies; 9+ messages in thread
From: Marvin Liu @ 2020-11-11 15:40 UTC (permalink / raw)
  To: maxime.coquelin, chenbo.xia; +Cc: dev, Marvin Liu

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.liu@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)
-- 
2.17.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-11-13 12:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11 15:40 [dpdk-dev] [PATCH] net/virtio: enable packet data prefetch on x86 Marvin Liu
2020-11-11 15:45 ` David Marchand
2020-11-11 15:53   ` Bruce Richardson
2020-11-11 15:56     ` David Marchand
2020-11-12  8:48 ` Maxime Coquelin
2020-11-12  8:57   ` David Marchand
2020-11-13  1:20     ` Liu, Yong
2020-11-13  7:27       ` David Marchand
2020-11-13 12:21         ` Liu, Yong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).