[ovs-discuss] OVS 2.10.1 build --with-dpdk 18.11 fails in compiling a structure

Debug Netiq One debugnetiq1 at yahoo.ca
Sat Jan 26 23:29:10 UTC 2019


Hi

I am not knowledgeable on gcc advanced syntax but I worked in C/C++ 
before and gcc 4.8.5 on CentOS 4.6 croaks when seeing the below in 
"lib/netdev-dpdk.c" and then many other errors

Build first dpdk 18.11 w/o error then attempted to build ovs based on 
http://docs.openvswitch.org/en/latest/intro/install/dpdk/ and 
http://docs.openvswitch.org/en/latest/intro/install/general/

My gcc is 4.8.5, libtool 2.4.6 and doing the make after a ./configure 
--with-dpdk=<DPDK build folder>

What is missing please??? It seems simply a syntax not supported by the 
compiler

Here is the culprit (or one of them)

static const struct rte_eth_conf port_conf = {
     .rxmode = {
         .mq_mode = ETH_MQ_RX_RSS,
         .split_hdr_size = 0,
         .header_split   = 0, /* Header Split disabled */
         .hw_ip_checksum = 0, /* IP checksum offload disabled */
         .hw_vlan_filter = 0, /* VLAN filtering disabled */
         .jumbo_frame    = 0, /* Jumbo Frame Support disabled */
         .hw_strip_crc   = 0,
     },
     .rx_adv_conf = {
         .rss_conf = {
             .rss_key = NULL,
             .rss_hf = ETH_RSS_IP | ETH_RSS_UDP | ETH_RSS_TCP,
         },
     },
     .txmode = {
         .mq_mode = ETH_MQ_TX_NONE,
     },
};

make

... all fine till below ...

/bin/sh ./libtool  --tag=CC   --mode=compile gcc -std=gnu99 
-DHAVE_CONFIG_H -I.    -I ./include -I ./include -I ./lib -I ./lib    
-Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith 
-Wformat -Wformat-security -Wswitch-enum -Wunused-parameter 
-Wbad-function-cast -Wcast-align -Wstrict-prototypes 
-Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers 
-fno-strict-aliasing -Wshadow -Wno-null-pointer-arithmetic -mssse3 
-I/opt/dpdk_install/dpdk-18.11/x86_64-native-linuxapp-gcc/include 
-D_FILE_OFFSET_BITS=64  -g -O2 -MT lib/netdev-dpdk.lo -MD -MP -MF 
$depbase.Tpo -c -o lib/netdev-dpdk.lo lib/netdev-dpdk.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I ./include -I 
./include -I ./lib -I ./lib -Wstrict-prototypes -Wall -Wextra 
-Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security 
-Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align 
-Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes 
-Wmissing-field-initializers -fno-strict-aliasing -Wshadow 
-Wno-null-pointer-arithmetic -mssse3 
-I/opt/dpdk_install/dpdk-18.11/x86_64-native-linuxapp-gcc/include 
-D_FILE_OFFSET_BITS=64 -g -O2 -MT lib/netdev-dpdk.lo -MD -MP -MF 
lib/.deps/netdev-dpdk.Tpo -c lib/netdev-dpdk.c -o lib/netdev-dpdk.o
lib/netdev-dpdk.c:171:9: error: unknown field âheader_splitâ specified 
in initializer
          .header_split   = 0, /* Header Split disabled */
          ^
lib/netdev-dpdk.c:172:9: error: unknown field âhw_ip_checksumâ specified 
in initializer
          .hw_ip_checksum = 0, /* IP checksum offload disabled */
          ^
lib/netdev-dpdk.c:172:9: warning: excess elements in struct initializer 
[enabled by default]
lib/netdev-dpdk.c:172:9: warning: (near initialization for 
âport_conf.rxmodeâ) [enabled by default]
lib/netdev-dpdk.c:173:9: error: unknown field âhw_vlan_filterâ specified 
in initializer
          .hw_vlan_filter = 0, /* VLAN filtering disabled */
          ^
lib/netdev-dpdk.c:173:9: warning: excess elements in struct initializer 
[enabled by default]
lib/netdev-dpdk.c:173:9: warning: (near initialization for 
âport_conf.rxmodeâ) [enabled by default]
lib/netdev-dpdk.c:174:9: error: unknown field âjumbo_frameâ specified in 
initializer
          .jumbo_frame    = 0, /* Jumbo Frame Support disabled */
          ^
lib/netdev-dpdk.c:174:9: warning: excess elements in struct initializer 
[enabled by default]
lib/netdev-dpdk.c:174:9: warning: (near initialization for 
âport_conf.rxmodeâ) [enabled by default]
lib/netdev-dpdk.c:175:9: error: unknown field âhw_strip_crcâ specified 
in initializer
          .hw_strip_crc   = 0,
          ^
lib/netdev-dpdk.c:175:9: warning: excess elements in struct initializer 
[enabled by default]
lib/netdev-dpdk.c:175:9: warning: (near initialization for 
âport_conf.rxmodeâ) [enabled by default]
lib/netdev-dpdk.c: In function âdpdk_eth_dev_port_configâ:
lib/netdev-dpdk.c:906:24: error: âstruct rte_eth_rxmodeâ has no member 
named âenable_scatterâ
              conf.rxmode.enable_scatter = 1;
                         ^
lib/netdev-dpdk.c:911:16: error: âstruct rte_eth_rxmodeâ has no member 
named âhw_ip_checksumâ
      conf.rxmode.hw_ip_checksum = (dev->hw_ol_features &
                 ^
lib/netdev-dpdk.c:915:20: error: âstruct rte_eth_rxmodeâ has no member 
named âhw_strip_crcâ
          conf.rxmode.hw_strip_crc = 1;





---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the discuss mailing list