Skip to content

Commit ca00a19

Browse files
dennisafakoolzz
authored andcommitted
Fix Deprecated DPDK Function in Speed Tester NF (#75)
The `rte_ctrlmbuf_data` function was removed in DPDK 18.05. This caused errors when attempting to compile the Speed Tester NF with pcap support enabled. Replaces the function with the `rte_pktmbuf_mtod` macro. Commit log: * Fixes deprecated rte function
1 parent f705b96 commit ca00a19

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/speed_tester/speed_tester.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ nf_setup(struct onvm_nf_info *nf_info) {
398398
pkt->data_len = header.caplen;
399399

400400
/* Copy the packet into the rte_mbuf data section */
401-
rte_memcpy(rte_ctrlmbuf_data(pkt), packet, header.caplen);
401+
rte_memcpy(rte_pktmbuf_mtod(pkt, char*), packet, header.caplen);
402402

403403
pmeta = onvm_get_pkt_meta(pkt);
404404
pmeta->destination = destination;

0 commit comments

Comments
 (0)