DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Chautru, Nicolas" <nicolas.chautru@intel.com>
To: "nipun.gupta@nxp.com" <nipun.gupta@nxp.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"gakhil@marvell.com" <gakhil@marvell.com>
Cc: "david.marchand@redhat.com" <david.marchand@redhat.com>,
	"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>
Subject: Re: [dpdk-dev] [PATCH v8 8/8] app/bbdev: handle endianness of test data
Date: Wed, 6 Oct 2021 20:24:04 +0000	[thread overview]
Message-ID: <BY5PR11MB4451937DB3CD7ECFF2664F86F8B09@BY5PR11MB4451.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211006113112.11163-9-nipun.gupta@nxp.com>


> -----Original Message-----
> From: nipun.gupta@nxp.com <nipun.gupta@nxp.com>
> Sent: Wednesday, October 6, 2021 4:31 AM
> To: dev@dpdk.org; gakhil@marvell.com; Chautru, Nicolas
> <nicolas.chautru@intel.com>
> Cc: david.marchand@redhat.com; hemant.agrawal@nxp.com; Nipun Gupta
> <nipun.gupta@nxp.com>
> Subject: [PATCH v8 8/8] app/bbdev: handle endianness of test data
> 
> From: Nipun Gupta <nipun.gupta@nxp.com>
> 
> With data input, output and harq also supported in big endian format, this
> patch updates the testbbdev application to handle the endianness
> conversion as directed by the the driver being used.
> 
> If the driver supports big endian data processing, conversion from little
> endian to big is handled by the testbbdev application.
> 
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> ---
>  app/test-bbdev/test_bbdev_perf.c | 43
> ++++++++++++++++++++++++++++++++
>  1 file changed, 43 insertions(+)
> 
> diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-
> bbdev/test_bbdev_perf.c
> index 469597b8b3..597c443596 100644
> --- a/app/test-bbdev/test_bbdev_perf.c
> +++ b/app/test-bbdev/test_bbdev_perf.c
> @@ -227,6 +227,45 @@ clear_soft_out_cap(uint32_t *op_flags)
>  	*op_flags &= ~RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT;
>  }
> 
> +/* This API is to convert all the test vector op data entries
> + * to big endian format. It is used when the device supports
> + * the input in the big endian format.
> + */
> +static inline void
> +convert_op_data_to_be(void)
> +{
> +	struct op_data_entries *op;
> +	enum op_data_type type;
> +	uint8_t nb_segs, *rem_data, temp;
> +	uint32_t *data, len;
> +	int complete, rem, i, j;
> +
> +	for (type = DATA_INPUT; type < DATA_NUM_TYPES; ++type) {
> +		nb_segs = test_vector.entries[DATA_INPUT].nb_segments;

Is there a typo here? Shouldn't it be instead:
nb_segs = test_vector.entries[type].nb_segments;

Also as part of that same commit, please put a comment in the doc that the bbdev-test is adjusting the byte endianness based on the PMD capability and confirming that all vectors input/ouput data are assuming LE by default.  ./doc/guides/tool/testbbdev.rst


> +		op = &test_vector.entries[type];
> +
> +		/* Invert byte endianness for all the segments */
> +		for (i = 0; i < nb_segs; ++i) {
> +			len = op->segments[i].length;
> +			data = op->segments[i].addr;
> +
> +			/* Swap complete u32 bytes */
> +			complete = len / 4;
> +			for (j = 0; j < complete; j++)
> +				data[j] = rte_bswap32(data[j]);
> +
> +			/* Swap any remaining bytes */
> +			rem = len % 4;
> +			rem_data = (uint8_t *)&data[j];
> +			for (j = 0; j < rem/2; j++) {
> +				temp = rem_data[j];
> +				rem_data[j] = rem_data[rem - j - 1];
> +				rem_data[rem - j - 1] = temp;
> +			}
> +		}
> +	}
> +}
> +
>  static int
>  check_dev_cap(const struct rte_bbdev_info *dev_info)  { @@ -234,6 +273,7
> @@ check_dev_cap(const struct rte_bbdev_info *dev_info)
>  	unsigned int nb_inputs, nb_soft_outputs, nb_hard_outputs,
>  		nb_harq_inputs, nb_harq_outputs;
>  	const struct rte_bbdev_op_cap *op_cap = dev_info-
> >drv.capabilities;
> +	uint8_t dev_be_input = dev_info->drv.support_be_data;
> 
>  	nb_inputs = test_vector.entries[DATA_INPUT].nb_segments;
>  	nb_soft_outputs =
> test_vector.entries[DATA_SOFT_OUTPUT].nb_segments;
> @@ -245,6 +285,9 @@ check_dev_cap(const struct rte_bbdev_info
> *dev_info)
>  		if (op_cap->type != test_vector.op_type)
>  			continue;
> 
> +		if (dev_be_input)
> +			convert_op_data_to_be();
> +
>  		if (op_cap->type == RTE_BBDEV_OP_TURBO_DEC) {
>  			const struct rte_bbdev_op_cap_turbo_dec *cap =
>  					&op_cap->cap.turbo_dec;
> --
> 2.17.1


  reply	other threads:[~2021-10-06 20:24 UTC|newest]

Thread overview: 157+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18  6:34 [dpdk-dev] [PATCH 1/6] baseband: introduce NXP LA12xx driver Hemant Agrawal
2021-03-18  6:34 ` [dpdk-dev] [PATCH 2/6] baseband/la12xx: add devargs for max queues Hemant Agrawal
2021-03-18  6:34 ` [dpdk-dev] [PATCH 3/6] baseband/la12xx: add support for multiple modems Hemant Agrawal
2021-03-18  6:34 ` [dpdk-dev] [PATCH 4/6] baseband/la12xx: add queue and modem config support Hemant Agrawal
2021-03-18  6:34 ` [dpdk-dev] [PATCH 5/6] baseband/la12xx: add enqueue and dequeue support Hemant Agrawal
2021-03-18  6:34 ` [dpdk-dev] [PATCH 6/6] baseband/la12xx: add documentation support Hemant Agrawal
2021-03-18 14:53 ` [dpdk-dev] [PATCH 1/6] baseband: introduce NXP LA12xx driver David Marchand
2021-03-19  5:54   ` Hemant Agrawal
2021-04-08  8:55     ` [dpdk-dev] [EXT] " Akhil Goyal
2021-04-08  8:57       ` Hemant Agrawal
2021-04-08 15:29       ` Chautru, Nicolas
2021-04-10 17:02 ` [dpdk-dev] [PATCH v2 0/8] baseband: add " Hemant Agrawal
2021-04-10 17:02   ` [dpdk-dev] [PATCH v2 1/8] baseband: introduce " Hemant Agrawal
2021-04-10 17:02   ` [dpdk-dev] [PATCH v2 2/8] baseband/la12xx: add devargs for max queues Hemant Agrawal
2021-04-10 17:02   ` [dpdk-dev] [PATCH v2 3/8] baseband/la12xx: add support for multiple modems Hemant Agrawal
2021-04-10 17:02   ` [dpdk-dev] [PATCH v2 4/8] baseband/la12xx: add queue and modem config support Hemant Agrawal
2021-04-10 17:02   ` [dpdk-dev] [PATCH v2 5/8] baseband/la12xx: add enqueue and dequeue support Hemant Agrawal
2021-04-10 17:02   ` [dpdk-dev] [PATCH v2 6/8] baseband/la12xx: add documentation support Hemant Agrawal
2021-04-10 17:02   ` [dpdk-dev] [PATCH v2 7/8] app/bbdev: add parameter to take input in network order Hemant Agrawal
2021-04-12  7:22     ` David Marchand
2021-04-12  7:29       ` Hemant Agrawal
2021-04-10 17:02   ` [dpdk-dev] [PATCH v2 8/8] app/bbdev: add test vectors for transport blocks Hemant Agrawal
2021-04-13  5:17   ` [dpdk-dev] [PATCH v3 0/8] baseband: add NXP LA12xx driver Hemant Agrawal
2021-04-13  5:17     ` [dpdk-dev] [PATCH v3 1/8] baseband: introduce " Hemant Agrawal
2021-04-24 10:36       ` [dpdk-dev] [PATCH v4 0/8] baseband: add " Hemant Agrawal
2021-04-24 10:36         ` [dpdk-dev] [PATCH v4 1/8] bbdev: add network order data capability Hemant Agrawal
2021-04-24 21:59           ` Chautru, Nicolas
2021-04-25 16:14             ` Thomas Monjalon
2021-04-26 17:01           ` Dave Burley
2021-04-28 13:03             ` Hemant Agrawal
2021-04-28 13:34             ` Hemant Agrawal
2021-04-28 15:19               ` Chautru, Nicolas
2021-04-24 10:36         ` [dpdk-dev] [PATCH v4 2/8] baseband: introduce NXP LA12xx driver Hemant Agrawal
2021-04-24 10:36         ` [dpdk-dev] [PATCH v4 3/8] baseband/la12xx: add devargs for max queues Hemant Agrawal
2021-04-24 10:36         ` [dpdk-dev] [PATCH v4 4/8] baseband/la12xx: add support for multiple modems Hemant Agrawal
2021-04-24 10:36         ` [dpdk-dev] [PATCH v4 5/8] baseband/la12xx: add queue and modem config support Hemant Agrawal
2021-04-24 22:12           ` Chautru, Nicolas
2021-05-13 11:01             ` Nipun Gupta
2021-05-13 14:51               ` Chautru, Nicolas
2021-05-17 17:00                 ` Nipun Gupta
2021-05-17 17:53                   ` Chautru, Nicolas
2021-05-19 18:43                     ` Nipun Gupta
2021-04-24 10:36         ` [dpdk-dev] [PATCH v4 6/8] baseband/la12xx: add enqueue and dequeue support Hemant Agrawal
2021-04-24 10:36         ` [dpdk-dev] [PATCH v4 7/8] app/bbdev: enable la12xx for bbdev Hemant Agrawal
2021-04-24 10:37         ` [dpdk-dev] [PATCH v4 8/8] app/bbdev: add test vectors for transport blocks Hemant Agrawal
2021-04-24 22:05           ` Chautru, Nicolas
2021-05-05 12:31         ` [dpdk-dev] [EXT] [PATCH v4 0/8] baseband: add NXP LA12xx driver Akhil Goyal
2021-06-16 20:35           ` Akhil Goyal
2021-06-26  9:59             ` Hemant Agrawal
2021-04-13  5:17     ` [dpdk-dev] [PATCH v3 2/8] baseband/la12xx: add devargs for max queues Hemant Agrawal
2021-04-13  5:17     ` [dpdk-dev] [PATCH v3 3/8] baseband/la12xx: add support for multiple modems Hemant Agrawal
2021-04-14  0:02       ` Chautru, Nicolas
2021-04-14 12:10         ` Hemant Agrawal
2021-04-13  5:17     ` [dpdk-dev] [PATCH v3 4/8] baseband/la12xx: add queue and modem config support Hemant Agrawal
2021-04-14  0:41       ` Chautru, Nicolas
2021-04-13  5:17     ` [dpdk-dev] [PATCH v3 5/8] baseband/la12xx: add enqueue and dequeue support Hemant Agrawal
2021-04-14  0:53       ` Chautru, Nicolas
2021-04-14 12:06         ` Hemant Agrawal
2021-04-13  5:17     ` [dpdk-dev] [PATCH v3 6/8] baseband/la12xx: add documentation support Hemant Agrawal
2021-04-14  0:57       ` Chautru, Nicolas
2021-04-14 11:59         ` Hemant Agrawal
2021-04-13  5:17     ` [dpdk-dev] [PATCH v3 7/8] app/bbdev: add parameter to take input in network order Hemant Agrawal
2021-04-14  1:00       ` Chautru, Nicolas
2021-04-14 12:15         ` Nipun Gupta
2021-04-13  5:17     ` [dpdk-dev] [PATCH v3 8/8] app/bbdev: add test vectors for transport blocks Hemant Agrawal
2021-04-14  1:09       ` Chautru, Nicolas
2021-04-14 12:16         ` Nipun Gupta
2021-04-14 15:48           ` Chautru, Nicolas
2021-04-13 10:06     ` [dpdk-dev] [EXT] [PATCH v3 0/8] baseband: add NXP LA12xx driver Akhil Goyal
2021-09-12 12:15 ` [dpdk-dev] [PATCH v5 0/9] " Nipun Gupta
2021-09-12 12:15   ` [dpdk-dev] [PATCH v5 1/9] bbdev: add big endian processing data capability Nipun Gupta
2021-09-13 18:39     ` Chautru, Nicolas
2021-09-17  8:30       ` Nipun Gupta
2021-09-17 14:23         ` Chautru, Nicolas
2021-09-12 12:15   ` [dpdk-dev] [PATCH v5 2/9] baseband: introduce NXP LA12xx driver Nipun Gupta
2021-09-12 12:15   ` [dpdk-dev] [PATCH v5 3/9] baseband/la12xx: add devargs for max queues Nipun Gupta
2021-09-12 12:15   ` [dpdk-dev] [PATCH v5 4/9] baseband/la12xx: add support for multiple modems Nipun Gupta
2021-09-12 12:15   ` [dpdk-dev] [PATCH v5 5/9] baseband/la12xx: add queue and modem config support Nipun Gupta
2021-09-13 18:56     ` Chautru, Nicolas
2021-09-17  8:33       ` Nipun Gupta
2021-09-12 12:15   ` [dpdk-dev] [PATCH v5 6/9] baseband/la12xx: add enqueue and dequeue support Nipun Gupta
2021-09-12 12:15   ` [dpdk-dev] [PATCH v5 7/9] app/bbdev: enable la12xx for bbdev Nipun Gupta
2021-09-12 12:15   ` [dpdk-dev] [PATCH v5 8/9] app/bbdev: handle endianness of test data Nipun Gupta
2021-09-13 18:45     ` Chautru, Nicolas
2021-09-12 12:15   ` [dpdk-dev] [PATCH v5 9/9] app/bbdev: add test vectors for transport blocks Nipun Gupta
2021-09-13 19:01     ` Chautru, Nicolas
2021-09-17  8:37       ` Nipun Gupta
2021-09-17 14:20         ` Chautru, Nicolas
2021-09-24  4:37 ` [dpdk-dev] [PATCH v6 0/9] baseband: add NXP LA12xx driver nipun.gupta
2021-09-24  4:37   ` [dpdk-dev] [PATCH v6 1/9] bbdev: add big endian processing data processing info nipun.gupta
2021-09-24  4:37   ` [dpdk-dev] [PATCH v6 2/9] baseband: introduce NXP LA12xx driver nipun.gupta
2021-09-24  4:37   ` [dpdk-dev] [PATCH v6 3/9] baseband/la12xx: add devargs for max queues nipun.gupta
2021-09-24  4:37   ` [dpdk-dev] [PATCH v6 4/9] baseband/la12xx: add support for multiple modems nipun.gupta
2021-09-24  4:37   ` [dpdk-dev] [PATCH v6 5/9] baseband/la12xx: add queue and modem config support nipun.gupta
2021-09-24  4:37   ` [dpdk-dev] [PATCH v6 6/9] baseband/la12xx: add enqueue and dequeue support nipun.gupta
2021-09-24  4:37   ` [dpdk-dev] [PATCH v6 7/9] app/bbdev: enable la12xx for bbdev nipun.gupta
2021-09-24  4:37   ` [dpdk-dev] [PATCH v6 8/9] app/bbdev: handle endianness of test data nipun.gupta
2021-09-24  4:37   ` [dpdk-dev] [PATCH v6 9/9] app/bbdev: add test vectors for transport blocks nipun.gupta
2021-09-28  8:29 ` [dpdk-dev] [PATCH v7 0/9] baseband: add NXP LA12xx driver nipun.gupta
2021-09-28  8:29   ` [dpdk-dev] [PATCH v7 1/9] bbdev: add big endian processing data processing info nipun.gupta
2021-10-04 23:09     ` Chautru, Nicolas
2021-09-28  8:29   ` [dpdk-dev] [PATCH v7 2/9] baseband: introduce NXP LA12xx driver nipun.gupta
2021-09-28  8:29   ` [dpdk-dev] [PATCH v7 3/9] baseband/la12xx: add devargs for max queues nipun.gupta
2021-09-28  8:29   ` [dpdk-dev] [PATCH v7 4/9] baseband/la12xx: add support for multiple modems nipun.gupta
2021-09-28  8:29   ` [dpdk-dev] [PATCH v7 5/9] baseband/la12xx: add queue and modem config support nipun.gupta
2021-10-04 23:19     ` Chautru, Nicolas
2021-09-28  8:29   ` [dpdk-dev] [PATCH v7 6/9] baseband/la12xx: add enqueue and dequeue support nipun.gupta
2021-10-04 23:23     ` Chautru, Nicolas
2021-09-28  8:29   ` [dpdk-dev] [PATCH v7 7/9] app/bbdev: enable la12xx for bbdev nipun.gupta
2021-09-28  8:29   ` [dpdk-dev] [PATCH v7 8/9] app/bbdev: handle endianness of test data nipun.gupta
2021-10-04 23:38     ` Chautru, Nicolas
2021-09-28  8:29   ` [dpdk-dev] [PATCH v7 9/9] app/bbdev: add test vectors for transport blocks nipun.gupta
2021-10-04 23:31     ` Chautru, Nicolas
2021-10-06 11:31 ` [dpdk-dev] [PATCH v8 0/8] baseband: add NXP LA12xx driver nipun.gupta
2021-10-06 11:31   ` [dpdk-dev] [PATCH v8 1/8] bbdev: add big endian processing data processing info nipun.gupta
2021-10-06 21:02     ` Chautru, Nicolas
2021-10-06 11:31   ` [dpdk-dev] [PATCH v8 2/8] baseband: introduce NXP LA12xx driver nipun.gupta
2021-10-06 11:31   ` [dpdk-dev] [PATCH v8 3/8] baseband/la12xx: add devargs for max queues nipun.gupta
2021-10-06 11:31   ` [dpdk-dev] [PATCH v8 4/8] baseband/la12xx: add support for multiple modems nipun.gupta
2021-10-06 11:31   ` [dpdk-dev] [PATCH v8 5/8] baseband/la12xx: add queue and modem config support nipun.gupta
2021-10-06 11:31   ` [dpdk-dev] [PATCH v8 6/8] baseband/la12xx: add enqueue and dequeue support nipun.gupta
2021-10-06 11:31   ` [dpdk-dev] [PATCH v8 7/8] app/bbdev: enable la12xx for bbdev nipun.gupta
2021-10-06 11:31   ` [dpdk-dev] [PATCH v8 8/8] app/bbdev: handle endianness of test data nipun.gupta
2021-10-06 20:24     ` Chautru, Nicolas [this message]
2021-10-07  9:33 ` [dpdk-dev] [PATCH v9 0/8] baseband: add NXP LA12xx driver nipun.gupta
2021-10-07  9:33   ` [dpdk-dev] [PATCH v9 1/8] bbdev: add device info related to data endianness assumption nipun.gupta
2021-10-07  9:33   ` [dpdk-dev] [PATCH v9 2/8] baseband: introduce NXP LA12xx driver nipun.gupta
2021-10-07  9:33   ` [dpdk-dev] [PATCH v9 3/8] baseband/la12xx: add devargs for max queues nipun.gupta
2021-10-07  9:33   ` [dpdk-dev] [PATCH v9 4/8] baseband/la12xx: add support for multiple modems nipun.gupta
2021-10-07  9:33   ` [dpdk-dev] [PATCH v9 5/8] baseband/la12xx: add queue and modem config support nipun.gupta
2021-10-07  9:33   ` [dpdk-dev] [PATCH v9 6/8] baseband/la12xx: add enqueue and dequeue support nipun.gupta
2021-10-07  9:33   ` [dpdk-dev] [PATCH v9 7/8] app/bbdev: enable la12xx for bbdev nipun.gupta
2021-10-07  9:33   ` [dpdk-dev] [PATCH v9 8/8] app/bbdev: handle endianness of test data nipun.gupta
2021-10-11  4:32 ` [dpdk-dev] [PATCH v10 0/8] baseband: add NXP LA12xx driver nipun.gupta
2021-10-11  4:32   ` [dpdk-dev] [PATCH v10 1/8] bbdev: add device info related to data endianness nipun.gupta
2021-10-11  4:32   ` [dpdk-dev] [PATCH v10 2/8] baseband: introduce NXP LA12xx driver nipun.gupta
2021-10-16 13:58     ` [dpdk-dev] [EXT] " Akhil Goyal
2021-10-11  4:32   ` [dpdk-dev] [PATCH v10 3/8] baseband/la12xx: add devargs for max queues nipun.gupta
2021-10-16 14:00     ` [dpdk-dev] [EXT] " Akhil Goyal
2021-10-11  4:32   ` [dpdk-dev] [PATCH v10 4/8] baseband/la12xx: add support for multiple modems nipun.gupta
2021-10-11  4:32   ` [dpdk-dev] [PATCH v10 5/8] baseband/la12xx: add queue and modem config support nipun.gupta
2021-10-16 14:13     ` [dpdk-dev] [EXT] " Akhil Goyal
2021-10-11  4:32   ` [dpdk-dev] [PATCH v10 6/8] baseband/la12xx: add enqueue and dequeue support nipun.gupta
2021-10-11  4:32   ` [dpdk-dev] [PATCH v10 7/8] app/bbdev: enable la12xx for bbdev nipun.gupta
2021-10-11  4:32   ` [dpdk-dev] [PATCH v10 8/8] app/bbdev: handle endianness of test data nipun.gupta
2021-10-17  6:53 ` [dpdk-dev] [PATCH v11 0/8] baseband: add NXP LA12xx driver nipun.gupta
2021-10-17  6:53   ` [dpdk-dev] [PATCH v11 1/8] bbdev: add device info related to data endianness nipun.gupta
2021-10-17  6:53   ` [dpdk-dev] [PATCH v11 2/8] baseband: introduce NXP LA12xx driver nipun.gupta
2021-10-17  6:53   ` [dpdk-dev] [PATCH v11 3/8] baseband/la12xx: add devargs for max queues nipun.gupta
2021-10-17  6:53   ` [dpdk-dev] [PATCH v11 4/8] baseband/la12xx: add support for multiple modems nipun.gupta
2021-10-17  6:53   ` [dpdk-dev] [PATCH v11 5/8] baseband/la12xx: add queue and modem config support nipun.gupta
2021-10-17  6:53   ` [dpdk-dev] [PATCH v11 6/8] baseband/la12xx: add enqueue and dequeue support nipun.gupta
2021-10-17  6:53   ` [dpdk-dev] [PATCH v11 7/8] app/bbdev: enable la12xx for bbdev nipun.gupta
2021-10-17  6:53   ` [dpdk-dev] [PATCH v11 8/8] app/bbdev: handle endianness of test data nipun.gupta
2021-10-18 15:23   ` [dpdk-dev] [EXT] [PATCH v11 0/8] baseband: add NXP LA12xx driver Akhil Goyal
2021-10-18 18:08     ` Chautru, Nicolas
2021-10-18 18:13       ` Akhil Goyal

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=BY5PR11MB4451937DB3CD7ECFF2664F86F8B09@BY5PR11MB4451.namprd11.prod.outlook.com \
    --to=nicolas.chautru@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=nipun.gupta@nxp.com \
    /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).