summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/handle_tsc.c
diff options
context:
space:
mode:
authorHeinrich Kuhn <heinrich.kuhn@corigine.com>2021-08-18 16:58:46 +0200
committerLuc Provoost <luc.provoost@intel.com>2021-09-13 10:05:54 +0000
commitd87ea3dfce75c5993564a60cadb81bfa75f20c80 (patch)
tree70ac63b66466f5e636a8abcaf5e8c0e2b2363b35 /VNFs/DPPD-PROX/handle_tsc.c
parent8793304de2a9ec5035f632152b580ee6113b56f6 (diff)
Use mbuf dynfield1 array in Prox
The udata64 field in the rte_mbuf struct has been removed to make more space for the dynfield1 array. Prox used the udata64 field for various use cases. From DPDK v20.11 and beyond use the dynfield1 field in the rte_mbuf struct for the same functionality. Signed-off-by: Heinrich Kuhn <heinrich.kuhn@corigine.com> Signed-off-by: Simon Horman <simon.horman@corigine.com> Change-Id: I0c2ba2f24bf5649ae809a54a9b0f9d6bebdd7056
Diffstat (limited to 'VNFs/DPPD-PROX/handle_tsc.c')
-rw-r--r--VNFs/DPPD-PROX/handle_tsc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/handle_tsc.c b/VNFs/DPPD-PROX/handle_tsc.c
index 245fe7a2..da0afea7 100644
--- a/VNFs/DPPD-PROX/handle_tsc.c
+++ b/VNFs/DPPD-PROX/handle_tsc.c
@@ -31,7 +31,11 @@ static int handle_bulk_tsc(struct task_base *tbase, struct rte_mbuf **mbufs, uin
const uint64_t rx_tsc = rte_rdtsc();
for (uint16_t j = 0; j < n_pkts; ++j)
+#if RTE_VERSION >= RTE_VERSION_NUM(20,11,0,0)
+ memcpy(&mbufs[j]->dynfield1[0], &rx_tsc, sizeof(rx_tsc));
+#else
mbufs[j]->udata64 = rx_tsc;
+#endif
return task->base.tx_pkt(&task->base, mbufs, n_pkts, NULL);
}