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 C98B1A0C4B; Sun, 12 Sep 2021 14:38:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 46BF740041; Sun, 12 Sep 2021 14:38:20 +0200 (CEST) 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 6B2944003D for ; Sun, 12 Sep 2021 14:38:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631450298; 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=ztiKn8sOi8mHgliBcZC40+TsToD7kNlOgNAeUkHu4MQ=; b=eJ+VrD0hyYk2giXA3Yq2wHgVq6n2bIyDuEokD9HnMdUTr3qjG+5sYZqjLrn1YiQ776KNL4 IfHCe7GA2AqeFDx4H20B2cvXuGnoetDmvEEZtjvgq5i69d4rapySyM1rhwJhFQDPqUCZjh 2ipVbY0FWN2nbaJn9Ee1vIQQNR2eJiI= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-22-ilHnSeLbMXqxTS1FN7Y_Pg-1; Sun, 12 Sep 2021 08:38:17 -0400 X-MC-Unique: ilHnSeLbMXqxTS1FN7Y_Pg-1 Received: by mail-qt1-f200.google.com with SMTP id 13-20020ac8560d000000b0029f69548889so53603976qtr.3 for ; Sun, 12 Sep 2021 05:38:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=ztiKn8sOi8mHgliBcZC40+TsToD7kNlOgNAeUkHu4MQ=; b=hYRNE5miDOD2Sog/2AmUPF/+59XauWMkfSRuP4I1utkJwQtLmJx+ReHxxMM/OXP1yT YATyFcnxOTLt1zGsIsE/BbHSCO9RaIBerTR8CGqkqCfIC6NFteHrYuI/S57hyg6bSJyQ tM4X85MAE0wd9hZJH6ijX2qNDFcLTNHo1LlnSfunB1pvtnbq1leosWo4KV+pI3dwRhTp /kRvAKLU9z68tIZhDjKPkgwbDew8DYkZ8JKGBH99y7NXWTMw1lZi7KhnOiSiwEYdG2aq YUOG6WA+lQTxt34XLAemxRQJRkm8Q2YWMo9e80mqAYcg3fqydGH5JcuBu+rvuzGWqbEb DjWQ== X-Gm-Message-State: AOAM533snlCSgRgr7ZgedtInG6Ceug0c8YnCaI9xO7w4Zs7zRBzvyscW 7lHYjijZIrmiyHvt4n6y9/qF2fX8yXxjZXSRvhNqEVxXlvKhC9Lu2cCpyDQbuMm0xY8VRZaqbck 8rek= X-Received: by 2002:a05:620a:1397:: with SMTP id k23mr5468149qki.380.1631450296912; Sun, 12 Sep 2021 05:38:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzV4Oh3MbymjoGLxCeZ06d9N63iJyASHOelzhqEkqHleS59qqmFDhm7VVY9qTidXF2XkOdH+w== X-Received: by 2002:a05:620a:1397:: with SMTP id k23mr5468138qki.380.1631450296743; Sun, 12 Sep 2021 05:38:16 -0700 (PDT) Received: from localhost.localdomain (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id u27sm3151581qku.9.2021.09.12.05.38.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Sep 2021 05:38:16 -0700 (PDT) To: Nicolas Chautru , dev@dpdk.org, gakhil@marvell.com Cc: thomas@monjalon.net, hemant.agrawal@nxp.com, mingshan.zhang@intel.com, arun.joshi@intel.com References: <1631063741-28631-1-git-send-email-nicolas.chautru@intel.com> <1631063741-28631-3-git-send-email-nicolas.chautru@intel.com> From: Tom Rix Message-ID: Date: Sun, 12 Sep 2021 05:38:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <1631063741-28631-3-git-send-email-nicolas.chautru@intel.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=trix@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v3 2/6] baseband/turbo_sw: add support for CRC16 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 Sender: "dev" On 9/7/21 6:15 PM, Nicolas Chautru wrote: > This is to support the case for operation > where CRC16 is to be appended or checked. > > Signed-off-by: Nicolas Chautru > --- > doc/guides/rel_notes/release_21_11.rst | 3 +++ > drivers/baseband/turbo_sw/bbdev_turbo_software.c | 16 ++++++++++++++++ > 2 files changed, 19 insertions(+) > > diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst > index 69dd518..8ca59b7 100644 > --- a/doc/guides/rel_notes/release_21_11.rst > +++ b/doc/guides/rel_notes/release_21_11.rst > @@ -55,6 +55,9 @@ New Features > Also, make sure to start the actual text at the margin. > ======================================================= > > +* **Updated the turbo_sw bbdev PMD.** > + > + Added support for more comprehensive CRC options. > > Removed Items > ------------- > diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c > index 77e9a2e..e1db2bf 100644 > --- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c > +++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c > @@ -199,6 +199,7 @@ struct turbo_sw_queue { > .cap.ldpc_enc = { > .capability_flags = > RTE_BBDEV_LDPC_RATE_MATCH | > + RTE_BBDEV_LDPC_CRC_16_ATTACH | > RTE_BBDEV_LDPC_CRC_24A_ATTACH | > RTE_BBDEV_LDPC_CRC_24B_ATTACH, > .num_buffers_src = > @@ -211,6 +212,7 @@ struct turbo_sw_queue { > .type = RTE_BBDEV_OP_LDPC_DEC, > .cap.ldpc_dec = { > .capability_flags = > + RTE_BBDEV_LDPC_CRC_TYPE_16_CHECK | > RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK | > RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK | > RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP | > @@ -880,6 +882,12 @@ struct turbo_sw_queue { > crc_req.len = in_length_in_bits - 24; > crc_resp.data = q->enc_in; > bblib_lte_crc24b_gen(&crc_req, &crc_resp); > + } else if (enc->op_flags & RTE_BBDEV_LDPC_CRC_16_ATTACH) { > + rte_memcpy(q->enc_in, in, in_length_in_bytes - 2); > + crc_req.data = in; > + crc_req.len = in_length_in_bits - 16; > + crc_resp.data = q->enc_in; > + bblib_lte_crc16_gen(&crc_req, &crc_resp); > } else > rte_memcpy(q->enc_in, in, in_length_in_bytes); > > @@ -1491,6 +1499,14 @@ struct turbo_sw_queue { > bblib_lte_crc24a_check(&crc_req, &crc_resp); > if (!crc_resp.check_passed) > op->status |= 1 << RTE_BBDEV_CRC_ERROR; > + } else if (check_bit(dec->op_flags, RTE_BBDEV_LDPC_CRC_TYPE_16_CHECK)) { > + crc_req.data = adapter_input; > + crc_req.len = K - dec->n_filler - 16; > + crc_resp.check_passed = false; > + crc_resp.data = adapter_input; > + bblib_lte_crc16_check(&crc_req, &crc_resp); > + if (!crc_resp.check_passed) > + op->status |= 1 << RTE_BBDEV_CRC_ERROR; > } Thanks for the else-if() change. Looks good. Reviewed-by: Tom Rix > > #ifdef RTE_BBDEV_OFFLOAD_COST