DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: "Zhang, Roy Fan" <roy.fan.zhang@intel.com>
Cc: Ferruh Yigit <ferruh.yigit@xilinx.com>,
	"Ji, Kai" <kai.ji@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev v2 1/2] build: add in option for qat use intel ipsec-mb lib
Date: Thu, 19 May 2022 15:39:49 +0100	[thread overview]
Message-ID: <YoZWtbmztAfpZI+h@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <MW5PR11MB5809B20E30D750EF37C03372B8D09@MW5PR11MB5809.namprd11.prod.outlook.com>

On Thu, May 19, 2022 at 01:25:25PM +0100, Zhang, Roy Fan wrote:
> Hi Bruce,
> 
> > -----Original Message-----
> > From: Richardson, Bruce <bruce.richardson@intel.com>
> > Sent: Thursday, May 19, 2022 11:23 AM
> > To: Zhang, Roy Fan <roy.fan.zhang@intel.com>
> > Cc: Ferruh Yigit <ferruh.yigit@xilinx.com>; Ji, Kai <kai.ji@intel.com>;
> > dev@dpdk.org
> > Subject: Re: [dpdk-dev v2 1/2] build: add in option for qat use intel ipsec-mb
> > lib
> >
> > On Thu, May 19, 2022 at 10:14:14AM +0100, Zhang, Roy Fan wrote:
> > > > -----Original Message-----
> > > > From: Richardson, Bruce <bruce.richardson@intel.com>
> > > > Sent: Wednesday, May 18, 2022 11:33 AM
> > > > To: Ferruh Yigit <ferruh.yigit@xilinx.com>
> > > > Cc: Ji, Kai <kai.ji@intel.com>; dev@dpdk.org; Zhang, Roy Fan
> > > > <roy.fan.zhang@intel.com>
> > > > Subject: Re: [dpdk-dev v2 1/2] build: add in option for qat use intel ipsec-
> > mb
> > > > lib
> > > >
> > > > On Wed, May 18, 2022 at 11:26:27AM +0100, Ferruh Yigit wrote:
> > > > > On 5/18/2022 9:04 AM, Bruce Richardson wrote:
> > > > > > On Tue, May 17, 2022 at 10:16:51PM +0800, Kai Ji wrote:
> > > > > > > Add in build option for QAT pmd use intel ipsec-mb lib
> > > > > > > instead openssl for precompute partial hash & aes.
> > > > > > >
> > > > > > > Signed-off-by: Kai Ji <kai.ji@intel.com>
> > > > > > > ---
> > > > > > >   drivers/common/qat/meson.build | 12 ++++++++++++
> > > > > > >   meson_options.txt              |  2 ++
> > > > > > >   2 files changed, 14 insertions(+)
> > > > > > >
> > > > > > > diff --git a/drivers/common/qat/meson.build
> > > > b/drivers/common/qat/meson.build
> > > > > > > index b7027f3164..d6eaff3e0e 100644
> > > > > > > --- a/drivers/common/qat/meson.build
> > > > > > > +++ b/drivers/common/qat/meson.build
> > > > > > > @@ -35,6 +35,18 @@ if qat_crypto and not libcrypto.found()
> > > > > > >               'missing dependency, libcrypto')
> > > > > > >   endif
> > > > > > > +if get_option('qat_libipsecmb')
> > > > > > > +    IMB_required_ver = '1.0.0'
> > > > > > > +    libipsecmb = cc.find_library('IPSec_MB', required: false)
> > > > > > > +    if not lib.found()
> > > > > > > +        build = false
> > > > > > > +        reason = 'missing dependency, "libIPSec_MB"'
> > > > > > > +    else
> > > > > > > +        ext_deps += libipsecmb
> > > > > > > +        dpdk_conf.set('RTE_QAT_LIBIPSECMB', true)
> > > > > > > +    endif
> > > > > > > +endif
> > > > > > > +
> > > > > >
> > > > > > In general it's not a good idea for individual drivers to add top-level
> > > > > > meson.build options. If every driver does this for all its options we will
> > > > > > have an unmanageable set of hundreds of options. Unfortunately,
> > > > though, I
> > > > > > don't see a really good way to replace this with something other than
> > a
> > > > > > build option - I assume it's not just good enough to check which of the
> > > > > > dependencies is found/not-found? Is there some way that this can be
> > a
> > > > > > generic option, that may be applicable to other drivers? Could the
> > option
> > > > > > be instead to prioritize FIPs compatibility?
> > > > > >
> > > > >
> > > > > +1 to not have top level meson option for a driver.
> > > > >
> > > > > Will it work to give priority to intel-ipsec-mb lib, like when ipsec-mb
> > > > > library exists use it, else use openssl?
> > > >
> > > > Looking at the patch a bit more, is there a reason why this cannot be
> > made
> > > > a run-time option when both libraries are available?
> > >
> > > Hi Bruce,
> > >
> > > Thanks for the review.
> > > Are you suggesting adding a EAL option to the QAT PMD?
> > >
> > I was thinking you can add a driver option, to allow switching from the
> > default if both openssl and ipsec-mb were available to be compiled in.
> 
> We may have to use macros to filter out openssl deprecated API calls
> otherwise the warning may still be there. Also what kind of driver option
> are we talking about - any reference you can point to us? Much appreciated!
> 

Many drivers support additional parameters, but the vdev's are the most
common case. For example, AF_XDP:

http://git.dpdk.org/dpdk/tree/drivers/net/af_xdp/rte_eth_af_xdp.c#n2056

or for a physical PCI devices, i40e:

http://git.dpdk.org/dpdk/tree/drivers/net/i40e/i40e_ethdev.c#n12133

/Bruce

  reply	other threads:[~2022-05-19 14:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07 15:29 [PATCH] crypto/qat: use intel-ipsec-mb for partial hash Fan Zhang
2022-04-14 18:45 ` [External] : " Changchun Zhang
2022-04-20 18:14   ` Changchun Zhang
2022-05-17 14:21     ` Ji, Kai
2022-05-17 14:16 ` [dpdk-dev v2 1/2] build: add in option for qat use intel ipsec-mb lib Kai Ji
2022-05-17 14:16   ` [dpdk-dev v2 2/2] crypto/qat: use intel-ipsec-mb for partial hash & aes Kai Ji
2022-05-17 15:01     ` Zhang, Roy Fan
2022-05-17 15:00   ` [dpdk-dev v2 1/2] build: add in option for qat use intel ipsec-mb lib Zhang, Roy Fan
2022-05-18  8:04   ` Bruce Richardson
2022-05-18 10:26     ` Ferruh Yigit
2022-05-18 10:33       ` Bruce Richardson
2022-05-18 13:35         ` Ji, Kai
2022-05-19  9:14         ` Zhang, Roy Fan
2022-05-19 10:22           ` Bruce Richardson
2022-05-19 12:25             ` Zhang, Roy Fan
2022-05-19 14:39               ` Bruce Richardson [this message]
2022-05-19  9:22       ` Zhang, Roy Fan
2022-05-19 11:15         ` Ferruh Yigit

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=YoZWtbmztAfpZI+h@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@xilinx.com \
    --cc=kai.ji@intel.com \
    --cc=roy.fan.zhang@intel.com \
    /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).