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 BBDB941C5D; Fri, 10 Feb 2023 09:41:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 55552410D0; Fri, 10 Feb 2023 09:41:04 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 002A740EE6 for ; Fri, 10 Feb 2023 09:41:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676018462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r6Ow6J8gGecwiKCyHdKsSFWcEaOaiDY983CyGygySy0=; b=MJq7R4cRyAqaUnB/gE5ct2O9oUA5dH/Oj6OPNXcLyYMXFmaThBCi/0xzXMlxAT+6sjVUrM K9bcErSfaRJ7kO0dy4XX401uWag7nSmyY+VW89qOfr8uO3b74GttDbuM95D/2HiwMdxRsO Tqzff1CeXo+WGO3F7KeNR3K1BZUUe2g= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-553-D9DXsZtFN8Ci6TWyoN68lQ-1; Fri, 10 Feb 2023 03:40:49 -0500 X-MC-Unique: D9DXsZtFN8Ci6TWyoN68lQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 679033C0E207; Fri, 10 Feb 2023 08:40:49 +0000 (UTC) Received: from [10.39.208.26] (unknown [10.39.208.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 84391492C3F; Fri, 10 Feb 2023 08:40:48 +0000 (UTC) Message-ID: <7078f17f-406c-901b-13fc-799a804fe7cb@redhat.com> Date: Fri, 10 Feb 2023 09:40:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v1 4/9] baseband/acc: add explicit mbuf apend for soft output To: Nicolas Chautru , dev@dpdk.org Cc: hernan.vargas@intel.com, stable@dpdk.org References: <20230209221929.265059-1-nicolas.chautru@intel.com> <20230209221929.265059-5-nicolas.chautru@intel.com> From: Maxime Coquelin In-Reply-To: <20230209221929.265059-5-nicolas.chautru@intel.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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 2/9/23 23:19, Nicolas Chautru wrote: > Adding an explicit mbuf append in the case of soft output > mbuf being provided. > > Fixes: e640f6cdfa84 ("baseband/acc200: add LDPC processing") > Cc: stable@dpdk.org > > Signed-off-by: Nicolas Chautru > --- > drivers/baseband/acc/rte_vrb_pmd.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c > index a111836e51..8540e3d31c 100644 > --- a/drivers/baseband/acc/rte_vrb_pmd.c > +++ b/drivers/baseband/acc/rte_vrb_pmd.c > @@ -2067,6 +2067,10 @@ vrb_enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op, > } > } > > + if (op->ldpc_dec.soft_output.length > 0) > + mbuf_append(op->ldpc_dec.soft_output.data, op->ldpc_dec.soft_output.data, > + op->ldpc_dec.soft_output.length); No need to check the return value? IOW, are we sure the buffer we try to append fits into the mbuf? > + > #ifdef RTE_LIBRTE_BBDEV_DEBUG > rte_memdump(stderr, "FCW", &desc->req.fcw_ld, > sizeof(desc->req.fcw_ld) - 8);