DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tom Rix <trix@redhat.com>
To: Nicolas Chautru <nicolas.chautru@intel.com>,
	dev@dpdk.org, gakhil@marvell.com
Cc: thomas@monjalon.net, hemant.agrawal@nxp.com,
	mingshan.zhang@intel.com, arun.joshi@intel.com
Subject: Re: [dpdk-dev] [PATCH v2 2/6] baseband/turbo_sw: add support for CRC16
Date: Wed, 1 Sep 2021 07:00:46 -0700	[thread overview]
Message-ID: <84d57bd1-fd6e-135f-3554-bab6bc46fe19@redhat.com> (raw)
In-Reply-To: <1629407410-28822-3-git-send-email-nicolas.chautru@intel.com>


On 8/19/21 2:10 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 <nicolas.chautru@intel.com>
> ---
>   doc/guides/rel_notes/release_21_11.rst           |  3 +++
>   drivers/baseband/turbo_sw/bbdev_turbo_software.c | 17 +++++++++++++++++
>   2 files changed, 20 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..e570044 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) {

The 'else if' assumes the new flag is mutually exclusive wrt the other 
crc flags.

At least a debug check should be added to verify.

> +		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);
>   
> @@ -1492,6 +1500,15 @@ struct turbo_sw_queue {
>   		if (!crc_resp.check_passed)
>   			op->status |= 1 << RTE_BBDEV_CRC_ERROR;
>   	}
> +	if (check_bit(dec->op_flags, RTE_BBDEV_LDPC_CRC_TYPE_16_CHECK)) {

The series of 'if-statements' means the new flag is not mutually 
exclusive wrt the other crc flags.

doing both 24a and 16 would create a mess.

this should likely change to an else-if-statement similar to above.

Tom

> +		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;
> +	}
>   
>   #ifdef RTE_BBDEV_OFFLOAD_COST
>   	q_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time;


  reply	other threads:[~2021-09-01 14:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19 21:10 [dpdk-dev] [PATCH v2 0/6] bbdev update related to CRC usage Nicolas Chautru
2021-08-19 21:10 ` [dpdk-dev] [PATCH v2 1/6] bbdev: add capability for CRC16 check Nicolas Chautru
2021-09-01 13:36   ` Tom Rix
2021-09-01 15:00     ` Chautru, Nicolas
2021-09-11 19:11       ` Tom Rix
2021-08-19 21:10 ` [dpdk-dev] [PATCH v2 2/6] baseband/turbo_sw: add support for CRC16 Nicolas Chautru
2021-09-01 14:00   ` Tom Rix [this message]
2021-09-08  0:54     ` Chautru, Nicolas
2021-08-19 21:10 ` [dpdk-dev] [PATCH v2 3/6] bbdev: add capability for 4G CB CRC DROP Nicolas Chautru
2021-08-19 21:10 ` [dpdk-dev] [PATCH v2 4/6] baseband/acc100: add support for 4G CRC drop Nicolas Chautru
2021-09-01 14:20   ` Tom Rix
2021-09-08  1:04     ` Chautru, Nicolas
2021-09-11 19:13       ` Tom Rix
2021-08-19 21:10 ` [dpdk-dev] [PATCH v2 5/6] doc: clarification of usage of HARQ in bbdev doc Nicolas Chautru
2021-08-19 21:10 ` [dpdk-dev] [PATCH v2 6/6] bbdev: reduce warning level for one scenario Nicolas Chautru
2021-08-20  2:15   ` Zhang, Mingshan
2021-09-01 14:29   ` Tom Rix
2021-09-08  1:12     ` Chautru, Nicolas

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=84d57bd1-fd6e-135f-3554-bab6bc46fe19@redhat.com \
    --to=trix@redhat.com \
    --cc=arun.joshi@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=mingshan.zhang@intel.com \
    --cc=nicolas.chautru@intel.com \
    --cc=thomas@monjalon.net \
    /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).