Skip to content

Commit

Permalink
Improve prefetching in handle_mirror
Browse files Browse the repository at this point in the history
Some of the prefetching code was commented out, which was wrong. The
prefetching is back in.

Change-Id: Id7e7f09bd62faa7b9faf3d677962a99ba2a71080
Signed-off-by: Luc Provoost <[email protected]>
  • Loading branch information
Luc Provoost committed Feb 10, 2021
1 parent b754186 commit 4ada3cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions VNFs/DPPD-PROX/handle_mirror.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ static int handle_mirror_bulk(struct task_base *tbase, struct rte_mbuf **mbufs,
rte_memcpy(mbufs2, mbufs, sizeof(mbufs[0]) * n_pkts);
/* prefetch for optimization */
prox_rte_ether_hdr * hdr[MAX_PKT_BURST];
//for (uint16_t i = 0; i < n_pkts; ++i) {
// PREFETCH0(mbufs2[i]);
//}
for (uint16_t j = 0; j < n_pkts; ++j) {
PREFETCH0(mbufs2[j]);
}
for (uint16_t j = 0; j < n_pkts; ++j) {
hdr[j] = rte_pktmbuf_mtod(mbufs2[j], prox_rte_ether_hdr *);
PREFETCH0(hdr[j]);
Expand Down

0 comments on commit 4ada3cb

Please sign in to comment.