Re: [PATCH 17/18] net: octeontx2: fix mixed module-builtin object

From: Masahiro Yamada
Date: Wed Nov 23 2022 - 15:55:13 EST


On Sun, Nov 20, 2022 at 8:10 AM Alexander Lobakin <alobakin@xxxxx> wrote:
>
> With CONFIG_OCTEONTX2_PF=y and CONFIG_OCTEONTX2_VF=m, several object
> files are linked to a module and also to vmlinux even though the
> expected CFLAGS are different between builtins and modules.
> This is the same situation as fixed by
> commit 637a642f5ca5 ("zstd: Fixing mixed module-builtin objects").
> There's also no need to duplicate relatively big piece of object
> code into two modules.
>
> Introduce the new module, rvu_niccommon, to provide the common
> functions to both rvu_nicpf and rvu_nicvf. Also, otx2_ptp.o was not
> shared, but built as a standalone module (it was fixed already a year
> ago the same way this commit does due to link issues). As it's used
> by both PF and VF modules in the same way, just link it into that new
> common one.
>
> Fixes: 2da489432747 ("octeontx2-pf: devlink params support to set mcam entry count")
> Fixes: 8e67558177f8 ("octeontx2-pf: PFC config support with DCBx")
> Suggested-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
> Signed-off-by: Alexander Lobakin <alobakin@xxxxx>
> ---


Reviewed-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>

Minor:
otx2_ptp.c uses EXPORT_SYMBOL_GPL().
It is better to use either EXPORT_SYMBOL_GPL or
EXPORT_SYMBOL_NS_GPL instead of mixing them.



--
Best Regards
Masahiro Yamada