From: "Chautru, Nicolas" <nicolas.chautru@intel.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"gakhil@marvell.com" <gakhil@marvell.com>,
"Vargas, Hernan" <hernan.vargas@intel.com>
Subject: RE: [PATCH v1 6/6] baseband/acc: fix redundant function definition
Date: Wed, 2 Nov 2022 17:16:42 +0000 [thread overview]
Message-ID: <BY5PR11MB445170320FCF5B51370ABB0CF8399@BY5PR11MB4451.namprd11.prod.outlook.com> (raw)
In-Reply-To: <d09ec216-5c29-6f08-cef3-99ba7e0e144a@redhat.com>
Thanks Maxime for the quick reviews.
> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Wednesday, November 2, 2022 12:19 AM
> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org;
> gakhil@marvell.com; Vargas, Hernan <hernan.vargas@intel.com>
> Subject: Re: [PATCH v1 6/6] baseband/acc: fix redundant function definition
>
>
>
> On 11/2/22 00:04, Nicolas Chautru wrote:
> > From: Hernan Vargas <hernan.vargas@intel.com>
> >
> > Remove acc100_dma_fill_blk_type_in which already exists in
> > acc_common.h
> >
> > Fixes: 32e8b7ea35d ("baseband/acc100: refactor to segregate common
> > code")
> >
> > Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> > ---
> > drivers/baseband/acc/rte_acc100_pmd.c | 93 +--------------------------
> > 1 file changed, 3 insertions(+), 90 deletions(-)
> >
> > diff --git a/drivers/baseband/acc/rte_acc100_pmd.c
> > b/drivers/baseband/acc/rte_acc100_pmd.c
> > index 727a718e9d..31076d382f 100644
> > --- a/drivers/baseband/acc/rte_acc100_pmd.c
> > +++ b/drivers/baseband/acc/rte_acc100_pmd.c
> > @@ -1435,93 +1435,6 @@ acc101_fcw_ld_fill(struct rte_bbdev_dec_op *op,
> struct acc_fcw_ld *fcw,
> > }
> > }
> >
> > -/**
> > - * Fills descriptor with data pointers of one block type.
> > - *
> > - * @param desc
> > - * Pointer to DMA descriptor.
> > - * @param input
> > - * Pointer to pointer to input data which will be encoded. It can be changed
> > - * and points to next segment in scatter-gather case.
> > - * @param offset
> > - * Input offset in rte_mbuf structure. It is used for calculating the point
> > - * where data is starting.
> > - * @param cb_len
> > - * Length of currently processed Code Block
> > - * @param seg_total_left
> > - * It indicates how many bytes still left in segment (mbuf) for further
> > - * processing.
> > - * @param op_flags
> > - * Store information about device capabilities
> > - * @param next_triplet
> > - * Index for ACC100 DMA Descriptor triplet
> > - * @param scattergather
> > - * Flag to support scatter-gather for the mbuf
> > - *
> > - * @return
> > - * Returns index of next triplet on success, other value if lengths of
> > - * pkt and processed cb do not match.
> > - *
> > - */
> > -static inline int
> > -acc100_dma_fill_blk_type_in(struct acc_dma_req_desc *desc,
> > - struct rte_mbuf **input, uint32_t *offset, uint32_t cb_len,
> > - uint32_t *seg_total_left, int next_triplet,
> > - bool scattergather)
> > -{
> > - uint32_t part_len;
> > - struct rte_mbuf *m = *input;
> > -
> > - if (scattergather)
> > - part_len = (*seg_total_left < cb_len) ? *seg_total_left : cb_len;
> > - else
> > - part_len = cb_len;
> > - cb_len -= part_len;
> > - *seg_total_left -= part_len;
> > -
> > - desc->data_ptrs[next_triplet].address =
> > - rte_pktmbuf_iova_offset(m, *offset);
> > - desc->data_ptrs[next_triplet].blen = part_len;
> > - desc->data_ptrs[next_triplet].blkid = ACC_DMA_BLKID_IN;
> > - desc->data_ptrs[next_triplet].last = 0;
> > - desc->data_ptrs[next_triplet].dma_ext = 0;
> > - *offset += part_len;
> > - next_triplet++;
> > -
> > - while (cb_len > 0) {
> > - if (next_triplet < ACC_DMA_MAX_NUM_POINTERS_IN && m-
> >next != NULL) {
> > -
> > - m = m->next;
> > - *seg_total_left = rte_pktmbuf_data_len(m);
> > - part_len = (*seg_total_left < cb_len) ?
> > - *seg_total_left :
> > - cb_len;
> > - desc->data_ptrs[next_triplet].address =
> > - rte_pktmbuf_iova_offset(m, 0);
> > - desc->data_ptrs[next_triplet].blen = part_len;
> > - desc->data_ptrs[next_triplet].blkid =
> > - ACC_DMA_BLKID_IN;
> > - desc->data_ptrs[next_triplet].last = 0;
> > - desc->data_ptrs[next_triplet].dma_ext = 0;
> > - cb_len -= part_len;
> > - *seg_total_left -= part_len;
> > - /* Initializing offset for next segment (mbuf) */
> > - *offset = part_len;
> > - next_triplet++;
> > - } else {
> > - rte_bbdev_log(ERR,
> > - "Some data still left for processing: "
> > - "data_left: %u, next_triplet: %u, next_mbuf:
> %p",
> > - cb_len, next_triplet, m->next);
> > - return -EINVAL;
> > - }
> > - }
> > - /* Storing new mbuf as it could be changed in scatter-gather case*/
> > - *input = m;
> > -
> > - return next_triplet;
> > -}
> > -
> > /* May need to pad LDPC Encoder input to avoid small beat for ACC100. */
> > static inline uint16_t
> > pad_le_in(uint16_t blen, struct acc_queue *q) @@ -1565,7 +1478,7 @@
> > acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op,
> > return -1;
> > }
> >
> > - next_triplet = acc100_dma_fill_blk_type_in(desc, input, in_offset,
> > + next_triplet = acc_dma_fill_blk_type_in(desc, input, in_offset,
> > pad_le_in(in_length_in_bytes, q), seg_total_left,
> next_triplet, false);
> > if (unlikely(next_triplet < 0)) {
> > rte_bbdev_log(ERR,
> > @@ -1653,7 +1566,7 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op
> *op,
> > return -1;
> > }
> >
> > - next_triplet = acc100_dma_fill_blk_type_in(desc, input, in_offset, kw,
> > + next_triplet = acc_dma_fill_blk_type_in(desc, input, in_offset, kw,
> > seg_total_left, next_triplet,
> > check_bit(op->turbo_dec.op_flags,
> > RTE_BBDEV_TURBO_DEC_SCATTER_GATHER));
> > @@ -1756,7 +1669,7 @@ acc100_dma_desc_ld_fill(struct rte_bbdev_dec_op
> *op,
> > return -1;
> > }
> >
> > - next_triplet = acc100_dma_fill_blk_type_in(desc, input,
> > + next_triplet = acc_dma_fill_blk_type_in(desc, input,
> > in_offset, input_length,
> > seg_total_left, next_triplet,
> > check_bit(op->ldpc_dec.op_flags,
>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>
> Thanks,
> Maxime
next prev parent reply other threads:[~2022-11-02 17:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-01 23:04 [PATCH v1 0/6] baseband/acc: fixes on top of RC2 Nicolas Chautru
2022-11-01 23:04 ` [PATCH v1 1/6] baseband/acc: fix LTE half iteration flag Nicolas Chautru
2022-11-02 6:32 ` Maxime Coquelin
2022-11-01 23:04 ` [PATCH v1 2/6] baseband/acc: fix to possible overflow Nicolas Chautru
2022-11-02 6:51 ` Maxime Coquelin
2022-11-01 23:04 ` [PATCH v1 3/6] baseband/acc: fix to acc200 access corner case Nicolas Chautru
2022-11-02 6:52 ` Maxime Coquelin
2022-11-01 23:04 ` [PATCH v1 4/6] baseband/acc: fix PMON register values Nicolas Chautru
2022-11-02 7:01 ` Maxime Coquelin
2022-11-01 23:04 ` [PATCH v1 5/6] baseband/acc: fix double MSI intr in TB mode Nicolas Chautru
2022-11-02 7:16 ` Maxime Coquelin
2022-11-01 23:04 ` [PATCH v1 6/6] baseband/acc: fix redundant function definition Nicolas Chautru
2022-11-02 7:19 ` Maxime Coquelin
2022-11-02 17:16 ` Chautru, Nicolas [this message]
2022-11-03 8:26 ` [EXT] [PATCH v1 0/6] baseband/acc: fixes on top of RC2 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=BY5PR11MB445170320FCF5B51370ABB0CF8399@BY5PR11MB4451.namprd11.prod.outlook.com \
--to=nicolas.chautru@intel.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=hernan.vargas@intel.com \
--cc=maxime.coquelin@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).