[EXT] [dpdk-dev v1] lib/cryptodev: multi-process IPC request handler
Zhang, Roy Fan
roy.fan.zhang at intel.com
Fri Aug 12 10:06:13 CEST 2022
HI Akhil,
> -----Original Message-----
> From: Akhil Goyal <gakhil at marvell.com>
> Sent: Monday, August 8, 2022 8:43 AM
> To: Zhang, Roy Fan <roy.fan.zhang at intel.com>; Ji, Kai <kai.ji at intel.com>;
> dev at dpdk.org
> Cc: Anoob Joseph <anoobj at marvell.com>; hemant.agrawal at nxp.com;
> Chandubabu Namburu <chandu at amd.com>; Ruifeng Wang
> <ruifeng.wang at arm.com>; ajit.khaparde at broadcom.com; Michael Shamis
> <michaelsh at marvell.com>; Nagadheeraj Rottela
> <rnagadheeraj at marvell.com>; matan at nvidia.com; Jay Zhou
> <jianjay.zhou at huawei.com>
> Subject: RE: [EXT] [dpdk-dev v1] lib/cryptodev: multi-process IPC request
> handler
>
> Hi Fan,
> > Hi Akhil,
> >
> > > This is a library change you should cc all PMD owners while sending patch.
> > Kai is in holiday at the moment and will be back in a week. I will sync with
> him
> > then.
> > >
> > > > This patch add in multi-process IPC request handler function in rte
> > > > cryptodev. This function intend to support a queue-pair configuration
> > > > request to allow the secondary process to reconfigure the queue-pair
> > > > setup'ed by the primary process.
> > >
> > > Who will release the queue pair already setup by primary in the first place?
> >
> > Fan: If the queue pair already setup by primary the secondary shall not
> recreate
> > it
> > but use it instead.
>
> OK but the description says secondary would reconfigure the qp setup by
> primary.
>
> >
> > > Currently, all queues are setup by primary and secondary uses them.
> > > So if a queue is re-initialized by secondary, and if it is being used in
> primary
> > > process,
> > > Wont that drop packets abruptly if the queue is re-initialized?
> >
> > You are right. What about creating a variable in the queue pair with either
> PID
> > or thread id who own the queue pair?
>
> I believe we should not expose the PID/thread id via queue to the user
> application.
> This may be security issue.
You have a point.
>
> Instead an "in_use" parameter can be added which can tell if sone other
> process is using it or not.
> And this in_use param also need not be exposed to user. It can be
> completely hidden in the PMD.
> User will get an error number(probably -EUSERS) indicating the queue pair is
> already in use.
Great idea. That's what I am after too. So can I sum up the following change?
- each queue pair has a "in_use" param. I believe we can refine this a bit by
a "not_in_use", "in_use_by_primary" and "in_use_by_secondary" enum.
- the secondary process may request to configure a queue pair by sending
message to primary
- as of requesting freeing a queue pair
- primary can free any queue pair.
- but for secondary to free a queue pair, we have a problem:
- we may allow secondary to request freeing the queue pair if it
is "in_use_by_secondary". But then there may be a security
issue as a secondary can free a queue pair used by different
secondary process.
- or we may not allow secondary process to request freeing
any queue pair, it is securer, but less flexible.
>
> Regards,
> Akhil
Regards,
Fan
More information about the dev
mailing list