DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Roy Fan" <roy.fan.zhang@intel.com>
To: "Ji, Kai" <kai.ji@intel.com>, Akhil Goyal <gakhil@marvell.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "thomas@monjalon.net" <thomas@monjalon.net>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>,
	"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>,
	"anoobj@marvell.com" <anoobj@marvell.com>,
	"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>,
	"Trahe, Fiona" <fiona.trahe@intel.com>,
	"Doherty, Declan" <declan.doherty@intel.com>,
	"matan@nvidia.com" <matan@nvidia.com>,
	"g.singh@nxp.com" <g.singh@nxp.com>,
	"jianjay.zhou@huawei.com" <jianjay.zhou@huawei.com>,
	"asomalap@amd.com" <asomalap@amd.com>,
	"ruifeng.wang@arm.com" <ruifeng.wang@arm.com>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"Nicolau, Radu" <radu.nicolau@intel.com>,
	"ajit.khaparde@broadcom.com" <ajit.khaparde@broadcom.com>,
	"rnagadheeraj@marvell.com" <rnagadheeraj@marvell.com>,
	"adwivedi@marvell.com" <adwivedi@marvell.com>,
	"Power, Ciara" <ciara.power@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2 0/5] cryptodev: hide internal structures
Date: Mon, 11 Oct 2021 18:21:42 +0000	[thread overview]
Message-ID: <MW5PR11MB5809760238859832441BD9ABB8B59@MW5PR11MB5809.namprd11.prod.outlook.com> (raw)
In-Reply-To: <SN6PR11MB34085E0D08B14CE2D724ACFC81B59@SN6PR11MB3408.namprd11.prod.outlook.com>

Hi Kai and Akhil,

Thanks Kai for finding the problem. 

To resolve the seg fault for multi-process and keep the structure private,
Instead  of creating the fp_ops we may ditch making
rte_cryptodev_enqueue_burst() and  rte_cryptodev_dequeue_burst() 
inline, and keep everything else as it was? To me these inlines looks not
very useful on performance wise anyway.

Regards,
Fan

