DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: dev@dpdk.org
Cc: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
	Ashish Gupta <ashish.gupta@marvell.com>,
	Fiona Trahe <fiona.trahe@intel.com>,
	Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>,
	Pallavi Kadam <pallavi.kadam@intel.com>,
	Ray Kinsella <mdr@ashroe.eu>,
	Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [dpdk-dev] [PATCH 1/5] compressdev: rename fields for Windows compatibility
Date: Thu, 16 Sep 2021 00:40:48 +0300	[thread overview]
Message-ID: <20210915214052.143098-2-dmitry.kozliuk@gmail.com> (raw)
In-Reply-To: <20210915214052.143098-1-dmitry.kozliuk@gmail.com>

Windows SDK headers define `min` and `max` macros which break definition
of `struct rte_param_log2_range`. Rename the structure fields
to `minimum` and `maximum` to allow inclusion of both DPDK and Windows
headers in the same file. Deprecation notice:
https://mails.dpdk.org/archives/dev/2021-July/215270.html

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 app/test-compress-perf/comp_perf_test_common.c | 6 +++---
 app/test-compress-perf/main.c                  | 2 +-
 doc/guides/rel_notes/deprecation.rst           | 3 ---
 doc/guides/rel_notes/release_20_11.rst         | 3 +++
 drivers/compress/isal/isal_compress_pmd_ops.c  | 4 ++--
 drivers/compress/mlx5/mlx5_compress.c          | 2 +-
 drivers/compress/octeontx/otx_zip_pmd.c        | 4 ++--
 drivers/compress/qat/qat_comp_pmd.c            | 2 +-
 drivers/compress/zlib/zlib_pmd_ops.c           | 4 ++--
 lib/compressdev/rte_compressdev.h              | 4 ++--
 10 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/app/test-compress-perf/comp_perf_test_common.c b/app/test-compress-perf/comp_perf_test_common.c
index b402a0d839..b85323049f 100644
--- a/app/test-compress-perf/comp_perf_test_common.c
+++ b/app/test-compress-perf/comp_perf_test_common.c
@@ -35,10 +35,10 @@ param_range_check(uint16_t size, const struct rte_param_log2_range *range)
 	unsigned int next_size;
 
 	/* Check lower/upper bounds */
-	if (size < range->min)
+	if (size < range->minimum)
 		return -1;
 
-	if (size > range->max)
+	if (size > range->maximum)
 		return -1;
 
 	/* If range is actually only one value, size is correct */
@@ -46,7 +46,7 @@ param_range_check(uint16_t size, const struct rte_param_log2_range *range)
 		return 0;
 
 	/* Check if value is one of the supported sizes */
-	for (next_size = range->min; next_size <= range->max;
+	for (next_size = range->minimum; next_size <= range->maximum;
 			next_size += range->increment)
 		if (size == next_size)
 			return 0;
diff --git a/app/test-compress-perf/main.c b/app/test-compress-perf/main.c
index cc9951a9b1..9fe6160f4a 100644
--- a/app/test-compress-perf/main.c
+++ b/app/test-compress-perf/main.c
@@ -93,7 +93,7 @@ comp_perf_check_capabilities(struct comp_test_data *test_data, uint8_t cdev_id)
 		}
 	} else
 		/* Set window size to PMD maximum if none was specified */
-		test_data->window_sz = cap->window_size.max;
+		test_data->window_sz = cap->window_size.maximum;
 
 	/* Check if chained mbufs is supported */
 	if (test_data->max_sgl_segs > 1  &&
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 76a4abfd6b..7b848528ff 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -196,9 +196,6 @@ Deprecation Notices
   and ``rte_vhost_driver_set_protocol_features`` functions will be removed
   and the API functions will be made stable in DPDK 21.11.
 
-* compressdev: ``min`` and ``max`` fields of ``rte_param_log2_range`` structure
-  will be renamed in DPDK 21.11 to avoid conflict with Windows Sockets headers.
-
 * cryptodev: ``min`` and ``max`` fields of ``rte_crypto_param_range`` structure
   will be renamed in DPDK 21.11 to avoid conflict with Windows Sockets headers.
 
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index d07fd815dc..d93790c3b1 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -662,6 +662,9 @@ API Changes
 * sched: Removed ``tb_rate``, ``tc_rate``, ``tc_period`` and ``tb_size``
   from ``struct rte_sched_subport_params``.
 
+* compressdev: Renamed ``min`` and ``max`` fields of ``rte_param_log2_range``
+  structure to ``minimum`` and ``maximum``, respectively.
+
 
 ABI Changes
 -----------
diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c b/drivers/compress/isal/isal_compress_pmd_ops.c
index 9b42147a0b..3a736794dc 100644
--- a/drivers/compress/isal/isal_compress_pmd_ops.c
+++ b/drivers/compress/isal/isal_compress_pmd_ops.c
@@ -22,8 +22,8 @@ static const struct rte_compressdev_capabilities isal_pmd_capabilities[] = {
 					RTE_COMP_FF_CRC32_CHECKSUM |
 					RTE_COMP_FF_ADLER32_CHECKSUM,
 		.window_size = {
-			.min = 15,
-			.max = 15,
+			.minimum = 15,
+			.maximum = 15,
 			.increment = 0
 		},
 	},
diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c
index c5e0a83a8c..5ec936c7db 100644
--- a/drivers/compress/mlx5/mlx5_compress.c
+++ b/drivers/compress/mlx5/mlx5_compress.c
@@ -90,7 +90,7 @@ static const struct rte_compressdev_capabilities mlx5_caps[] = {
 				      RTE_COMP_FF_SHAREABLE_PRIV_XFORM |
 				      RTE_COMP_FF_HUFFMAN_FIXED |
 				      RTE_COMP_FF_HUFFMAN_DYNAMIC,
-		.window_size = {.min = 10, .max = 15, .increment = 1},
+		.window_size = {.minimum = 10, .maximum = 15, .increment = 1},
 	},
 	{
 		.algo = RTE_COMP_ALGO_LIST_END,
diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c
index dd62285b86..9b8aef9809 100644
--- a/drivers/compress/octeontx/otx_zip_pmd.c
+++ b/drivers/compress/octeontx/otx_zip_pmd.c
@@ -19,8 +19,8 @@ static const struct rte_compressdev_capabilities
 					RTE_COMP_FF_HUFFMAN_DYNAMIC,
 		/* Non sharable Priv XFORM and Stateless */
 		.window_size = {
-				.min = 1,
-				.max = 14,
+				.minimum = 1,
+				.maximum = 14,
 				.increment = 1
 				/* size supported 2^1 to 2^14 */
 		},
diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
index caac7839e9..b79d35b85d 100644
--- a/drivers/compress/qat/qat_comp_pmd.c
+++ b/drivers/compress/qat/qat_comp_pmd.c
@@ -29,7 +29,7 @@ static const struct rte_compressdev_capabilities qat_comp_gen_capabilities[] = {
 				RTE_COMP_FF_OOP_SGL_IN_LB_OUT |
 				RTE_COMP_FF_OOP_LB_IN_SGL_OUT |
 				RTE_COMP_FF_STATEFUL_DECOMPRESSION,
-	 .window_size = {.min = 15, .max = 15, .increment = 0} },
+	 .window_size = {.minimum = 15, .maximum = 15, .increment = 0} },
 	{RTE_COMP_ALGO_LIST_END, 0, {0, 0, 0} } };
 
 static void
