From: Akhil Goyal <gakhil@marvell.com>
To: Michael Baum <michaelba@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Matan Azrad <matan@nvidia.com>,
Ashish Gupta <ashishg@marvell.com>,
Fan Zhang <fanzhang.oss@gmail.com>, Kai Ji <kai.ji@intel.com>,
Thomas Monjalon <thomas@monjalon.net>,
"fiona.trahe@intel.com" <fiona.trahe@intel.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [EXT] [PATCH] compressdev: fix end of comp PMD list macro conflict
Date: Tue, 31 Jan 2023 08:23:25 +0000 [thread overview]
Message-ID: <CO6PR18MB448459C3255ABA7AFBAB9348D8D09@CO6PR18MB4484.namprd18.prod.outlook.com> (raw)
In-Reply-To: <CO6PR18MB448444DB939CD11808154DA3D8D39@CO6PR18MB4484.namprd18.prod.outlook.com>
> Subject: RE: [EXT] [PATCH] compressdev: fix end of comp PMD list macro
> conflict
>
> > The "rte_compressdev_info_get()" function retrieves the contextual
> > information of a device.
> > The output structure "dev_info" contains a list of devices supported
> > capabilities for each supported algorithm.
> >
> > In this function description, it says the element after the last valid
> > element has op field set to "RTE_COMP_ALGO_LIST_END".
> > On the other hand, when this function used by
> > "rte_compressdev_capability_get()" function, it uses
> > "RTE_COMP_ALGO_UNSPECIFIED" as end of list as same as the
> > "RTE_COMP_END_OF_CAPABILITIES_LIST()".
> >
> > The mlx5 and qat PMDs use "RTE_COMP_ALGO_LIST_END" as the end of
> > capabilities list. When "rte_compressdev_capability_get()" function is
> > called with unsupported algorithm, it might read memory out of bound.
> >
> > This patch change the "rte_compressdev_info_get()" function description
> > to say using "RTE_COMP_ALGO_UNSPECIFIED" as the end of capabilities
> > list.
> > In addition, it moves both mlx5 and qat PMDs to use
> > "RTE_COMP_ALGO_UNSPECIFIED" through
> > "RTE_COMP_END_OF_CAPABILITIES_LIST()" macro.
> >
> > Fixes: 5d432f364078 ("compressdev: add device capabilities")
> > Fixes: 2d148597ce76 ("compress/qat: add gen-specific implementation")
> > Fixes: 384bac8d6555 ("compress/mlx5: add supported capabilities")
> > Cc: fiona.trahe@intel.com
> > Cc: roy.fan.zhang@intel.com
> > Cc: matan@nvidia.com
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Michael Baum <michaelba@nvidia.com>
> >
> > ---
> >
> > After this change, I'm not sure about the purpose of
> > "RTE_COMP_ALGO_LIST_END".
> > There is no any other use of it in DPDK code, and it isn't represent the
> > number of algorithms supported by the API since the
> > "RTE_COMP_ALGO_UNSPECIFIED" is part of the enum.
> >
> > Due to the compress API is experimental I think the
> > "RTE_COMP_ALGO_LIST_END" can be removed.
> >
> +1 to remove the list end enums. This will also help in avoiding ABI breakage
> When we make this lib as stable.
Even RTE_COMP_HASH_ALGO_LIST_END can also be removed.
It is not used anywhere.
next prev parent reply other threads:[~2023-01-31 8:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-01 13:47 Michael Baum
2023-01-25 6:53 ` Michael Baum
2023-01-30 19:30 ` [EXT] " Akhil Goyal
2023-01-31 8:23 ` Akhil Goyal [this message]
2023-02-01 13:19 ` Akhil Goyal
2023-02-01 13:29 ` Michael Baum
2023-02-01 14:02 ` Akhil Goyal
2023-02-01 15:35 ` [PATCH v2 0/2] compressdev: fix end of list enums conflict Michael Baum
2023-02-01 15:35 ` [PATCH v2 1/2] compressdev: fix end of comp PMD list macro conflict Michael Baum
2023-02-01 15:35 ` [PATCH v2 2/2] compressdev: remove useless list end enums Michael Baum
2023-02-05 17:24 ` [EXT] [PATCH v2 0/2] compressdev: fix end of list enums conflict 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=CO6PR18MB448459C3255ABA7AFBAB9348D8D09@CO6PR18MB4484.namprd18.prod.outlook.com \
--to=gakhil@marvell.com \
--cc=ashishg@marvell.com \
--cc=dev@dpdk.org \
--cc=fanzhang.oss@gmail.com \
--cc=fiona.trahe@intel.com \
--cc=kai.ji@intel.com \
--cc=matan@nvidia.com \
--cc=michaelba@nvidia.com \
--cc=stable@dpdk.org \
--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).