From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C774A00C2; Wed, 2 Nov 2022 08:19:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A0B2240693; Wed, 2 Nov 2022 08:19:29 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 59B8240223 for ; Wed, 2 Nov 2022 08:19:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667373567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Cj8tB5EbJ6x5Yjir/WagXYlIWw+0fJrIVs8Wjs6JPpo=; b=T3rXlFXucQNNYRETpjLXYvdeaBf3sfCSzXGVNl+qXoWMHF2YvaDieluSCZ/30Ndf8HmBhP 7Jp97nE3fgpEhzC4UmCKK5lzv6NhR87L+Dc+174ftVKSvxcELeYkKUYwH8pG2bS9oG/SWX M5w0twsK4n8y0YLRyHiWIrYOadnZWDk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-110-jKaLJSmAM6yvlZeuwDzQ-A-1; Wed, 02 Nov 2022 03:19:24 -0400 X-MC-Unique: jKaLJSmAM6yvlZeuwDzQ-A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2E69185A59D; Wed, 2 Nov 2022 07:19:24 +0000 (UTC) Received: from [10.39.208.11] (unknown [10.39.208.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2925BC15BA4; Wed, 2 Nov 2022 07:19:22 +0000 (UTC) Message-ID: Date: Wed, 2 Nov 2022 08:19:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v1 6/6] baseband/acc: fix redundant function definition To: Nicolas Chautru , dev@dpdk.org, gakhil@marvell.com, hernan.vargas@intel.com References: <20221101230459.50891-1-nicolas.chautru@intel.com> <20221101230459.50891-7-nicolas.chautru@intel.com> From: Maxime Coquelin In-Reply-To: <20221101230459.50891-7-nicolas.chautru@intel.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 11/2/22 00:04, Nicolas Chautru wrote: > From: Hernan Vargas > > 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 > --- > 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 Thanks, Maxime