[dpdk-dev] [PATCH v3 19/20] net/sfc: support flow action COUNT in transfer rules

David Marchand david.marchand at redhat.com
Mon Jun 21 10:28:43 CEST 2021


On Fri, Jun 18, 2021 at 3:41 PM Andrew Rybchenko
<andrew.rybchenko at oktetlabs.ru> wrote:
> diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build
> index f8880f740a..32b58e3d76 100644
> --- a/drivers/net/sfc/meson.build
> +++ b/drivers/net/sfc/meson.build
> @@ -39,6 +39,16 @@ foreach flag: extra_flags
>      endif
>  endforeach
>
> +# for clang 32-bit compiles we need libatomic for 64-bit atomic ops
> +if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false
> +    ext_deps += cc.find_library('atomic')
> +endif

I don't think this block is needed.
The atomic library is globally required in config/meson.build for the
clang + 32bits case.


> +
> +# for gcc compiles we need -latomic for 128-bit atomic ops
> +if cc.get_id() == 'gcc'
> +    ext_deps += cc.find_library('atomic')
> +endif
> +

This patch breaks compilation on rhel/fedora (most failures in UNH for
this series are linked to this issue) when the libatomic rpm is not
installed.
ninja: Entering directory `/home/dmarchan/builds/build-gcc-static'
[1/18] Linking target drivers/librte_net_sfc.so.21.3
FAILED: drivers/librte_net_sfc.so.21.3
gcc  -o drivers/librte_net_sfc.so.21.3
drivers/librte_net_sfc.so.21.3.p/meson-generated_.._rte_net_sfc.pmd.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_ethdev.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_kvargs.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_mcdi.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_sriov.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_intr.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_ev.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_port.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_rx.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_tx.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_tso.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_filter.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_switch.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_mae.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_mae_counter.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_flow.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_dp.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_ef10_rx.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_ef10_essb_rx.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_ef10_tx.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_ef100_rx.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_ef100_tx.c.o
drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_service.c.o
-I/home/dmarchan/intel-ipsec-mb/install/include
-L/home/dmarchan/intel-ipsec-mb/install/lib -Wl,--as-needed
-Wl,--no-undefined -shared -fPIC -Wl,--start-group
-Wl,-soname,librte_net_sfc.so.21 -Wl,--no-as-needed -pthread -lm -ldl
-lnuma -lfdt lib/librte_ethdev.so.21.3 lib/librte_eal.so.21.3
lib/librte_kvargs.so.21.3 lib/librte_telemetry.so.21.3
lib/librte_net.so.21.3 lib/librte_mbuf.so.21.3
lib/librte_mempool.so.21.3 lib/librte_ring.so.21.3
lib/librte_meter.so.21.3 drivers/librte_bus_pci.so.21.3
lib/librte_pci.so.21.3 drivers/librte_bus_vdev.so.21.3
drivers/librte_common_sfc_efx.so.21.3
-Wl,--version-script=/home/dmarchan/dpdk/drivers/net/sfc/version.map
/usr/lib/gcc/x86_64-redhat-linux/10/libatomic.so /usr/lib64/libbsd.so
-Wl,--end-group '-Wl,-rpath,$ORIGIN/../lib:$ORIGIN/'
-Wl,-rpath-link,/home/dmarchan/builds/build-gcc-static/lib
-Wl,-rpath-link,/home/dmarchan/builds/build-gcc-static/drivers
/usr/bin/ld: cannot find /usr/lib64/libatomic.so.1.2.0
collect2: error: ld returned 1 exit status


It seems meson related.
I do see:
Library atomic found: YES
Message: drivers/net/sfc: Defining dependency "net_sfc"


But looking at /home/dmarchan/build/build-gcc-static/meson-logs/meson-log.txt:
"""
Running compile:
Working directory:
/home/dmarchan/builds/build-gcc-static/meson-private/tmpdu27j15z
Command line:  gcc -L/home/dmarchan/intel-ipsec-mb/install/lib
-I/home/dmarchan/intel-ipsec-mb/install/include
/home/dmarchan/builds/build-gcc-static/meson-private/tmpdu27j15z/testfile.c
-o /home/dmarchan/builds/build-gcc-static/meson-private/tmpdu27j15z/output.exe
-pipe -D_FILE_OFFSET_BITS=64 -O0 -Wl,--start-group -latomic
-Wl,--end-group -Wl,--allow-shlib-undefined

Code:
 int main(void) { return 0; }

Compiler stdout:

Compiler stderr:
 /usr/bin/ld: cannot find /usr/lib64/libatomic.so.1.2.0
collect2: error: ld returned 1 exit status

Library atomic found: YES
"""


And:

[dmarchan at wsfd-netdev66 dpdk]$ cat
/usr/lib/gcc/x86_64-redhat-linux/10/libatomic.so
INPUT ( /usr/lib64/libatomic.so.1.2.0 )
[dmarchan at wsfd-netdev66 dpdk]$ file /usr/lib64/libatomic.so.1.2.0
/usr/lib64/libatomic.so.1.2.0: cannot open
`/usr/lib64/libatomic.so.1.2.0' (No such file or directory)

[dmarchan at wsfd-netdev66 dpdk]$ meson --version
0.55.3


-- 
David Marchand



More information about the dev mailing list