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 2968645F52; Fri, 27 Dec 2024 02:33:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A94554029D; Fri, 27 Dec 2024 02:33:27 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id B55A940275 for ; Fri, 27 Dec 2024 02:33:26 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id E865A203EC26; Thu, 26 Dec 2024 17:33:25 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E865A203EC26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1735263205; bh=bRcqCVgQbs+ozUWWJRjX56iEJGDb3JS7J4SgLbNEQAs=; h=From:To:Cc:Subject:Date:From; b=arqRY9TrNYfZT/pE7fXj1pm/I9q+okOL0vfwVQslqNYkVvwOw1Xiz0RAKBmFioOx2 lKOEZin7Sr0rzFlpPbLcA9avn/bC9a1RAZXUzdzjH/R7U1U1B5qhbDnMAxjsPfu007 aiD9BfaUzndOYQKNvtdq1g42Bj3Zb3xbwlBfkKW0= From: Andre Muezerie To: Cc: dev@dpdk.org, Andre Muezerie Subject: [PATCH 0/3] add diagnostics macros to make code portable Date: Thu, 26 Dec 2024 17:33:13 -0800 Message-Id: <1735263196-2809-1-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 It was a common pattern to have "GCC diagnostic ignored" pragmas sprinkled over the code and only activate these pragmas for certain compilers (gcc and clang). Clang supports GCCΓÇÖs pragma for compatibility with existing source code, so #pragma GCC diagnostic and #pragma clang diagnostic are synonyms for Clang (https://clang.llvm.org/docs/UsersManual.html). Now that effort is being made to make the code compatible with MSVC these expressions would become more complex. It makes sense to hide this complexity behind macros. This makes maintenance easier as these macros are defined in a single place. As a plus the code becomes more readable as well. Andre Muezerie (3): lib/eal: add diagnostics macros to make code portable drivers/common: add diagnostics macros to make code portable drivers/net: add diagnostics macros to make code portable drivers/common/idpf/idpf_common_rxtx_avx512.c | 4 +-- drivers/net/axgbe/axgbe_rxtx.h | 12 +++---- drivers/net/cpfl/cpfl_rxtx_vec_common.h | 4 +-- drivers/net/dpaa2/dpaa2_rxtx.c | 15 ++------ drivers/net/fm10k/fm10k_rxtx_vec.c | 4 +-- drivers/net/hns3/hns3_rxtx_vec_neon.h | 2 +- .../net/i40e/i40e_recycle_mbufs_vec_common.c | 2 +- drivers/net/i40e/i40e_rxtx_common_avx.h | 4 +-- drivers/net/i40e/i40e_rxtx_vec_altivec.c | 2 +- drivers/net/i40e/i40e_rxtx_vec_avx2.c | 4 +-- drivers/net/i40e/i40e_rxtx_vec_avx512.c | 4 +-- drivers/net/i40e/i40e_rxtx_vec_common.h | 4 +-- drivers/net/i40e/i40e_rxtx_vec_neon.c | 3 +- drivers/net/i40e/i40e_rxtx_vec_sse.c | 4 +-- drivers/net/iavf/iavf_rxtx_vec_avx2.c | 4 +-- drivers/net/iavf/iavf_rxtx_vec_avx512.c | 4 +-- drivers/net/iavf/iavf_rxtx_vec_common.h | 4 +-- drivers/net/iavf/iavf_rxtx_vec_sse.c | 4 +-- drivers/net/ice/ice_rxtx_common_avx.h | 4 +-- drivers/net/ice/ice_rxtx_vec_avx2.c | 4 +-- drivers/net/ice/ice_rxtx_vec_avx512.c | 4 +-- drivers/net/ice/ice_rxtx_vec_common.h | 4 +-- drivers/net/ice/ice_rxtx_vec_sse.c | 4 +-- drivers/net/idpf/idpf_rxtx_vec_common.h | 4 +-- .../ixgbe/ixgbe_recycle_mbufs_vec_common.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 4 +-- drivers/net/mlx5/mlx5_flow.c | 6 ++-- drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 6 ++-- drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 2 +- drivers/net/mlx5/mlx5_rxtx_vec_sse.h | 4 +-- drivers/net/tap/tap_flow.c | 6 ++-- drivers/net/virtio/virtio_rxtx_simple.c | 4 +-- lib/eal/include/rte_common.h | 34 +++++++++++++++++++ 34 files changed, 77 insertions(+), 101 deletions(-) -- 2.47.0.vfs.0.3