[ovs-dev] [PATCH] datapath: Add a new action dec_ttl

Aaron Conole aconole at redhat.com
Thu Nov 12 14:08:25 UTC 2020


"Eelco Chaudron" <echaudro at redhat.com> writes:

> On 11 Nov 2020, at 16:58, 0-day Robot wrote:
>
>> Bleep bloop.  Greetings Eelco Chaudron, I am a robot and I have
>> tried out your patch.
>> Thanks for your contribution.
>>
>> I encountered some error that I wasn't expecting.  See the details
>> below.
>>
>>
>> build:
>> /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 -Werror
>> -Werror   -g -O2 -DHAVE_LD_AVX512_GOOD -MT
>> ofproto/ofproto_libofproto_la-ofproto.lo -MD -MP -MF
>> ofproto/.deps/ofproto_libofproto_la-ofproto.Tpo -c -o 
>> ofproto/ofproto_libofproto_la-ofproto.lo `test -f
>> 'ofproto/ofproto.c' || echo './'`ofproto/ofproto.c
>> 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 -Werror
>> -Werror -g -O2 -DHAVE_LD_AVX512_GOOD -MT
>> ofproto/ofproto_libofproto_la-ofproto.lo -MD -MP -MF
>> ofproto/.deps/ofproto_libofproto_la-ofproto.Tpo -c ofproto/ofproto.c
>> -o ofproto/ofproto_libofproto_la-ofproto.o
>> mv -f ofproto/.deps/ofproto_libofproto_la-ofproto.Tpo
>> ofproto/.deps/ofproto_libofproto_la-ofproto.Plo
>> /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 -Werror
>> -Werror   -g -O2 -DHAVE_LD_AVX512_GOOD -MT
>> ofproto/ofproto_libofproto_la-ofproto-dpif.lo -MD -MP -MF
>> ofproto/.deps/ofproto_libofproto_la-ofproto-dpif.Tpo -c -o 
>> ofproto/ofproto_libofproto_la-ofproto-dpif.lo `test -f 
>> 'ofproto/ofproto-dpif.c' || echo './'`ofproto/ofproto-dpif.c
>> 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 -Werror
>> -Werror -g -O2 -DHAVE_LD_AVX512_GOOD -MT
>> ofproto/ofproto_libofproto_la-ofproto-dpif.lo -MD -MP -MF
>> ofproto/.deps/ofproto_libofproto_la-ofproto-dpif.Tpo -c 
>> ofproto/ofproto-dpif.c -o ofproto/ofproto_libofproto_la-ofproto-dpif.o
>> ofproto/ofproto-dpif.c: In function 'check_dec_ttl_action':
>> ofproto/ofproto-dpif.c:1196:12: error: missing braces around
>> initializer [-Werror=missing-braces]
>>      struct flow flow = { 0 };
>>             ^
>
> Could this be a clang compiler issues? Searching a bit online looks
> like it. I do not see this with CLANG10, however I do see it in
> TravicCi which is using Clang7.0.
>
> Any idea what to do to resolve it? I could do something like (also for
> the OS X build):
>
> diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
> index e0a065291..da7a30767 100755
> --- a/.travis/linux-build.sh
> +++ b/.travis/linux-build.sh
> @@ -181,6 +181,7 @@ fi
>
>  if [ "$CC" = "clang" ]; then
>      CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS}
> -Wno-error=unused-command-line-argument"
> +    CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} -Wno-missing-braces
> -Wmissing-field-initializers"
>  elif [ "$M32" ]; then
>      # Not using sparse for 32bit builds on 64bit machine.
>      # Adding m32 flag directly to CC to avoid any posiible issues
> with API/ABI
>
> Or do a memset() instead, but seems odd to work around a compiler issue.

Agreed.

> Thoughts?

I think we should probably upgrade the compiler used by the 0-day
robot.  Currently, it builds with gcc 4.7, iirc, which is ancient.

>> ofproto/ofproto-dpif.c:1196:12: error: (near initialization for
>> 'flow.tunnel') [-Werror=missing-braces]
>> ofproto/ofproto-dpif.c:1196:12: error: missing initializer for field
>> 'metadata' of 'struct flow' [-Werror=missing-field-initializers]
>> In file included from ./include/openvswitch/match.h:20:0,
>>                  from ./lib/classifier.h:302,
>>                  from ofproto/ofproto-provider.h:37,
>>                  from ofproto/bond.h:22,
>>                  from ofproto/ofproto-dpif.c:20:
>> ./include/openvswitch/flow.h:103:14: note: 'metadata' declared here
>>      ovs_be64 metadata;          /* OpenFlow Metadata. */
>>               ^
>> cc1: all warnings being treated as errors
>> make[2]: *** [ofproto/ofproto_libofproto_la-ofproto-dpif.lo] Error 1
>> make[2]: Leaving directory
>> `/var/lib/jenkins/jobs/0day_robot_upstream_build_from_pw/workspace'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory
>> `/var/lib/jenkins/jobs/0day_robot_upstream_build_from_pw/workspace'
>> make: *** [all] Error 2
>>
>>
>> Please check this out.  If you feel there has been an error, please
>> email aconole at redhat.com
>>
>> Thanks,
>> 0-day Robot



More information about the dev mailing list