From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Nic Chautru <nicolas.chautru@intel.com>,
dev@dpdk.org, thomas@monjalon.net
Cc: trix@redhat.com, mdr@ashroe.eu, bruce.richardson@intel.com,
hemant.agrawal@nxp.com, david.marchand@redhat.com,
stephen@networkplumber.org, hernan.vargas@intel.com
Subject: Re: [PATCH v3 01/13] baseband/acc100: refactor to segregate common code
Date: Wed, 21 Sep 2022 09:13:10 +0200 [thread overview]
Message-ID: <58a28ff9-03a5-450c-6cbb-438f25c5dc36@redhat.com> (raw)
In-Reply-To: <1663292106-45320-2-git-send-email-nicolas.chautru@intel.com>
On 9/16/22 03:34, Nic Chautru wrote:
> Refactoring all shareable common code to be used by future PMD
> (including ACC200 in this patchset as well as taking into account
> following PMDs in roadmap) by gathering such structures or inline methods.
> Cleaning up the enum files to remove un-used registers definitions.
> No functionality change.
>
> Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
You usually sign-off with Nicolas, but some of the patches of this
series are with Nic.
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> app/test-bbdev/test_bbdev_perf.c | 6 +-
> drivers/baseband/acc100/acc100_pf_enum.h | 939 -------------
> drivers/baseband/acc100/acc100_pmd.h | 449 +------
> drivers/baseband/acc100/acc101_pmd.h | 10 -
> drivers/baseband/acc100/acc_common.h | 1388 +++++++++++++++++++
> drivers/baseband/acc100/rte_acc100_cfg.h | 70 +-
> drivers/baseband/acc100/rte_acc100_pmd.c | 1856 ++++++++------------------
> drivers/baseband/acc100/rte_acc_common_cfg.h | 101 ++
> 8 files changed, 2069 insertions(+), 2750 deletions(-)
> create mode 100644 drivers/baseband/acc100/acc_common.h
> create mode 100644 drivers/baseband/acc100/rte_acc_common_cfg.h
Overall, I think the patch should be split.
For example:
- One patch for rings rework as it introduces new helpers (and this
patch should make use of them in ACC100).
- One patch for the structs renaming and move to common file.
- One patch for registers
- ...
It will make easier for the reviewer to identify discrepancies, and also
will help to identify regressions when using git bisect.
I have not done a full review of this patch, but something caught my eye
wrt to available entries calculation in rings:
> diff --git a/drivers/baseband/acc100/acc100_pf_enum.h b/drivers/baseband/acc100/acc100_pf_enum.h
> index 2fba667..f4e5002 100644
> --- a/drivers/baseband/acc100/acc100_pf_enum.h
> +++ b/drivers/baseband/acc100/acc100_pf_enum.h
> @@ -14,32 +14,6 @@
...
> +
> +/* Number of available descriptor in ring to enqueue */
> +static inline uint32_t
> +acc_ring_avail_enq(struct acc_queue *q)
> +{
> + return (q->sw_ring_depth - 1 + q->sw_ring_tail - q->sw_ring_head) % q->sw_ring_depth;
> +}
> +
> +/* Number of available descriptor in ring to dequeue */
> +static inline uint32_t
> +acc_ring_avail_deq(struct acc_queue *q)
> +{
> + return (q->sw_ring_depth + q->sw_ring_head - q->sw_ring_tail) % q->sw_ring_depth;
> +}
It is surprising to me that the number of available descriptors
calculation for enqueue and dequeue are différent. Could you please
explain why there a off-by-one delta between enc and dec?
If we look at other avail calculations in ACC100 enqueue, we get this:
int32_t avail = q->sw_ring_depth + q->sw_ring_tail - q->sw_ring_head;
It looks like there is indeed a off-by-one delta even for different
avail enqueue calculation.
Also, these new helpers are introduced but are not used in the patch.
next prev parent reply other threads:[~2022-09-21 7:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 1:34 From: Nic Chautru <nicolas.chautru@intel.com> Nic Chautru
2022-09-16 1:34 ` [PATCH v3 01/13] baseband/acc100: refactor to segregate common code Nic Chautru
2022-09-21 7:13 ` Maxime Coquelin [this message]
2022-09-21 21:25 ` Chautru, Nicolas
2022-09-16 1:34 ` [PATCH v3 02/13] baseband/acc200: introduce PMD for ACC200 Nic Chautru
2022-09-21 7:17 ` Maxime Coquelin
2022-09-21 23:34 ` Chautru, Nicolas
2022-09-16 1:34 ` [PATCH v3 03/13] baseband/acc200: add HW register definitions Nic Chautru
2022-09-16 1:34 ` [PATCH v3 04/13] baseband/acc200: add info get function Nic Chautru
2022-09-16 1:34 ` [PATCH v3 05/13] baseband/acc200: add queue configuration Nic Chautru
2022-09-16 1:34 ` [PATCH v3 06/13] baseband/acc200: add LDPC processing functions Nic Chautru
2022-09-16 1:35 ` [PATCH v3 07/13] baseband/acc200: add LTE " Nic Chautru
2022-09-16 1:35 ` [PATCH v3 08/13] baseband/acc200: add support for FFT operations Nic Chautru
2022-09-16 1:35 ` [PATCH v3 09/13] baseband/acc200: support interrupt Nic Chautru
2022-09-16 1:35 ` [PATCH v3 10/13] baseband/acc200: add device status and vf2pf comms Nic Chautru
2022-09-16 1:35 ` [PATCH v3 11/13] baseband/acc200: add PF configure companion function Nic Chautru
2022-09-16 1:35 ` [PATCH v3 12/13] baseband/acc: rename and merge directories into acc Nic Chautru
2022-09-16 1:35 ` [PATCH v3 13/13] baseband/acc: simplify meson dependency Nic Chautru
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=58a28ff9-03a5-450c-6cbb-438f25c5dc36@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=hernan.vargas@intel.com \
--cc=mdr@ashroe.eu \
--cc=nicolas.chautru@intel.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
--cc=trix@redhat.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).