aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Kiss <zoltan.kiss@linaro.org>2015-10-22 18:10:27 +0100
committerZoltan Kiss <zoltan.kiss@linaro.org>2016-04-05 17:57:39 +0100
commit8f98714b1bd818aaf97da0dfc338d963f3aec143 (patch)
tree5387ddc5d5ddbd09c4b083cc253156d4f04de8bb
parent0af1affc900873b81e134d90a6d7f9d9670cb303 (diff)
downloadodp-ovs-8f98714b1bd818aaf97da0dfc338d963f3aec143.tar.gz
netdev-odp: prefetch packet header immediatelyODP_1.8
Since "dpif-netdev: move header prefetch earlier into the receive function" emc_processing doesn't do that, it has to be done right after receive. Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
-rw-r--r--lib/netdev-odp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/netdev-odp.c b/lib/netdev-odp.c
index 09405b781..d29147056 100644
--- a/lib/netdev-odp.c
+++ b/lib/netdev-odp.c
@@ -620,8 +620,10 @@ netdev_odp_rxq_recv(struct netdev_rxq *rxq_, struct dp_packet **packets,
/* Build the array of dp_packet pointers */
for (i = 0; i < pkts; i++) {
packets[i] = (struct dp_packet*) odp_packet_user_area(pkt_tbl[i]);
- OVS_PREFETCH(packets[i]);
+ ovs_prefetch_range((void*)packets[i], offsetof(struct dp_packet, md) + offsetof(struct pkt_metadata, tunnel.ip_src));
+ OVS_PREFETCH(odp_packet_data(pkt_tbl[i]));
}
+
for (i = 0; i < pkts; i++) {
packets[i]->odp_pkt = pkt_tbl[i];
dp_packet_init_odp(packets[i], SHM_PKT_POOL_BUF_SIZE);