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 86C67A00C5; Wed, 14 Sep 2022 22:18:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2C9614021D; Wed, 14 Sep 2022 22:18:19 +0200 (CEST) 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 80DF640156 for ; Wed, 14 Sep 2022 22:18:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663186698; 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=Fm1hbFAJRwrTheKsw/lPUJjgLIrgizYIbPk7KIUcCgE=; b=B4zN9evLQV10+NLTTiYntwKG3xncj/yXeQYAPLgB5MHKJb2FWiMJ+Ak1wjwYDDiN7UDAZb M3uDpNm6vjuI4XBmMnnWMccYQ9sAypYJUIpgXrqdfJrfahI5cSzq4NaeTlHOFbu3NWlrdT L3xO2wm60ZrqcsulN4QVUHPhfX9J7cE= 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-617-SivbYp9-P2-mkKHnqyDL_A-1; Wed, 14 Sep 2022 16:18:13 -0400 X-MC-Unique: SivbYp9-P2-mkKHnqyDL_A-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 10150101A528; Wed, 14 Sep 2022 20:18:13 +0000 (UTC) Received: from [10.39.208.12] (unknown [10.39.208.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CF134492CA2; Wed, 14 Sep 2022 20:18:11 +0000 (UTC) Message-ID: <93d074af-ad3b-55e6-aa10-bb0d98f019bc@redhat.com> Date: Wed, 14 Sep 2022 22:18:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v2 10/37] baseband/acc100: avoid mux for small inbound frames To: Hernan Vargas , dev@dpdk.org, gakhil@marvell.com, trix@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com References: <20220820023157.189047-1-hernan.vargas@intel.com> <20220820023157.189047-11-hernan.vargas@intel.com> From: Maxime Coquelin In-Reply-To: <20220820023157.189047-11-hernan.vargas@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 8/20/22 04:31, Hernan Vargas wrote: > Update check_mux to avoid multiplexing small inbound frames. > Preventing to multiplex code blocks when K < 512B per specs. It looks like a fix, and so should Fixes tag be added an stable cc'ed. > Signed-off-by: Hernan Vargas > --- > drivers/baseband/acc100/acc100_pmd.h | 1 + > drivers/baseband/acc100/rte_acc100_pmd.c | 16 +++++++++++----- > 2 files changed, 12 insertions(+), 5 deletions(-) > > diff --git a/drivers/baseband/acc100/acc100_pmd.h b/drivers/baseband/acc100/acc100_pmd.h > index 0c9810ca56..19a1f434bc 100644 > --- a/drivers/baseband/acc100/acc100_pmd.h > +++ b/drivers/baseband/acc100/acc100_pmd.h > @@ -135,6 +135,7 @@ > #define ACC100_DEC_OFFSET (80) > #define ACC100_EXT_MEM /* Default option with memory external to CPU */ > #define ACC100_HARQ_OFFSET_THRESHOLD 1024 > +#define ACC100_LIMIT_DL_MUX_BITS 534 > > /* Constants from K0 computation from 3GPP 38.212 Table 5.4.2.1-2 */ > #define ACC100_N_ZC_1 66 /* N = 66 Zc for BG 1 */ > diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c > index 5d09908fd0..71409e11a1 100644 > --- a/drivers/baseband/acc100/rte_acc100_pmd.c > +++ b/drivers/baseband/acc100/rte_acc100_pmd.c > @@ -3548,20 +3548,25 @@ acc100_enqueue_enc_cb(struct rte_bbdev_queue_data *q_data, > } > > /* Check we can mux encode operations with common FCW */ > -static inline bool > +static inline int16_t > check_mux(struct rte_bbdev_enc_op **ops, uint16_t num) { > uint16_t i; > if (num <= 1) > - return false; > + return 1; > for (i = 1; i < num; ++i) { > /* Only mux compatible code blocks */ > if (memcmp((uint8_t *)(&ops[i]->ldpc_enc) + ACC100_ENC_OFFSET, > (uint8_t *)(&ops[0]->ldpc_enc) + > ACC100_ENC_OFFSET, > ACC100_CMP_ENC_SIZE) != 0) > - return false; > + return i; > } > - return true; > + /* Avoid multiplexing small inbound size frames */ > + int Kp = (ops[0]->ldpc_enc.basegraph == 1 ? 22 : 10) * > + ops[0]->ldpc_enc.z_c - ops[0]->ldpc_enc.n_filler; > + if (Kp <= ACC100_LIMIT_DL_MUX_BITS) > + return 1; > + return num; > } > > /** Enqueue encode operations for ACC100 device in CB mode. */ > @@ -3583,7 +3588,8 @@ acc100_enqueue_ldpc_enc_cb(struct rte_bbdev_queue_data *q_data, > } > avail--; > enq = RTE_MIN(left, ACC100_MUX_5GDL_DESC); > - if (check_mux(&ops[i], enq)) { > + enq = check_mux(&ops[i], enq); > + if (enq > 1) { > ret = enqueue_ldpc_enc_n_op_cb(q, &ops[i], > desc_idx, enq); > if (ret < 0) {