diff --git a/drivers/compress/zlib/zlib_pmd_ops.c b/drivers/compress/zlib/zlib_pmd_ops.c
index 0a73aed949..50222f942e 100644
--- a/drivers/compress/zlib/zlib_pmd_ops.c
+++ b/drivers/compress/zlib/zlib_pmd_ops.c
@@ -16,8 +16,8 @@ static const struct rte_compressdev_capabilities zlib_pmd_capabilities[] = {
 					RTE_COMP_FF_HUFFMAN_FIXED |
 					RTE_COMP_FF_HUFFMAN_DYNAMIC),
 		.window_size = {
-			.min = 8,
-			.max = 15,
+			.minimum = 8,
+			.maximum = 15,
 			.increment = 1
 		},
 	},
diff --git a/lib/compressdev/rte_compressdev.h b/lib/compressdev/rte_compressdev.h
index 2840c27c6c..c6cea3e9c4 100644
--- a/lib/compressdev/rte_compressdev.h
+++ b/lib/compressdev/rte_compressdev.h
@@ -30,8 +30,8 @@ extern "C" {
  * Final value will be 2^value.
  */
 struct rte_param_log2_range {
-	uint8_t min;	/**< Minimum log2 value */
-	uint8_t max;	/**< Maximum log2 value */
+	uint8_t minimum;	/**< Minimum log2 value */
+	uint8_t maximum;	/**< Maximum log2 value */
 	uint8_t increment;
 	/**< If a range of sizes are supported,
 	 * this parameter is used to indicate
-- 
2.29.3


  reply	other threads:[~2021-09-15 21:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15 21:40 [dpdk-dev] [PATCH 0/5] lib: Windows compatibility renaming Dmitry Kozlyuk
2021-09-15 21:40 ` Dmitry Kozlyuk [this message]
2021-09-23 17:06   ` [dpdk-dev] [PATCH 1/5] compressdev: rename fields for Windows compatibility Thomas Monjalon
2021-09-15 21:40 ` [dpdk-dev] [PATCH 2/5] cryptodev: " Dmitry Kozlyuk
2021-09-15 21:40 ` [dpdk-dev] [PATCH 3/5] table: rename local variable " Dmitry Kozlyuk
2021-09-15 21:40 ` [dpdk-dev] [PATCH 4/5] ring: rename local variables " Dmitry Kozlyuk
2021-09-15 22:31   ` Honnappa Nagarahalli
2021-09-15 21:40 ` [dpdk-dev] [PATCH 5/5] net: rename Ethernet header fields Dmitry Kozlyuk
2021-10-01 16:33 ` [dpdk-dev] [PATCH v2 0/2] net: Windows compatibility renaming Dmitry Kozlyuk
2021-10-01 16:33   ` [dpdk-dev] [PATCH v2 1/2] net: rename Ethernet header fields Dmitry Kozlyuk
2021-10-06 16:30     ` Thomas Monjalon
2021-10-01 16:33   ` [dpdk-dev] [PATCH v2 2/2] doc: remove unneeded deprecations Dmitry Kozlyuk
2021-10-07 22:07   ` [dpdk-dev] [PATCH v3 0/2] net: Windows compatibility renaming Dmitry Kozlyuk
2021-10-07 22:07     ` [dpdk-dev] [PATCH v3 1/2] net: rename Ethernet header fields Dmitry Kozlyuk
2021-10-08 12:54       ` Thomas Monjalon
2021-10-07 22:07     ` [dpdk-dev] [PATCH v3 2/2] doc: remove unneeded deprecations Dmitry Kozlyuk
2021-10-08 12:59     ` [dpdk-dev] [PATCH v3 0/2] net: Windows compatibility renaming Thomas Monjalon

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=20210915214052.143098-2-dmitry.kozliuk@gmail.com \
    --to=dmitry.kozliuk@gmail.com \
    --cc=ashish.gupta@marvell.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=mdr@ashroe.eu \
    --cc=navasile@linux.microsoft.com \
    --cc=pallavi.kadam@intel.com \
    --cc=roretzla@linux.microsoft.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).