diff options
author | Deepak S <deepak.s@linux.intel.com> | 2019-03-13 04:26:49 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2019-03-13 04:26:49 +0000 |
commit | 2a7b2ff862fb75e8e3b34b58eb09dd4de8a6a28d (patch) | |
tree | 9926423d5b50b101744fbb3773916f919d67a608 /VNFs/DPPD-PROX/rx_pkt.c | |
parent | 1adf5eb8c7cd3a4d65b17fddd569651fa3cbb853 (diff) | |
parent | 22d1e458389ae6c6eb98d9c14c4f1cd8e2009f3d (diff) |
Merge "PROX generator: performance optimization (2/4)"
Diffstat (limited to 'VNFs/DPPD-PROX/rx_pkt.c')
-rw-r--r-- | VNFs/DPPD-PROX/rx_pkt.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/VNFs/DPPD-PROX/rx_pkt.c b/VNFs/DPPD-PROX/rx_pkt.c index 2571b8a4..075069c8 100644 --- a/VNFs/DPPD-PROX/rx_pkt.c +++ b/VNFs/DPPD-PROX/rx_pkt.c @@ -508,36 +508,3 @@ uint16_t rx_pkt_tsc(struct task_base *tbase, struct rte_mbuf ***mbufs) return ret; } - -uint16_t rx_pkt_all(struct task_base *tbase, struct rte_mbuf ***mbufs) -{ - uint16_t tot = 0; - uint16_t ret = 0; - struct rte_mbuf **new_mbufs; - struct rte_mbuf **dst = tbase->aux->all_mbufs; - - /* In case we receive less than MAX_PKT_BURST packets in one - iteration, do no perform any copying of mbuf pointers. Use - the buffer itself instead. */ - ret = call_prev_rx_pkt(tbase, &new_mbufs); - if (ret < MAX_PKT_BURST/2) { - *mbufs = new_mbufs; - return ret; - } - - memcpy(dst + tot, new_mbufs, ret * sizeof(*dst)); - tot += ret; - *mbufs = dst; - - do { - ret = call_prev_rx_pkt(tbase, &new_mbufs); - memcpy(dst + tot, new_mbufs, ret * sizeof(*dst)); - tot += ret; - } while (ret == MAX_PKT_BURST/2 && tot < MAX_RX_PKT_ALL - MAX_PKT_BURST); - - if (tot >= MAX_RX_PKT_ALL - MAX_PKT_BURST) { - plog_err("Could not receive all packets - buffer full\n"); - } - - return tot; -} |