> -----Original Message-----
> From: Stephen Hemminger <step...@networkplumber.org>
> Sent: Tuesday, February 11, 2025 7:24 AM
> To: Kusztal, ArkadiuszX <arkadiuszx.kusz...@intel.com>
> Cc: dev@dpdk.org; ferruh.yi...@amd.com; Ji, Kai <kai...@intel.com>; Dooley,
> Brian <brian.doo...@intel.com>
> Subject: Re: [PATCH v6] net: add thread-safe crc api
> 
> On Mon, 10 Feb 2025 21:27:10 +0000
> Arkadiusz Kusztal <arkadiuszx.kusz...@intel.com> wrote:
> 
> > The current net CRC API is not thread-safe, this patch solves this by
> > adding another, thread-safe API functions.
> > This API is also safe to use across multiple processes, yet with
> > limitations on max-simd-bitwidth, which will be checked only by the
> > process that created the CRC context; all other processes (that did
> > not create the context) will use the highest possible SIMD extension
> > that was built with the binary, but no higher than the one requested
> > by the CRC context.
> >
> > Since the change of the API at this point is an ABI break, these API
> > symbols are versioned with the _26 suffix.
> >
> > Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusz...@intel.com>
> > ---
> 
> Thanks for updating so quick, but the problem is you need to move the
> prototype for rte_net_crc_free() to get it to work.
Prototype of ` rte_net_crc_free` function was moved up in this patch, so it is 
visible. For me, the problem seems to be that the `rte_net_crc.h` is not 
self-contained (due to malloc addition), and the compiler thinks that the 
unknown attributes aliases are actual function body. I will fix that in v7. 
> 
> -------------------------------BEGIN LOGS----------------------------
> #################################################################
> ###################
> #### [Begin job log] "ubuntu-22.04-gcc-mini" at step Build and test
> #################################################################
> ###################
>       |         ^~~~~~~~~~~~
> /home/runner/work/dpdk/dpdk/lib/net/rte_net_crc.h:61:53: error: expected ‘)’
> before numeric constant
>    61 |         __rte_malloc __rte_dealloc(rte_net_crc_free, 1);
>       |                                                     ^~
>       |                                                     )
> /home/runner/work/dpdk/dpdk/lib/net/rte_net_crc.h:60:1: error: old-style
> parameter declarations in prototyped function definition
>    60 | rte_net_crc_set_alg(enum rte_net_crc_alg alg, enum rte_net_crc_type
> type)
>       | ^~~~~~~~~~~~~~~~~~~
> buildtools/chkincs/chkincs.p/rte_net_crc.c:3: error: expected ‘{’ at end of 
> input
> In file included from buildtools/chkincs/chkincs.p/rte_net_crc.c:1:
> /home/runner/work/dpdk/dpdk/lib/net/rte_net_crc.h:60:42: error: unused
> parameter ‘alg’ [-Werror=unused-parameter]
>    60 | rte_net_crc_set_alg(enum rte_net_crc_alg alg, enum rte_net_crc_type
> type)
>       |                     ~~~~~~~~~~~~~~~~~~~~~^~~
> /home/runner/work/dpdk/dpdk/lib/net/rte_net_crc.h:60:69: error: unused
> parameter ‘type’ [-Werror=unused-parameter]
>    60 | rte_net_crc_set_alg(enum rte_net_crc_alg alg, enum rte_net_crc_type
> type)
>       |                                               
> ~~~~~~~~~~~~~~~~~~~~~~^~~~
> buildtools/chkincs/chkincs.p/rte_net_crc.c:3: error: control reaches end of 
> non-
> void function [-Werror=return-type]
> cc1: all warnings being treated as errors [629/2123] Compiling C object
> buildtools/chkincs/chkincs.p/meson-generated_rte_mpls.c.o
> [630/2123] Compiling C object buildtools/chkincs/chkincs.p/meson-
> generated_rte_arp.c.o
> [631/2123] Compiling C object buildtools/chkincs/chkincs.p/meson-
> generated_rte_ether.c.o
> [632/2123] Compiling C object buildtools/chkincs/chkincs.p/meson-
> generated_rte_net.c.o

Reply via email to