diff mbox series

[2/2] security: build on Windows

Message ID 20210915162603.16652-2-talshn@nvidia.com (mailing list archive)
State Superseded
Delegated to: akhil goyal
Headers show
Series [1/2] security: use the net library for IP structs | expand

Checks

Context Check Description
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing fail Testing issues
ci/iol-x86_64-compile-testing fail Testing issues
ci/iol-mellanox-Performance success Performance Testing PASS
ci/intel-Testing fail Testing issues
ci/Intel-compilation fail Compilation issues
ci/github-robot: build success github build: passed
ci/checkpatch success coding style OK

Commit Message

Tal Shnaiderman Sept. 15, 2021, 4:26 p.m. UTC
Build the security library on Windows.

Remove unneeded export from version file.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
Depends-on: patch-98796 ("cryptodev: build on Windows")
---
 lib/meson.build          | 1 +
 lib/security/version.map | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

Comments

William Tu Sept. 19, 2021, 2:07 p.m. UTC | #1
On Wed, Sep 15, 2021 at 9:27 AM Tal Shnaiderman <talshn@nvidia.com> wrote:
>
> Build the security library on Windows.
>
> Remove unneeded export from version file.
>
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> ---
Acked-by: William Tu <u9012063@gmail.com>
Kadam, Pallavi Sept. 29, 2021, 7:55 p.m. UTC | #2
On 9/15/2021 9:26 AM, Tal Shnaiderman wrote:
> Build the security library on Windows.
>
> Remove unneeded export from version file.
>
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> ---
> Depends-on: patch-98796 ("cryptodev: build on Windows")
> ---
>   lib/meson.build          | 1 +
>   lib/security/version.map | 1 -
>   2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/meson.build b/lib/meson.build
> index 5f3b1cf365..e5f0094a82 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -86,6 +86,7 @@ if is_windows
>               'gso',
>               'latencystats',
>               'pdump',
> +            'security',
>       ] # only supported libraries for windows
>   endif
>   
> diff --git a/lib/security/version.map b/lib/security/version.map
> index c44c7f5f60..6067051552 100644
> --- a/lib/security/version.map
> +++ b/lib/security/version.map
> @@ -1,7 +1,6 @@
>   DPDK_22 {
>   	global:
>   
> -	rte_security_attach_session;
>   	rte_security_capabilities_get;
>   	rte_security_capability_get;
>   	rte_security_session_create;

Getting linking errors using clang for 'rte_security_get_userdata' and 
'rte_security_set_pkt_metadata' as below:

FAILED: lib/rte_security-22.dll
"clang"  -Wl,/MACHINE:X64 -Wl,/OUT:lib/rte_security-22.dll 
lib/librte_security.a.p/security_rte_security.c.obj "-Wl,/nologo" 
"-Wl,/release" "-Wl,/nologo" "-Wl,/OPT:REF" "-Wl,/DLL" 
"-Wl,/IMPLIB:lib\rte_security.lib" "lib\rte_eal.lib" 
"lib\rte_kvargs.lib" "lib\rte_mempool.lib" "lib\rte_ring.lib" 
"lib\rte_cryptodev.lib" "lib\rte_mbuf.lib" "lib\rte_rcu.lib" 
"lib\rte_net.lib" 
"-Wl,/def:C:\dpdk\ixgbe\dpdk\build\lib\rte_security_exports.def" 
"-ldbghelp" "-lsetupapi" "-lws2_32" "-lmincore" "-lkernel32" "-luser32" 
"-lgdi32" "-lwinspool" "-lshell32" "-lole32" "-loleaut32" "-luuid" 
"-lcomdlg32" "-ladvapi32"
rte_security_exports.def : error LNK2001: unresolved external symbol 
rte_security_get_userdata
rte_security_exports.def : error LNK2001: unresolved external symbol 
rte_security_set_pkt_metadata
lib\rte_security.lib : fatal error LNK1120: 2 unresolved externals
clang: error: linker command failed with exit code 1120 (use -v to see 
invocation)

Should it be removed from version file?
Tal Shnaiderman Sept. 30, 2021, 6:33 a.m. UTC | #3
> Subject: Re: [PATCH 2/2] security: build on Windows
> 
> External email: Use caution opening links or attachments
> 
> 
> On 9/15/2021 9:26 AM, Tal Shnaiderman wrote:
> > Build the security library on Windows.
> >
> > Remove unneeded export from version file.
> >
> > Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> > ---
> > Depends-on: patch-98796 ("cryptodev: build on Windows")
> > ---
> >   lib/meson.build          | 1 +
> >   lib/security/version.map | 1 -
> >   2 files changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/meson.build b/lib/meson.build index
> > 5f3b1cf365..e5f0094a82 100644
> > --- a/lib/meson.build
> > +++ b/lib/meson.build
> > @@ -86,6 +86,7 @@ if is_windows
> >               'gso',
> >               'latencystats',
> >               'pdump',
> > +            'security',
> >       ] # only supported libraries for windows
> >   endif
> >
> > diff --git a/lib/security/version.map b/lib/security/version.map index
> > c44c7f5f60..6067051552 100644
> > --- a/lib/security/version.map
> > +++ b/lib/security/version.map
> > @@ -1,7 +1,6 @@
> >   DPDK_22 {
> >       global:
> >
> > -     rte_security_attach_session;
> >       rte_security_capabilities_get;
> >       rte_security_capability_get;
> >       rte_security_session_create;
> 
> Getting linking errors using clang for 'rte_security_get_userdata' and
> 'rte_security_set_pkt_metadata' as below:
> 
> FAILED: lib/rte_security-22.dll
> "clang"  -Wl,/MACHINE:X64 -Wl,/OUT:lib/rte_security-22.dll
> lib/librte_security.a.p/security_rte_security.c.obj "-Wl,/nologo"
> "-Wl,/release" "-Wl,/nologo" "-Wl,/OPT:REF" "-Wl,/DLL"
> "-Wl,/IMPLIB:lib\rte_security.lib" "lib\rte_eal.lib"
> "lib\rte_kvargs.lib" "lib\rte_mempool.lib" "lib\rte_ring.lib"
> "lib\rte_cryptodev.lib" "lib\rte_mbuf.lib" "lib\rte_rcu.lib"
> "lib\rte_net.lib"
> "-Wl,/def:C:\dpdk\ixgbe\dpdk\build\lib\rte_security_exports.def"
> "-ldbghelp" "-lsetupapi" "-lws2_32" "-lmincore" "-lkernel32" "-luser32"
> "-lgdi32" "-lwinspool" "-lshell32" "-lole32" "-loleaut32" "-luuid"
> "-lcomdlg32" "-ladvapi32"
> rte_security_exports.def : error LNK2001: unresolved external symbol
> rte_security_get_userdata rte_security_exports.def : error LNK2001:
> unresolved external symbol rte_security_set_pkt_metadata
> lib\rte_security.lib : fatal error LNK1120: 2 unresolved externals
> clang: error: linker command failed with exit code 1120 (use -v to see
> invocation)
> 
> Should it be removed from version file?

Yes, those 2 functions were changed in the patch below after my v1 was sent and no longer need export.

https://git.dpdk.org/dpdk/commit/?id=d08dcd28c3b245468a9859b7b9a288247dfc95f1

I'll remove them from the version file in v2 as suggested, thanks.
William Tu Oct. 1, 2021, 1:44 p.m. UTC | #4
On Wed, Sep 29, 2021 at 12:55 PM Kadam, Pallavi <pallavi.kadam@intel.com> wrote:
>
>
> On 9/15/2021 9:26 AM, Tal Shnaiderman wrote:
> > Build the security library on Windows.
> >
> > Remove unneeded export from version file.
> >
> > Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> > ---
> > Depends-on: patch-98796 ("cryptodev: build on Windows")
> > ---
> >   lib/meson.build          | 1 +
> >   lib/security/version.map | 1 -
> >   2 files changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/meson.build b/lib/meson.build
> > index 5f3b1cf365..e5f0094a82 100644
> > --- a/lib/meson.build
> > +++ b/lib/meson.build
> > @@ -86,6 +86,7 @@ if is_windows
> >               'gso',
> >               'latencystats',
> >               'pdump',
> > +            'security',
> >       ] # only supported libraries for windows
> >   endif
> >
> > diff --git a/lib/security/version.map b/lib/security/version.map
> > index c44c7f5f60..6067051552 100644
> > --- a/lib/security/version.map
> > +++ b/lib/security/version.map
> > @@ -1,7 +1,6 @@
> >   DPDK_22 {
> >       global:
> >
> > -     rte_security_attach_session;
> >       rte_security_capabilities_get;
> >       rte_security_capability_get;
> >       rte_security_session_create;
>
> Getting linking errors using clang for 'rte_security_get_userdata' and
> 'rte_security_set_pkt_metadata' as below:
>
> FAILED: lib/rte_security-22.dll
> "clang"  -Wl,/MACHINE:X64 -Wl,/OUT:lib/rte_security-22.dll
> lib/librte_security.a.p/security_rte_security.c.obj "-Wl,/nologo"
> "-Wl,/release" "-Wl,/nologo" "-Wl,/OPT:REF" "-Wl,/DLL"
> "-Wl,/IMPLIB:lib\rte_security.lib" "lib\rte_eal.lib"
> "lib\rte_kvargs.lib" "lib\rte_mempool.lib" "lib\rte_ring.lib"
> "lib\rte_cryptodev.lib" "lib\rte_mbuf.lib" "lib\rte_rcu.lib"
> "lib\rte_net.lib"
> "-Wl,/def:C:\dpdk\ixgbe\dpdk\build\lib\rte_security_exports.def"
> "-ldbghelp" "-lsetupapi" "-lws2_32" "-lmincore" "-lkernel32" "-luser32"
> "-lgdi32" "-lwinspool" "-lshell32" "-lole32" "-loleaut32" "-luuid"
> "-lcomdlg32" "-ladvapi32"
> rte_security_exports.def : error LNK2001: unresolved external symbol
> rte_security_get_userdata
> rte_security_exports.def : error LNK2001: unresolved external symbol
> rte_security_set_pkt_metadata
> lib\rte_security.lib : fatal error LNK1120: 2 unresolved externals
> clang: error: linker command failed with exit code 1120 (use -v to see
> invocation)
>
> Should it be removed from version file?
>
Previously it works ok, now on the latest main branch also hit the same issue.
And yes, we should remove it from the version file.
I will prepare the patch.
William
diff mbox series

Patch

diff --git a/lib/meson.build b/lib/meson.build
index 5f3b1cf365..e5f0094a82 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -86,6 +86,7 @@  if is_windows
             'gso',
             'latencystats',
             'pdump',
+            'security',
     ] # only supported libraries for windows
 endif
 
diff --git a/lib/security/version.map b/lib/security/version.map
index c44c7f5f60..6067051552 100644
--- a/lib/security/version.map
+++ b/lib/security/version.map
@@ -1,7 +1,6 @@ 
 DPDK_22 {
 	global:
 
-	rte_security_attach_session;
 	rte_security_capabilities_get;
 	rte_security_capability_get;
 	rte_security_session_create;