> -----Original Message-----
> From: Ji, Kai <kai.ji@intel.com>
> Sent: Monday, October 11, 2021 6:07 PM
> To: Zhang, Roy Fan <roy.fan.zhang@intel.com>; Akhil Goyal
> <gakhil@marvell.com>; dev@dpdk.org
> Cc: thomas@monjalon.net; david.marchand@redhat.com;
> hemant.agrawal@nxp.com; anoobj@marvell.com; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> Doherty, Declan <declan.doherty@intel.com>; matan@nvidia.com;
> g.singh@nxp.com; jianjay.zhou@huawei.com; asomalap@amd.com;
> ruifeng.wang@arm.com; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; Nicolau, Radu <radu.nicolau@intel.com>;
> ajit.khaparde@broadcom.com; rnagadheeraj@marvell.com;
> adwivedi@marvell.com; Power, Ciara <ciara.power@intel.com>
> Subject: RE: [PATCH v2 0/5] cryptodev: hide internal structures
> 
> Hi Akhil,
> 
> Just ran a quick mutli process test against the patch set, unfortunately it
> failed on the secondary process enqueue or dequeue.
> 
> USER1: Configuring vector 0, using session 0
> USER1: Start enqueuing packets on dev 0 qp 0
> USER1: Start dequeuing packets on dev 0 qp 0
> USER1: Enqueuing - Dequeueing -Segmentation fault (core dumped)
> 
> It will happen on any PMD type.
> 
> Regards
> 
> Kai
> 
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Zhang, Roy Fan
> > Sent: Monday, October 11, 2021 5:03 PM
> > To: Akhil Goyal <gakhil@marvell.com>; dev@dpdk.org
> > Cc: thomas@monjalon.net; david.marchand@redhat.com;
> > hemant.agrawal@nxp.com; anoobj@marvell.com; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> > Doherty, Declan <declan.doherty@intel.com>; matan@nvidia.com;
> > g.singh@nxp.com; jianjay.zhou@huawei.com; asomalap@amd.com;
> > ruifeng.wang@arm.com; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>; Nicolau, Radu
> <radu.nicolau@intel.com>;
> > ajit.khaparde@broadcom.com; rnagadheeraj@marvell.com;
> > adwivedi@marvell.com; Power, Ciara <ciara.power@intel.com>
> > Subject: Re: [dpdk-dev] [PATCH v2 0/5] cryptodev: hide internal structures
> >
> > Hi Akhil,
> >
> > The approach looks great but we may have to check if it works in multi-
> > process environment - since all enqueue/dequeue handlers are set by
> > primary process the secondary process may not recognize the fp_ops data.
> >
> > We will run a quick test to see if it is true.
> >
> > Regards,
> > Fan
> >
> > > -----Original Message-----
> > > From: Akhil Goyal <gakhil@marvell.com>
> > > Sent: Monday, October 11, 2021 1:43 PM
> > > To: dev@dpdk.org
> > > Cc: thomas@monjalon.net; david.marchand@redhat.com;
> > > hemant.agrawal@nxp.com; anoobj@marvell.com; De Lara Guarch, Pablo
> > > <pablo.de.lara.guarch@intel.com>; Trahe, Fiona
> > > <fiona.trahe@intel.com>; Doherty, Declan <declan.doherty@intel.com>;
> > > matan@nvidia.com; g.singh@nxp.com; Zhang, Roy Fan
> > > <roy.fan.zhang@intel.com>; jianjay.zhou@huawei.com;
> > asomalap@amd.com;
> > > ruifeng.wang@arm.com; Ananyev, Konstantin
> > > <konstantin.ananyev@intel.com>; Nicolau, Radu
> > > <radu.nicolau@intel.com>; ajit.khaparde@broadcom.com;
> > > rnagadheeraj@marvell.com; adwivedi@marvell.com; Power, Ciara
> > > <ciara.power@intel.com>; Akhil Goyal <gakhil@marvell.com>
> > > Subject: [PATCH v2 0/5] cryptodev: hide internal structures
> > >
> > > Structures rte_cryptodev and rte_cryptodev_data are not supposed to
> be
> > > directly used by the application. These are made public as they are
> > > used by inline datapath public APIs.
> > > This patchset, creates a new rte_cryptodev_core.h file which helps in
> > > defining a data structure to hold datapath APIs in a flat array based
> > > on the device identifier which is filled by the PMD.
> > >
> > > Similar series for ethdev and eventdev are also floated on ML.
> > > https://patchwork.dpdk.org/project/dpdk/list/?series=19428
> > > https://patchwork.dpdk.org/project/dpdk/list/?series=19405
> > >
> > > changes in v2: align with the latest versions of above series.
> > >
> > > Akhil Goyal (5):
> > >   cryptodev: separate out internal structures
> > >   cryptodev: allocate max space for internal qp array
> > >   cryptodev: move inline APIs into separate structure
> > >   cryptodev: update fast path APIs to use new flat array
> > >   cryptodev: move device specific structures
> > >
> > >  drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |   1 -
> > >  drivers/crypto/ccp/ccp_dev.h                  |   2 +-
> > >  drivers/crypto/cnxk/cn10k_ipsec.c             |   2 +-
> > >  drivers/crypto/cnxk/cn9k_ipsec.c              |   2 +-
> > >  .../crypto/cnxk/cnxk_cryptodev_capabilities.c |   2 +-
> > >  drivers/crypto/cnxk/cnxk_cryptodev_sec.c      |   2 +-
> > >  drivers/crypto/nitrox/nitrox_sym_reqmgr.c     |   2 +-
> > >  drivers/crypto/octeontx/otx_cryptodev.c       |   1 -
> > >  .../crypto/octeontx/otx_cryptodev_hw_access.c |   2 +-
> > >  .../crypto/octeontx/otx_cryptodev_hw_access.h |   2 +-
> > >  drivers/crypto/octeontx/otx_cryptodev_ops.h   |   2 +-
> > >  .../crypto/octeontx2/otx2_cryptodev_mbox.c    |   2 +-
> > >  drivers/crypto/scheduler/scheduler_failover.c |   2 +-
> > >  .../crypto/scheduler/scheduler_multicore.c    |   2 +-
> > >  .../scheduler/scheduler_pkt_size_distr.c      |   2 +-
> > >  .../crypto/scheduler/scheduler_roundrobin.c   |   2 +-
> > >  drivers/event/cnxk/cnxk_eventdev.h            |   2 +-
> > >  drivers/event/dpaa/dpaa_eventdev.c            |   2 +-
> > >  drivers/event/dpaa2/dpaa2_eventdev.c          |   2 +-
> > >  drivers/event/octeontx/ssovf_evdev.c          |   2 +-
> > >  .../event/octeontx2/otx2_evdev_crypto_adptr.c |   2 +-
> > >  lib/cryptodev/cryptodev_pmd.c                 |  51 +++
> > >  lib/cryptodev/cryptodev_pmd.h                 |  82 +++-
> > >  lib/cryptodev/meson.build                     |   4 +-
> > >  lib/cryptodev/rte_cryptodev.c                 |  50 ++-
> > >  lib/cryptodev/rte_cryptodev.h                 | 367 +++++++-----------
> > >  lib/cryptodev/rte_cryptodev_core.h            |  62 +++
> > >  lib/cryptodev/version.map                     |   7 +-
> > >  28 files changed, 398 insertions(+), 265 deletions(-)  create mode
> > > 100644 lib/cryptodev/rte_cryptodev_core.h
> > >
> > > --
> > > 2.25.1


  reply	other threads:[~2021-10-11 18:21 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-29 12:51 [dpdk-dev] [PATCH 0/8] cryptodev: hide internal strutures Akhil Goyal
2021-08-29 12:51 ` [dpdk-dev] [PATCH 1/8] cryptodev: separate out internal structures Akhil Goyal
2021-09-08 10:50   ` Anoob Joseph
2021-09-08 11:11     ` Akhil Goyal
2021-09-13 14:10   ` Zhang, Roy Fan
2021-08-29 12:51 ` [dpdk-dev] [PATCH 2/8] cryptodev: move inline APIs into separate structure Akhil Goyal
2021-09-13 14:11   ` Zhang, Roy Fan
2021-09-16 15:21   ` Ananyev, Konstantin
2021-08-29 12:51 ` [dpdk-dev] [PATCH 3/8] cryptodev: add helper functions for new datapath interface Akhil Goyal
2021-08-30 20:07   ` Zhang, Roy Fan
2021-08-31  6:14     ` Akhil Goyal
2021-09-13 14:20   ` Zhang, Roy Fan
2021-08-29 12:51 ` [dpdk-dev] [PATCH 4/8] cryptodev: use new API for datapath functions Akhil Goyal
2021-09-13 14:20   ` Zhang, Roy Fan
2021-08-29 12:51 ` [dpdk-dev] [PATCH 5/8] drivers/crypto: use new framework for datapath Akhil Goyal
2021-09-13 14:20   ` Zhang, Roy Fan
2021-08-29 12:51 ` [dpdk-dev] [PATCH 6/8] crypto/scheduler: rename enq-deq functions Akhil Goyal
2021-09-13 14:21   ` Zhang, Roy Fan
2021-08-29 12:51 ` [dpdk-dev] [PATCH 7/8] crypto/scheduler: update for new datapath framework Akhil Goyal
2021-09-13 14:21   ` Zhang, Roy Fan
2021-08-29 12:51 ` [dpdk-dev] [PATCH 8/8] cryptodev: move device specific structures Akhil Goyal
2021-09-13 14:22   ` Zhang, Roy Fan
2021-09-06 18:29 ` [dpdk-dev] [PATCH 0/8] cryptodev: hide internal strutures Akhil Goyal
2021-09-13 14:09 ` Zhang, Roy Fan
2021-10-11 12:43 ` [dpdk-dev] [PATCH v2 0/5] cryptodev: hide internal structures Akhil Goyal
2021-10-11 12:43   ` [dpdk-dev] [PATCH v2 1/5] cryptodev: separate out " Akhil Goyal
2021-10-11 14:50     ` Zhang, Roy Fan
2021-10-11 12:43   ` [dpdk-dev] [PATCH v2 2/5] cryptodev: allocate max space for internal qp array Akhil Goyal
2021-10-11 14:51     ` Zhang, Roy Fan
2021-10-11 12:43   ` [dpdk-dev] [PATCH v2 3/5] cryptodev: move inline APIs into separate structure Akhil Goyal
2021-10-11 14:45     ` Zhang, Roy Fan
2021-10-18  7:02       ` Akhil Goyal
2021-10-11 12:43   ` [dpdk-dev] [PATCH v2 4/5] cryptodev: update fast path APIs to use new flat array Akhil Goyal
2021-10-11 14:54     ` Zhang, Roy Fan
2021-10-11 12:43   ` [dpdk-dev] [PATCH v2 5/5] cryptodev: move device specific structures Akhil Goyal
2021-10-11 15:05     ` Zhang, Roy Fan
2021-10-18  7:07       ` Akhil Goyal
2021-10-11 16:03   ` [dpdk-dev] [PATCH v2 0/5] cryptodev: hide internal structures Zhang, Roy Fan
2021-10-11 17:07     ` Ji, Kai
2021-10-11 18:21       ` Zhang, Roy Fan [this message]
2021-10-15 18:38   ` Ananyev, Konstantin
2021-10-15 18:42     ` Akhil Goyal
2021-10-19 11:03       ` Ananyev, Konstantin
2021-10-18 14:41   ` [dpdk-dev] [PATCH v3 0/7] " Akhil Goyal
2021-10-18 14:41     ` [dpdk-dev] [PATCH v3 1/7] cryptodev: separate out " Akhil Goyal
2021-10-18 14:41     ` [dpdk-dev] [PATCH v3 2/7] cryptodev: allocate max space for internal qp array Akhil Goyal
2021-10-18 14:41     ` [dpdk-dev] [PATCH v3 3/7] cryptodev: move inline APIs into separate structure Akhil Goyal
2021-10-19 11:11       ` Ananyev, Konstantin
2021-10-19 11:50         ` Akhil Goyal
2021-10-19 14:27           ` Ananyev, Konstantin
2021-10-19 16:00       ` Zhang, Roy Fan
2021-10-18 14:41     ` [dpdk-dev] [PATCH v3 4/7] cryptodev: add PMD device probe finish API Akhil Goyal
2021-10-19 16:01       ` Zhang, Roy Fan
2021-10-18 14:41     ` [dpdk-dev] [PATCH v3 5/7] drivers/crypto: invoke probing finish function Akhil Goyal
2021-10-19 16:03       ` Zhang, Roy Fan
2021-10-20  7:05       ` Matan Azrad
2021-10-18 14:42     ` [dpdk-dev] [PATCH v3 6/7] cryptodev: update fast path APIs to use new flat array Akhil Goyal
2021-10-19 12:28       ` Ananyev, Konstantin
2021-10-19 12:47         ` Akhil Goyal
2021-10-19 14:25           ` Ananyev, Konstantin
2021-10-18 14:42     ` [dpdk-dev] [PATCH v3 7/7] cryptodev: move device specific structures Akhil Goyal
2021-10-20 10:25     ` [dpdk-dev] [PATCH v3 0/7] cryptodev: hide internal structures Power, Ciara
2021-10-20 11:27     ` [dpdk-dev] [PATCH v4 0/8] " Akhil Goyal
2021-10-20 11:27       ` [dpdk-dev] [PATCH v4 1/8] cryptodev: separate out " Akhil Goyal
2021-10-20 11:27       ` [dpdk-dev] [PATCH v4 2/8] cryptodev: allocate max space for internal qp array Akhil Goyal
2021-10-20 11:27       ` [dpdk-dev] [PATCH v4 3/8] cryptodev: move inline APIs into separate structure Akhil Goyal
2021-10-20 11:27       ` [dpdk-dev] [PATCH v4 4/8] crypto/scheduler: use proper API for device start/stop Akhil Goyal
2021-10-20 11:31         ` Zhang, Roy Fan
2021-10-20 12:20           ` Ananyev, Konstantin
2021-10-20 11:27       ` [dpdk-dev] [PATCH v4 5/8] cryptodev: add PMD device probe finish API Akhil Goyal
2021-10-20 11:27       ` [dpdk-dev] [PATCH v4 6/8] drivers/crypto: invoke probing finish function Akhil Goyal
2021-10-20 11:27       ` [dpdk-dev] [PATCH v4 7/8] cryptodev: update fast path APIs to use new flat array Akhil Goyal
2021-10-20 11:27       ` [dpdk-dev] [PATCH v4 8/8] cryptodev: move device specific structures Akhil Goyal
2021-10-20 13:36       ` [dpdk-dev] [PATCH v4 0/8] cryptodev: hide internal structures Akhil Goyal

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=MW5PR11MB5809760238859832441BD9ABB8B59@MW5PR11MB5809.namprd11.prod.outlook.com \
    --to=roy.fan.zhang@intel.com \
    --cc=adwivedi@marvell.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=anoobj@marvell.com \
    --cc=asomalap@amd.com \
    --cc=ciara.power@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=g.singh@nxp.com \
    --cc=gakhil@marvell.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=kai.ji@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=matan@nvidia.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=radu.nicolau@intel.com \
    --cc=rnagadheeraj@marvell.com \
    --cc=ruifeng.wang@arm.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).