pktgen编译问题

pktgen不再放在dpdk的源码包中,最为单独的应用列出来开发,

因此pktgen不同的版本,根本不知道需要哪个版本的dpdk才能正确编译;

-------------error 1---dpdk19.08.0-rc0----------------------------------

pktgen-3.7.0]# make
== lib
== common
  CC _strings.o
rte_strtrimset is flagged as experimental
but is not listed in version map
Please add rte_strtrimset to the version map
rte_strtrim is flagged as experimental
but is not listed in version map
Please add rte_strtrim to the version map
rte_strtok is flagged as experimental
but is not listed in version map
Please add rte_strtok to the version map
rte_strqtok is flagged as experimental
but is not listed in version map
Please add rte_strqtok to the version map
rte_stropt is flagged as experimental
but is not listed in version map
Please add rte_stropt to the version map
rte_parse_corelist is flagged as experimental
but is not listed in version map
Please add rte_parse_corelist to the version map
make[3]: *** [_strings.o] Error 1
make[2]: *** [all] Error 2
make[1]: *** [common] Error 2
make: *** [lib] Error 2

-------------error 2---dpdk19.05----------------------------------

pktgen-3.7.0]# make
== lib
== common
  SYMLINK-FILE include/cksum.h
  SYMLINK-FILE include/copyright_info.h
  SYMLINK-FILE include/core_info.h
  SYMLINK-FILE include/coremap.h
  SYMLINK-FILE include/cmdline_parse_args.h
  SYMLINK-FILE include/pg_ether.h
  SYMLINK-FILE include/l2p.h
  SYMLINK-FILE include/lscpu.h
  SYMLINK-FILE include/mbuf.h
  SYMLINK-FILE include/_pcap.h
  SYMLINK-FILE include/port_config.h
  SYMLINK-FILE include/utils.h
  SYMLINK-FILE include/_delay.h
  SYMLINK-FILE include/_strings.h
  SYMLINK-FILE include/pg_compat.h
  CC copyright_info.o
  CC port_config.o
  CC core_info.o
  CC cmdline_parse_args.o
  CC lscpu.o
  CC utils.o
  CC coremap.o
  CC _pcap.o
In file included from /opt/pktgen-3.7.0/lib/common/_pcap.c:61:0:
/opt/pktgen-3.7.0/lib/common/pg_inet.h:155:20: error: field ‘udp’ has incomplete type
  struct pg_udp_hdr udp; /* UDP header for protocol */
                    ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:161:20: error: field ‘udp’ has incomplete type
  struct pg_udp_hdr udp; /* UDP header for protocol */
                    ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:168:20: error: field ‘udp’ has incomplete type
  struct pg_udp_hdr udp;  /* UDP header for protocol */
                    ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:177:20: error: field ‘tcp’ has incomplete type
  struct pg_tcp_hdr tcp; /* TCP header for protocol */
                    ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:183:20: error: field ‘tcp’ has incomplete type
  struct pg_tcp_hdr tcp; /* TCP header for protocol */
                    ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:190:20: error: field ‘tcp’ has incomplete type
  struct pg_tcp_hdr tcp;  /* TCP header for protocol */
                    ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:364:21: error: field ‘ip’ has incomplete type
  struct pg_ipv4_hdr ip; /* Outer IPv4 header */
                     ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:370:21: error: field ‘ip’ has incomplete type
  struct pg_ipv4_hdr ip;  /* Outer IPv4 header */
                     ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:372:22: error: field ‘ether’ has incomplete type
  struct pg_ether_hdr ether; /* Inner Ethernet header */
                      ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:408:22: error: field ‘eth’ has incomplete type
  struct pg_ether_hdr eth; /**< Ethernet header */
                      ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:410:22: error: field ‘ipv4’ has incomplete type
   struct pg_ipv4_hdr ipv4;  /**< IPv4 Header */
                      ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:411:22: error: field ‘ipv6’ has incomplete type
   struct pg_ipv6_hdr ipv6;  /**< IPv6 Header */
                      ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:415:22: error: field ‘icmp’ has incomplete type
   struct pg_icmp_hdr icmp; /**< ICMP + IPv4 Headers */
                      ^
