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 4EAB9A0C46; Wed, 21 Jul 2021 21:56:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C32B240689; Wed, 21 Jul 2021 21:56:06 +0200 (CEST) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by mails.dpdk.org (Postfix) with ESMTP id D44474014D for ; Wed, 21 Jul 2021 21:56:05 +0200 (CEST) Received: by mail-lf1-f42.google.com with SMTP id b26so4963752lfo.4 for ; Wed, 21 Jul 2021 12:56:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6eYMR/n6uMfvb8wLnJnOVbToty5e0kR+tBX4DUCLU+g=; b=OprA7RE3L8BxKo9iYkQP9SsUl47NoxPn3udVGTKchmvvd9O8Pk1zru3JsthrfMswGH NbDz/huGgH+x/cdnLs3sqza9Lot5G86t0mIUKkZ73HhBAb4OdEY+991Ps7Sa3UEl6WXR TxjOlxtRpTM6bykKISBgsaj714Vz448dGRObM+7wmq9IO7f2l1eRfp97weRF4ai1+vnp gG3TjyD0PKKBFmO3OextPhO4gnY7j7dQS9DY5EYBn5F2t/BYTuA1qfelY/bevkNRsjNN vN54t0n+EytP3Npv+cuoUbtDVQA/nEqWXv/G1cNI4xF7ddnOtfQZv1Xidc6BQv498BtB Ctog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6eYMR/n6uMfvb8wLnJnOVbToty5e0kR+tBX4DUCLU+g=; b=rZ1rB/bFxl+3rXgcUj+TdLV1lBVRxkLHDHdZ+BqFydkFR79eIG+1cQMJio00Kxy0Sg MldVzTElYbwWlY1IpZ7GRCKQfi7Kj1pHv1inCFb4xgQwnMvuIuoITjH87T2gm47pw9i/ M0zrD9S9vLrMaJadfYpMGhcstZ1FIL5iZo+Fab7UL0Uz6erbsJlI15YiKOCeU1WMFTHa EDY6/r8Uf6O953MxbN4b5pEVQD2o/7shOxhiIJzsbdpjwPg42DHJ5NUPa1RBq7Pg01qj uJhWCzfYZ5pUzRQhJzD3s1SKUMULgrDEpYguC142HHZa72ypy0tmjhS8RYo0nOaZnmoh DbnQ== X-Gm-Message-State: AOAM53053UgaJfMVp53Bv7glzfgZhza7TShSG3QC/RKnrTqcsD+X9JPp xAuEJeqEI+xSRIcohupDgq4zvqzS11fP0w== X-Google-Smtp-Source: ABdhPJxEHFbKZ9rep/HeXkVczxCTj/GZrwXyxl9h5+edkznxXM6XsP7YC2vu50WIMZO4EKyWHXFMiA== X-Received: by 2002:a05:6512:3f13:: with SMTP id y19mr26587414lfa.444.1626897364983; Wed, 21 Jul 2021 12:56:04 -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 x17sm2895163ljx.75.2021.07.21.12.56.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 12:56:04 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Ferruh Yigit , Akhil Goyal , Fiona Trahe , Neil Horman , Dmitry Kozlyuk , Khoa To , Ray Kinsella Date: Wed, 21 Jul 2021 22:55:56 +0300 Message-Id: <20210721195557.762726-1-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.29.3 In-Reply-To: <20210520184254.16790-1-dmitry.kozliuk@gmail.com> References: <20210520184254.16790-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3] doc: announce API changes 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 system headers define `s_addr`, `min`, and `max` macros which break structure definitions containing fields with one of these names. Undefining those macros would break consumer code that relies on them. Example 1: #include #include struct in_addr addr; /* addr.s_addr = 0; ERROR: s_addr undefined by DPDK */ Example 2: #include #include struct rte_ether_hdr eh; /* eh.s_addr.addr_bytes[0] = 0; ERROR: `addr_s` is a macro */ Commit 6c068dbd9fea ("net: work around s_addr macro on Windows") modified definition of `struct rte_ether_hdr` to avoid the issue. However, the workaround assumes `#define s_addr S_addr.S_un` in Windows headers, which is not a part of official API. It also complicates the definition of `struct rte_ether_hdr`. For `min` and `max`, no workaround seems available. If cryptodev or compressdev is going to be enabled on Windows before 21.11, the only option seems to use a new name on Windows (using #ifdef). It is proposed to rename the conflicting fields on DPDK side, because Win32 API has wider use and is slower and harder to change. Exact new names are left for further discussion. Signed-off-by: Dmitry Kozlyuk Acked-by: Khoa To --- v3: fix typos (Ferruh), remove naming speculation, replace workaround snippet with commit reference. doc/guides/rel_notes/deprecation.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 9584d6bfd7..cc6e8db92c 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -147,3 +147,12 @@ Deprecation Notices * cmdline: ``cmdline`` structure will be made opaque to hide platform-specific content. On Linux and FreeBSD, supported prior to DPDK 20.11, original structure will be kept until DPDK 21.11. + +* net: ``s_addr`` and ``d_addr`` fields of ``rte_ether_hdr`` structure + will be renamed in DPDK 21.11 to avoid conflict with Windows Sockets headers. + +* 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. -- 2.29.3