From: Zhangfei Gao <zhangfei.gao@linaro.org>
To: Akhil Goyal <gakhil@marvell.com>
Cc: Fan Zhang <fanzhang.oss@gmail.com>,
Ashish Gupta <ashishg@marvell.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [EXTERNAL] [PATCH 2/3] compress/uadk: support basic operations
Date: Fri, 24 May 2024 18:01:10 +0800 [thread overview]
Message-ID: <CABQgh9Ep_FqJ=LEi40L6=BtN-B8rarr+gmJuQCQH57Y4Q7ukZw@mail.gmail.com> (raw)
In-Reply-To: <CO6PR18MB4484695527069B0AB6F54F25D8F42@CO6PR18MB4484.namprd18.prod.outlook.com>
Hi, Akhil
Thanks for your time.
On Thu, 23 May 2024 at 23:38, Akhil Goyal <gakhil@marvell.com> wrote:
>
> 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?
Yes, good idea, this can be simplified, and can remove
uadk_compress_priv as well.
But it looks like rte_compressdev_pmd_create requires the priv data,
otherwise it will return an error if private_data_size == 0.
Could rte_compressdev_pmd_create be changed only alloc
compressdev->data->dev_private only if data_size != 0.
Or I am checking whether to simply add one priv.
>
> 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.
OK.
One more question,
rte_compressdev_pmd_init_params does not have .max_nb_queue_pairs as
rte_cryptodev_pmd_init_params.
So dpdk-test-compress-perf will use 128 queues by default, except
adding -l 1,2.
Is this expected?
Thanks
>
next prev parent reply other threads:[~2024-05-24 10:01 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 ` [EXTERNAL] " Akhil Goyal
2024-05-24 10:01 ` Zhangfei Gao [this message]
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='CABQgh9Ep_FqJ=LEi40L6=BtN-B8rarr+gmJuQCQH57Y4Q7ukZw@mail.gmail.com' \
--to=zhangfei.gao@linaro.org \
--cc=ashishg@marvell.com \
--cc=dev@dpdk.org \
--cc=fanzhang.oss@gmail.com \
--cc=gakhil@marvell.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).