In file included from /opt/pktgen-3.7.0/lib/common/_pcap.c:24:0:
/opt/pktgen-3.7.0/lib/common/x86_64-native-linux-gcc/include/pg_compat.h:21:25: warning: ‘struct rte_ether_addr’ declared inside parameter list [enabled by default]
 #define pg_ether_addr   rte_ether_addr
                         ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:598:39: note: in expansion of macro ‘pg_ether_addr’
 inet_mtoa(char *buff, int len, struct pg_ether_addr *eaddr) {
                                       ^
/opt/pktgen-3.7.0/lib/common/x86_64-native-linux-gcc/include/pg_compat.h:21:25: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
 #define pg_ether_addr   rte_ether_addr
                         ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:598:39: note: in expansion of macro ‘pg_ether_addr’
 inet_mtoa(char *buff, int len, struct pg_ether_addr *eaddr) {
                                       ^
In file included from /opt/pktgen-3.7.0/lib/common/_pcap.c:61:0:
/opt/pktgen-3.7.0/lib/common/pg_inet.h: In function ‘inet_mtoa’:
/opt/pktgen-3.7.0/lib/common/pg_inet.h:600:9: error: dereferencing pointer to incomplete type
    eaddr->addr_bytes[0], eaddr->addr_bytes[1],
         ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:600:31: error: dereferencing pointer to incomplete type
    eaddr->addr_bytes[0], eaddr->addr_bytes[1],
                               ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:601:9: error: dereferencing pointer to incomplete type
    eaddr->addr_bytes[2], eaddr->addr_bytes[3],
         ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:601:31: error: dereferencing pointer to incomplete type
    eaddr->addr_bytes[2], eaddr->addr_bytes[3],
                               ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:602:9: error: dereferencing pointer to incomplete type
    eaddr->addr_bytes[4], eaddr->addr_bytes[5]);
         ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:602:31: error: dereferencing pointer to incomplete type
    eaddr->addr_bytes[4], eaddr->addr_bytes[5]);
                               ^
