On 01/09/2023 13:19, Simon Horman wrote:
On Thu, Aug 31, 2023 at 09:32:23AM +0200, David Marchand wrote:
After DPDK started relying on compiler intrinsics in rte_cycles.h,
sparse raises the following warning:

libtool: compile:  env REAL_CC=gcc "CHECK=sparse -Wsparse-error
        -I ../../include/sparse -I ../../include -m64
        -I /usr/local/include -I /usr/include/x86_64-linux-gnu
        " cgcc -target=x86_64 -target=host_os_specs -D__MMX__=1
        -D__SSE2_MATH__=1 -D__SSE_MATH__=1 -D__SSE2__=1 -D__SSE__=1
        -DHAVE_CONFIG_H -I. -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 -Wswitch-bool -Wlogical-not-parentheses
        -Wsizeof-array-argument -Wbool-compare -Wshift-negative-value
        -Wduplicated-cond -Wshadow -Wmultistatement-macros
        -Wcast-align=strict -mssse3 -include rte_config.h -mrtm
        -I/home/runner/work/ovs/ovs/dpdk-dir/include -Werror
        -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: note: in included file (through
        /usr/lib/gcc/x86_64-linux-gnu/9//include/x86intrin.h,
        /home/runner/work/ovs/ovs/dpdk-dir/include/rte_cycles.h,
        /home/runner/work/ovs/ovs/dpdk-dir/include/rte_spinlock.h, ...):
/usr/lib/gcc/x86_64-linux-gnu/9//include/ia32intrin.h:114:10: error:
        undefined identifier '__builtin_ia32_rdtsc'

Provide an empty implementation of __builtin_ia32_rdtsc() builtin.

Signed-off-by: David Marchand <david.march...@redhat.com>
---
Note: I am sending this early, but please wait before merging this in
dpdk-latest as v23.11-rc1 is far from being ready.
I am expecting more changes in EAL headers and I'll update this patch
if hitting more issues.

Hi David,

It seems appropriate to mark this as deffered in patchwork,
so I have done so.

Patch looks find to me.

Acked-by: Simon Horman <ho...@ovn.org>


Thanks David and Simon.

Updated title of the commit to "sparse: Add some compiler intrinsics for DPDK build." after talking to David, as there was a (now fixed) unrelated build issue at the time of DPDK v23.11-rc1.

Rebased dpdk-latest branch and applied this commit there.

Kevin.

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to