From: "Power, Ciara" <ciara.power@intel.com>
To: "Ji, Kai" <kai.ji@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "gakhil@marvell.com" <gakhil@marvell.com>, "Ji, Kai" <kai.ji@intel.com>
Subject: RE: [dpdk-dev v3 1/1] lib/cryptodev: multi-process IPC request handler
Date: Mon, 3 Oct 2022 16:39:03 +0000 [thread overview]
Message-ID: <MN2PR11MB38211D1083E6F6CFA6D74812E65B9@MN2PR11MB3821.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20221002224436.39571-1-kai.ji@intel.com>
Hi Kai,
Some small comments below.
> -----Original Message-----
> From: Kai Ji <kai.ji@intel.com>
> Sent: Sunday 2 October 2022 23:45
> To: dev@dpdk.org
> Cc: gakhil@marvell.com; Ji, Kai <kai.ji@intel.com>
> Subject: [dpdk-dev v3 1/1] lib/cryptodev: multi-process IPC request handler
>
> This patch add a function to support queue-pair configuration request to allow
> the primary or secondary process to setup/free the queue-pair via IPC handler.
> Add in queue pair in-used by process id array in rte_cryptodev_data for pid
> tracking.
>
> Signed-off-by: Kai Ji <kai.ji@intel.com>
<snip>
> +static int
> +rte_cryptodev_ipc_request(const struct rte_mp_msg *mp_msg, const void
> +*peer) {
> + struct rte_mp_msg mp_res;
> + struct rte_cryptodev_mp_param *res =
> + (struct rte_cryptodev_mp_param *)mp_res.param;
> + const struct rte_cryptodev_mp_param *param =
> + (const struct rte_cryptodev_mp_param *)mp_msg->param;
[CP]
The "param" name could be improved I think - maybe follow the "res" naming and call this one "msg"
Both are "mp_***->param" so I think it is confusing to have one named "param"
> +
> + int ret;
> + struct rte_cryptodev *dev;
> + uint16_t *qps_in_used_by_pid;
[CP]
Possible typo - change to "qp_in_use_by_pid" to match the naming of "dev->data->qp_in_use_by_pid"
<snip>
> +int rte_cryptodev_mp_request_register(void)
> +{
> + RTE_ASSERT(rte_eal_process_type() == RTE_PROC_PRIMARY);
> + return rte_mp_action_register(CRYPTODEV_MP_REQ,
> + rte_cryptodev_ipc_request);
> +}
> +
> +void rte_cryptodev_mp_request_unregister(void)
> +{
> + RTE_ASSERT(rte_eal_process_type() == RTE_PROC_PRIMARY);
> + rte_mp_action_unregister(CRYPTODEV_MP_REQ);
> +}
> +
[CP]
The above two functions should have the function return type on its own line.
<snip>
> +/**
> + * Register multi process request IPC handler
> + *
> + * @return
> + * - 0: Success registered
> + * - 1: Failed registration failed
> + * - -EINVAL: device was not configured
[CP]
Indent is off for success result
<snip>
Thanks,
Ciara
next prev parent reply other threads:[~2022-10-03 16:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-26 23:08 [dpdk-dev v1] " Kai Ji
2022-07-27 4:25 ` [EXT] " Akhil Goyal
2022-08-05 8:51 ` Zhang, Roy Fan
2022-08-08 7:43 ` Akhil Goyal
2022-08-12 8:06 ` Zhang, Roy Fan
2022-08-12 8:25 ` Akhil Goyal
2022-09-21 18:37 ` Akhil Goyal
2022-10-02 1:43 ` [dpdk-dev v2] " Kai Ji
2022-10-02 18:57 ` [EXT] " Akhil Goyal
2022-10-02 22:44 ` [dpdk-dev v3 1/1] " Kai Ji
2022-10-03 16:39 ` Power, Ciara [this message]
2022-10-04 18:12 ` [EXT] " Akhil Goyal
2022-10-06 0:57 ` Ji, Kai
2022-10-06 8:16 ` [dpdk-dev v4] " Kai Ji
2022-10-06 16:19 ` Power, Ciara
2022-10-06 17:06 ` [dpdk-dev v5] " Kai Ji
2022-10-06 18:49 ` [EXT] " Akhil Goyal
2022-10-06 23:11 ` Ji, Kai
2022-10-07 9:37 ` Zhang, Fan
2022-10-06 22:41 ` Konstantin Ananyev
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=MN2PR11MB38211D1083E6F6CFA6D74812E65B9@MN2PR11MB3821.namprd11.prod.outlook.com \
--to=ciara.power@intel.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=kai.ji@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).