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 955D0A0C41; Wed, 15 Sep 2021 23:41:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D25BF410E0; Wed, 15 Sep 2021 23:41:02 +0200 (CEST) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by mails.dpdk.org (Postfix) with ESMTP id D32FE4003C for ; Wed, 15 Sep 2021 23:41:00 +0200 (CEST) Received: by mail-lf1-f41.google.com with SMTP id i7so9845005lfr.13 for ; Wed, 15 Sep 2021 14:41:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=alfCy+6jX511g0kVPSW28xQKdwJuSD1AESWa1MiO/8o=; b=qREZlsuIhxtoULuv7GcOIhZFG1/ciI9EAZ7Q0qN+apm2dY1i9PjmPCv4J/qF9rUtIl wpMCvjWm9iEJk7c9/n4KSGtC6VJ1txq6aKSn041dppER3Mv/PT6vySr44tO7byZBH/uj 0gBuLJYnozMh9RozbozL4ADmWDDVXkKXepvf+z9Ju+NitMnVAQgXDzyW6QK8c3+xbwnX GwMlWjvkAw/r3PD4Xo0B8vs9IpjLMyyykOuZz49fvjUHW828ObogVzwb3WltOtD7Cb2c YQeiS2uFnQezSt1DkZGDQlsce3moYz/orJfV4p+v4N3iqkxV1emmfxbSiQd8I28SFw3+ 6nxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=alfCy+6jX511g0kVPSW28xQKdwJuSD1AESWa1MiO/8o=; b=FIDVxPjS/bkLcW6gveZoUo49hzUK8oXlK3eRnivLWHtnntlSdqJKxO/aq+sEk4rMVw RqvE+x4yMASb+Ftq6O+Zeab3kQ4QzxxZRTIwbF/bPHNFzlEV1TK3vUqmUAbsEODkUuib Hxf6hWDr/yXkSvyYaAMoTZyZQGzBSdPMz4ZGqS3NAYU5AMiFgzisgbaiSARZ9niu0m3P A0i28BcVAZbeUX5p2qQeAHI0/kxOspKiz2IdoULjhzM73SVL3iVhmJFKQYTMS2uE0I5i kV/Ls3ue97S4boCFnPiS1Rvbvamqs9pXmh3MsI7emtbVbCrjXO/MaIgV8S1Ct3J6wOXL y9GA== X-Gm-Message-State: AOAM533tgWWLD/MvWDkQinO/hjUwNFPPbetvcjd1PUD+/sCtHDtPVVep G098T24hI9R/kGqzLdvgY9Xdx/tvJbQcHQ== X-Google-Smtp-Source: ABdhPJyCI7wwrMhk1uXj/bK+wBSzXGXz+GdyBoKvJTWRXm7OUpO0kv6BuuLB3tUkBrDEvMRxCnfSqg== X-Received: by 2002:a2e:4951:: with SMTP id b17mr1934699ljd.414.1631742060039; Wed, 15 Sep 2021 14:41:00 -0700 (PDT) Received: from sovereign.. (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id o4sm85989lfi.16.2021.09.15.14.40.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Sep 2021 14:40:59 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk , Ashish Gupta , Fiona Trahe , Narcisa Ana Maria Vasile , Pallavi Kadam , Ray Kinsella , Tyler Retzlaff Date: Thu, 16 Sep 2021 00:40:48 +0300 Message-Id: <20210915214052.143098-2-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.29.3 In-Reply-To: <20210915214052.143098-1-dmitry.kozliuk@gmail.com> References: <20210915214052.143098-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/5] compressdev: rename fields for Windows compatibility 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" 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 --- 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