DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Chautru, Nicolas" <nicolas.chautru@intel.com>
To: Hemant Agrawal <hemant.agrawal@nxp.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"gakhil@marvell.com" <gakhil@marvell.com>
Cc: "david.marchand@redhat.com" <david.marchand@redhat.com>,
	Nipun Gupta <nipun.gupta@nxp.com>
Subject: Re: [dpdk-dev] [PATCH v3 7/8] app/bbdev: add parameter to take input in network order
Date: Wed, 14 Apr 2021 01:00:13 +0000
Message-ID: <BY5PR11MB44510CBF5D2AD233E355EB0BF84E9@BY5PR11MB4451.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210413051715.26430-8-hemant.agrawal@nxp.com>

If you want this, should this be a new BBDEV capability option?
If not how can you enforce compatibility if you just bypass this in the test vector parsing?

> -----Original Message-----
> From: Hemant Agrawal <hemant.agrawal@nxp.com>
> Sent: Monday, April 12, 2021 10:17 PM
> To: dev@dpdk.org; gakhil@marvell.com; Chautru, Nicolas
> <nicolas.chautru@intel.com>
> Cc: david.marchand@redhat.com; Nipun Gupta <nipun.gupta@nxp.com>
> Subject: [PATCH v3 7/8] app/bbdev: add parameter to take input in network
> order
> 
> From: Nipun Gupta <nipun.gupta@nxp.com>
> 
> Test bbdev application is reading the input and output from the test vector
> files in the same endianness which is of the system.
> This patch adds an option to provide data in the network order i.e. big
> endian format
> 
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> ---
>  app/test-bbdev/test_bbdev_vector.c | 18 ++++++++++++++++--  app/test-
> bbdev/test_bbdev_vector.h |  2 ++
>  2 files changed, 18 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-
> bbdev/test_bbdev_vector.c
> index 50d1da00f7..fe04bd6b95 100644
> --- a/app/test-bbdev/test_bbdev_vector.c
> +++ b/app/test-bbdev/test_bbdev_vector.c
> @@ -53,7 +53,8 @@ starts_with(const char *str, const char *pre)
> 
>  /* tokenization test values separated by a comma */  static int -
> parse_values(char *tokens, uint32_t **data, uint32_t *data_length)
> +parse_values(char *tokens, uint32_t **data, uint32_t *data_length,
> +	     int network_order)
>  {
>  	uint32_t n_tokens = 0;
>  	uint32_t data_size = 32;
> @@ -94,6 +95,14 @@ parse_values(char *tokens, uint32_t **data, uint32_t
> *data_length)
>  		}
> 
>  		*data_length = *data_length + (strlen(tok) - strlen("0x"))/2;
> +		if (network_order) {
> +			if ((strlen(tok) - strlen("0x"))/2 == 4)
> +				values[n_tokens] =
> +					rte_cpu_to_be_32(values[n_tokens]);
> +			else if ((strlen(tok) - strlen("0x"))/2 == 2)
> +				values[n_tokens] =
> +					rte_cpu_to_be_16(values[n_tokens]);
> +		}
> 
>  		tok = strtok(NULL, VALUE_DELIMITER);
>  		if (tok == NULL)
> @@ -416,7 +425,8 @@ parse_data_entry(const char *key_token, char
> *token,
>  	/* Clear new op data struct */
>  	memset(op_data + *nb_ops, 0, sizeof(struct op_data_buf));
> 
> -	ret = parse_values(token, &data, &data_length);
> +	ret = parse_values(token, &data, &data_length,
> +			vector->network_order);
>  	if (!ret) {
>  		op_data[*nb_ops].addr = data;
>  		op_data[*nb_ops].length = data_length; @@ -728,6 +738,10
> @@ parse_ldpc_encoder_params(const char *key_token, char *token,
>  		ret = parse_expected_status(token, &status, vector-
> >op_type);
>  		if (!ret)
>  			vector->expected_status = status;
> +	} else if (!strcmp(key_token, "network_order")) {
> +		vector->mask |= TEST_BBDEV_VF_NETWORK_ORDER;
> +		vector->network_order = (uint8_t) strtoul(token, &err, 0);
> +		ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
>  	} else {
>  		printf("Not valid ldpc enc key: '%s'\n", key_token);
>  		return -1;
> diff --git a/app/test-bbdev/test_bbdev_vector.h b/app/test-
> bbdev/test_bbdev_vector.h
> index 4e5dbf5d50..aa53f0bb0d 100644
> --- a/app/test-bbdev/test_bbdev_vector.h
> +++ b/app/test-bbdev/test_bbdev_vector.h
> @@ -35,6 +35,7 @@ enum {
>  	TEST_BBDEV_VF_CODE_BLOCK_MODE = (1ULL << 23),
>  	TEST_BBDEV_VF_OP_FLAGS = (1ULL << 24),
>  	TEST_BBDEV_VF_EXPECTED_STATUS = (1ULL << 25),
> +	TEST_BBDEV_VF_NETWORK_ORDER = (1ULL << 26),
>  };
> 
>  enum op_data_type {
> @@ -60,6 +61,7 @@ struct test_bbdev_vector {
>  	enum rte_bbdev_op_type op_type;
>  	int expected_status;
>  	int mask;
> +	int network_order;
>  	union {
>  		struct rte_bbdev_op_turbo_dec turbo_dec;
>  		struct rte_bbdev_op_turbo_enc turbo_enc;
> --
> 2.17.1


  reply	other threads:[~2021-04-14  1:00 UTC|newest]

Thread overview: 98+ 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 [this message]
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

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=BY5PR11MB44510CBF5D2AD233E355EB0BF84E9@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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git