rsanger / benchmark-dpdk

A testing tool to test the performance of packet capture in DPDK with different configurations
9 stars 6 forks source link

Build error with dpdk-2.1.0 #1

Open happyjanezj opened 8 years ago

happyjanezj commented 8 years ago

/home/ubuntu/benchmark-dpdk/main.c: In function 'per_packet': /home/ubuntu/benchmark-dpdk/main.c:90:5: error: 'struct rte_mbuf' has no member named 'pkt' pkt->pkt.pkt_len += ETHER_CRC_LEN; ^ /home/ubuntu/benchmark-dpdk/main.c:91:5: error: 'struct rte_mbuf' has no member named 'pkt' pkt->pkt.data_len += ETHER_CRC_LEN; ^ /home/ubuntu/benchmark-dpdk/main.c: At top level: /home/ubuntu/benchmark-dpdk/main.c:178:14: error: 'ETH_RSS_IPV4_UDP' undeclared here (not in a function) .rss_hf = ETH_RSS_IPV4_UDP | ETH_RSS_IPV6 | ETH_RSS_IPV4 | ETH_RSS_IPV4_TCP | ETH_RSS_IPV6_TCP | ETH_RSS_IPV6_UDP, ^ /home/ubuntu/benchmark-dpdk/main.c:178:63: error: 'ETH_RSS_IPV4_TCP' undeclared here (not in a function) .rss_hf = ETH_RSS_IPV4_UDP | ETH_RSS_IPV6 | ETH_RSS_IPV4 | ETH_RSS_IPV4_TCP | ETH_RSS_IPV6_TCP | ETH_RSS_IPV6_UDP, ^ /home/ubuntu/benchmark-dpdk/main.c:178:82: error: 'ETH_RSS_IPV6_TCP' undeclared here (not in a function) .rss_hf = ETH_RSS_IPV4_UDP | ETH_RSS_IPV6 | ETH_RSS_IPV4 | ETH_RSS_IPV4_TCP | ETH_RSS_IPV6_TCP | ETH_RSS_IPV6_UDP, ^ /home/ubuntu/benchmark-dpdk/main.c:178:101: error: 'ETH_RSS_IPV6_UDP' undeclared here (not in a function) .rss_hf = ETH_RSS_IPV4_UDP | ETH_RSS_IPV6 | ETH_RSS_IPV4 | ETH_RSS_IPV4_TCP | ETH_RSS_IPV6_TCP | ETH_RSS_IPV6_UDP, ^ make[1]: * [main.o] Error 1 make: * [all] Error 2

rsanger commented 8 years ago

I think I last had this running with DPDK 1.7 or 1.8, since then a couple of things have changed in DPDK. I'm not actively maintaining this.

I think the pkt->pkt.pkt_len can be replaced with rte_pktmbuf_pkt_len(pkt) and pkt->pkt.data_len with rte_pktmbuf_data_len(pkt).

I don't know where the other stuff has moved to.

But, if you fix these error and submit a pull request, I'll accept it.