DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tal Shnaiderman <talshn@nvidia.com>
To: Akhil Goyal <gakhil@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
	"pallavi.kadam@intel.com" <pallavi.kadam@intel.com>,
	"dmitry.kozliuk@gmail.com" <dmitry.kozliuk@gmail.com>,
	"navasile@linux.microsoft.com" <navasile@linux.microsoft.com>,
	"dmitrym@microsoft.com" <dmitrym@microsoft.com>,
	"declan.doherty@intel.com" <declan.doherty@intel.com>
Subject: Re: [dpdk-dev] [EXT] [PATCH 1/2] security: use the net library for IP structs
Date: Thu, 16 Sep 2021 18:40:13 +0000	[thread overview]
Message-ID: <DM4PR12MB53896DD31A33ACCD13502F81A4DC9@DM4PR12MB5389.namprd12.prod.outlook.com> (raw)
In-Reply-To: <CO6PR18MB4484EE9F29CEE6037C27358BD8DB9@CO6PR18MB4484.namprd18.prod.outlook.com>

> Subject: RE: [EXT] [PATCH 1/2] security: use the net library for IP structs
> 
> External email: Use caution opening links or attachments
> 
> 
> > Remove the netinet includes and replaces them with rte_ip.h to support
> > the in_addr/in6_addr structs on all operating systems.
> >
> > Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> > ---
> >  lib/net/rte_ip.h            | 1 +
> >  lib/security/meson.build    | 2 +-
> >  lib/security/rte_security.h | 5 +----
> >  3 files changed, 3 insertions(+), 5 deletions(-)
> >
> > diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h index
> > 05948b69b7..bbd8650962 100644
> > --- a/lib/net/rte_ip.h
> > +++ b/lib/net/rte_ip.h
> > @@ -25,6 +25,7 @@
> >  #include <netinet/in.h>
> >  #include <arpa/inet.h>
> >  #include <netinet/ip.h>
> > +#include <netinet/ip6.h>
> >  #endif
> >
> >  #include <rte_byteorder.h>
> > diff --git a/lib/security/meson.build b/lib/security/meson.build index
> > 5679c8b5c2..1034a7a299 100644
> > --- a/lib/security/meson.build
> > +++ b/lib/security/meson.build
> > @@ -3,4 +3,4 @@
> >
> >  sources = files('rte_security.c')
> >  headers = files('rte_security.h', 'rte_security_driver.h') -deps +=
> > ['mempool', 'cryptodev']
> > +deps += ['mempool', 'cryptodev', 'net']
> 
> It is just a header file inclusion, will it really need to add dependency on 'net'?
> 

Without it I'm getting an error of missing file on the new include, I can replace it with an ifdef similar to what rte_ip.h has and loose the dependency:

#ifdef RTE_EXEC_ENV_WINDOWS
#include <ws2tcpip.h>
#else
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip6.h>
#endif

however I think it's better to remove OS includes, unless there is an issue with adding 'net' as dependency.

> > diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h
> > index 2e136d7929..0c1adcee21 100644
> > --- a/lib/security/rte_security.h
> > +++ b/lib/security/rte_security.h
> > @@ -19,13 +19,10 @@ extern "C" {
> >
> >  #include <sys/types.h>
> >
> > -#include <netinet/in.h>
> > -#include <netinet/ip.h>
> > -#include <netinet/ip6.h>
> > -
> >  #include <rte_compat.h>
> >  #include <rte_common.h>
> >  #include <rte_crypto.h>
> > +#include <rte_ip.h>
> >  #include <rte_mbuf.h>
> >  #include <rte_mbuf_dyn.h>
> >  #include <rte_memory.h>
> > --
> > 2.16.1.windows.4


  reply	other threads:[~2021-09-16 18:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15 16:26 [dpdk-dev] " Tal Shnaiderman
2021-09-15 16:26 ` [dpdk-dev] [PATCH 2/2] security: build on Windows Tal Shnaiderman
2021-09-19 14:07   ` William Tu
2021-09-29 19:55   ` Kadam, Pallavi
2021-09-30  6:33     ` Tal Shnaiderman
2021-10-01 13:44     ` William Tu
2021-09-15 18:28 ` [dpdk-dev] [EXT] [PATCH 1/2] security: use the net library for IP structs Akhil Goyal
2021-09-16 18:40   ` Tal Shnaiderman [this message]
2021-09-19 14:06 ` [dpdk-dev] " William Tu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM4PR12MB53896DD31A33ACCD13502F81A4DC9@DM4PR12MB5389.namprd12.prod.outlook.com \
    --to=talshn@nvidia.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=dmitrym@microsoft.com \
    --cc=gakhil@marvell.com \
    --cc=navasile@linux.microsoft.com \
    --cc=pallavi.kadam@intel.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).