From: Akhil Goyal <gakhil@marvell.com>
To: Zhangfei Gao <zhangfei.gao@linaro.org>,
Fan Zhang <fanzhang.oss@gmail.com>,
Ashish Gupta <ashishg@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [EXTERNAL] [PATCH 2/3] compress/uadk: support basic operations
Date: Thu, 23 May 2024 15:38:06 +0000 [thread overview]
Message-ID: <CO6PR18MB4484695527069B0AB6F54F25D8F42@CO6PR18MB4484.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20240422143102.251-3-zhangfei.gao@linaro.org>
Hi Zhangfei,
Overall, a well written driver.
Please see below comment.
> +static int
> +uadk_compress_pmd_config(struct rte_compressdev *dev,
> + struct rte_compressdev_config *config)
> +{
> + char mp_name[RTE_MEMPOOL_NAMESIZE];
> + struct uadk_compress_priv *priv;
> + struct rte_mempool *mp;
> + int ret;
> +
> + if (dev == NULL || config == NULL)
> + return -EINVAL;
> +
> + snprintf(mp_name, RTE_MEMPOOL_NAMESIZE,
> + "stream_mp_%u", dev->data->dev_id);
> + priv = dev->data->dev_private;
> +
> + /* alloc resources */
> + ret = wd_comp_env_init(NULL);
> + if (ret < 0)
> + return -EINVAL;
> +
> + mp = priv->mp;
> + if (mp == NULL) {
> + mp = rte_mempool_create(mp_name,
> + config->max_nb_priv_xforms +
> + config->max_nb_streams,
> + sizeof(struct uadk_stream),
> + 0, 0, NULL, NULL, NULL,
> + NULL, config->socket_id, 0);
> + if (mp == NULL) {
> + UADK_LOG(ERR, "Cannot create private xform pool on
> socket %d\n",
> + config->socket_id);
> + ret = -ENOMEM;
> + goto err_mempool;
> + }
> + priv->mp = mp;
> + }
Do you really need a mempool here? It is for uadk_stream which is just struct of pointer and an enum.
It can simply be rte_malloc.
And even you do not need uadk_compress_priv.
This can be simplified. Right?
Also remove the execution part of documentation from 1/3 and add it in 3/3
Since the PMD is complete in 3/3, release notes and execution part of documentation should be in last patch.
next prev parent reply other threads:[~2024-05-23 15:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-22 14:30 [PATCH 0/3] Introduce UADK compression driver Zhangfei Gao
2024-04-22 14:31 ` [PATCH 1/3] compress/uadk: " Zhangfei Gao
2024-05-23 16:20 ` Stephen Hemminger
2024-05-23 16:30 ` Konstantin Ananyev
2024-05-23 16:42 ` Tyler Retzlaff
2024-05-24 9:43 ` Zhangfei Gao
2024-04-22 14:31 ` [PATCH 2/3] compress/uadk: support basic operations Zhangfei Gao
2024-05-23 15:38 ` Akhil Goyal [this message]
2024-05-24 10:01 ` [EXTERNAL] " Zhangfei Gao
2024-05-24 10:20 ` Akhil Goyal
2024-05-24 14:45 ` Zhangfei Gao
2024-05-24 14:54 ` Akhil Goyal
2024-04-22 14:31 ` [PATCH 3/3] compress/uadk: support burst enqueue/dequeue Zhangfei Gao
2024-05-11 3:05 ` [PATCH 0/3] Introduce UADK compression driver Zhangfei Gao
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=CO6PR18MB4484695527069B0AB6F54F25D8F42@CO6PR18MB4484.namprd18.prod.outlook.com \
--to=gakhil@marvell.com \
--cc=ashishg@marvell.com \
--cc=dev@dpdk.org \
--cc=fanzhang.oss@gmail.com \
--cc=zhangfei.gao@linaro.org \
/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).