In file included from /opt/pktgen-3.7.0/lib/common/_pcap.c:24:0:
/opt/pktgen-3.7.0/lib/common/pg_inet.h: At top level:
/opt/pktgen-3.7.0/lib/common/x86_64-native-linux-gcc/include/pg_compat.h:21:25: warning: ‘struct rte_ether_addr’ declared inside parameter list [enabled by default]
 #define pg_ether_addr   rte_ether_addr
                         ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:609:20: note: in expansion of macro ‘pg_ether_addr’
 inet_mtoh64(struct pg_ether_addr *eaddr, uint64_t *value) {
                    ^
In file included from /opt/pktgen-3.7.0/lib/common/_pcap.c:61:0:
/opt/pktgen-3.7.0/lib/common/pg_inet.h: In function ‘inet_mtoh64’:
/opt/pktgen-3.7.0/lib/common/pg_inet.h:610:27: error: dereferencing pointer to incomplete type
  *value = ((uint64_t)eaddr->addr_bytes[5] << 0)
                           ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:611:21: error: dereferencing pointer to incomplete type
   + ((uint64_t)eaddr->addr_bytes[4] << 8)
                     ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:612:21: error: dereferencing pointer to incomplete type
   + ((uint64_t)eaddr->addr_bytes[3] << 16)
                     ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:613:21: error: dereferencing pointer to incomplete type
   + ((uint64_t)eaddr->addr_bytes[2] << 24)
                     ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:614:21: error: dereferencing pointer to incomplete type
   + ((uint64_t)eaddr->addr_bytes[1] << 32)
                     ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:615:21: error: dereferencing pointer to incomplete type
   + ((uint64_t)eaddr->addr_bytes[0] << 40);
                     ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h: In function ‘inet_h64tom’:
/opt/pktgen-3.7.0/lib/common/pg_inet.h:622:7: error: dereferencing pointer to incomplete type
  eaddr->addr_bytes[5] = ((value >> 0) & 0xFF);
       ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:623:7: error: dereferencing pointer to incomplete type
  eaddr->addr_bytes[4] = ((value >> 8) & 0xFF);
       ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:624:7: error: dereferencing pointer to incomplete type
  eaddr->addr_bytes[3] = ((value >> 16) & 0xFF);
       ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:625:7: error: dereferencing pointer to incomplete type
  eaddr->addr_bytes[2] = ((value >> 24) & 0xFF);
       ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:626:7: error: dereferencing pointer to incomplete type
  eaddr->addr_bytes[1] = ((value >> 32) & 0xFF);
       ^
/opt/pktgen-3.7.0/lib/common/pg_inet.h:627:7: error: dereferencing pointer to incomplete type
  eaddr->addr_bytes[0] = ((value >> 40) & 0xFF);
       ^
/opt/pktgen-3.7.0/lib/common/_pcap.c: In function ‘_pcap_payloadOffset’:
/opt/pktgen-3.7.0/lib/common/_pcap.c:280:50: error: invalid application of ‘sizeof’ to incomplete type ‘struct rte_ether_hdr’
   (const struct pg_ipv4_hdr *)(pkt_data + sizeof(struct pg_ether_hdr));
                                                  ^
/opt/pktgen-3.7.0/lib/common/_pcap.c:284:11: error: dereferencing pointer to incomplete type
  if ( (iph->version_ihl & 0xF0) != 0x40)
           ^
/opt/pktgen-3.7.0/lib/common/_pcap.c:288:9: error: dereferencing pointer to incomplete type
  if (iph->fragment_offset & htons(PG_OFF_MF | PG_OFF_MASK))
         ^
/opt/pktgen-3.7.0/lib/common/_pcap.c:292:27: error: dereferencing pointer to incomplete type
  unsigned int ihlen = (iph->version_ihl & 0x0F) * 4;
                           ^
/opt/pktgen-3.7.0/lib/common/_pcap.c:295:13: error: dereferencing pointer to incomplete type
  switch (iph->next_proto_id) {
             ^
/opt/pktgen-3.7.0/lib/common/_pcap.c:298:14: error: dereferencing pointer to incomplete type
   thlen = (th->data_off >> 4) * 4;
              ^
/opt/pktgen-3.7.0/lib/common/_pcap.c:301:18: error: invalid application of ‘sizeof’ to incomplete type ‘struct rte_udp_hdr’
   thlen = sizeof(struct pg_udp_hdr);
                  ^
/opt/pktgen-3.7.0/lib/common/_pcap.c:307:19: error: invalid application of ‘sizeof’ to incomplete type ‘struct rte_ether_hdr’
  *offset = sizeof(struct pg_ether_hdr) + ihlen + thlen;
                   ^
/opt/pktgen-3.7.0/lib/common/_pcap.c:308:19: error: invalid application of ‘sizeof’ to incomplete type ‘struct rte_ether_hdr’
  *length = sizeof(struct pg_ether_hdr) + ntohs(iph->total_length) - *offset;
                   ^
In file included from /usr/include/bits/byteswap.h:35:0,
                 from /usr/include/endian.h:60,
                 from /usr/include/bits/waitstatus.h:64,
                 from /usr/include/stdlib.h:42,
                 from /opt/pktgen-3.7.0/lib/common/_pcap.c:10:
/opt/pktgen-3.7.0/lib/common/_pcap.c:308:51: error: dereferencing pointer to incomplete type
  *length = sizeof(struct pg_ether_hdr) + ntohs(iph->total_length) - *offset;
                                                   ^
/opt/pktgen-3.7.0/lib/common/_pcap.c: At top level:
cc1: warning: unrecognized command line option "-Wno-address-of-packed-member" [enabled by default]
make[3]: *** [_pcap.o] Error 1
make[2]: *** [all] Error 2
make[1]: *** [common] Error 2
make: *** [lib] Error 2

------success ----dpdk-stable-18.11.2-------dpdk-18.11.2.tar.xz ---- 0ad396d18be01db57b6de8270ebdf651------------

/root/lua-5.3.5/src/lua.h
[root@dpi2 pktgen-3.7.0]# make
== lib
== common
== plugin
== utils
== vec
== lua
  CC lua_config.o
  CC lua_stdio.o
  CC lua_utils.o
  CC lua_socket.o
  CC lua_dpdk.o
  CC lua_pktmbuf.o
  CC lua_vec.o
  CC lua_dapi.o
  AR libpktgen_lua.a
  INSTALL-LIB libpktgen_lua.a
== cli
  SYMLINK-FILE include/cli.h
  SYMLINK-FILE include/cli_input.h
  SYMLINK-FILE include/cli_common.h
  SYMLINK-FILE include/cli_map.h
  SYMLINK-FILE include/cli_gapbuf.h
  SYMLINK-FILE include/cli_file.h
  SYMLINK-FILE include/cli_env.h
  SYMLINK-FILE include/cli_search.h
  SYMLINK-FILE include/cli_help.h
  SYMLINK-FILE include/cli_history.h
  SYMLINK-FILE include/cli_scrn.h
  CC cli.o
  CC cli_input.o
  CC cli_cmds.o
  CC cli_map.o
  CC cli_gapbuf.o
  CC cli_file.o
  CC cli_env.o
  CC cli_auto_complete.o
  CC cli_help.o
  CC cli_history.o
  CC cli_search.o
  CC cli_cmap.o
  CC cli_vt100.o
  CC cli_scrn.o
  AR libcli.a
  INSTALL-LIB libcli.a
== app
  CC cli-functions.o
  CC lpktgenlib.o
  CC pktgen-cmds.o
  CC pktgen.o
  CC pktgen-cfg.o
  CC pktgen-main.o
  CC pktgen-pcap.o
  CC pktgen-range.o
  CC pktgen-cpu.o
  CC pktgen-seq.o
  CC pktgen-dump.o
  CC pktgen-capture.o
  CC pktgen-stats.o
  CC pktgen-port-cfg.o
  CC pktgen-ipv6.o
  CC pktgen-ipv4.o
  CC pktgen-arp.o
  CC pktgen-gre.o
  CC pktgen-ether.o
  CC pktgen-tcp.o
  CC pktgen-udp.o
  CC pktgen-vlan.o
  CC pktgen-random.o
  CC pktgen-display.o
  CC pktgen-log.o
  CC pktgen-gtpu.o
  CC pktgen-latency.o
  LD pktgen
  INSTALL-APP pktgen
  INSTALL-MAP pktgen.map
[root@dpi2 pktgen-3.7.0]# echo $RTE_SDK
/opt/dpdk-stable-18.11.2

你可能感兴趣的:(dpdk)