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 1664445EBC; Mon, 16 Dec 2024 10:02:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A36EA40261; Mon, 16 Dec 2024 10:02:32 +0100 (CET) Received: from shelob.oktetlabs.ru (unknown [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 9E9A14025A for ; Mon, 16 Dec 2024 10:02:30 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru A99A950 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1734339743; bh=PH3rwrf4eV4a06NhHLH6Gg57SeGzklpaLYBq9fjcbtc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=AuIv0PaBOpbDRjfW0yOHs9l2yjgcROCLJiazAaXGi1S8ytuS7HTciDSAf71xpmvaz XnaUGT1Fs8b4jKy0C7hwGn0h9bygmCyusD/h3Ga2ZmD7Hrzt0w8bRWk+zF5XstBhFa IwN1J29JWFO13+VLp25loMBs5/IMcdh3NON2edg8= Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id A99A950; Mon, 16 Dec 2024 12:02:23 +0300 (MSK) Message-ID: <0c7d6500-0cdf-4649-8f00-a8e7bd90d54c@oktetlabs.ru> Date: Mon, 16 Dec 2024 12:02:23 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 13/21] drivers/net: use portable variadic macros To: Andre Muezerie , Shepard Siegel , Ed Czeck , John Miller , Ajit Khaparde , Somnath Kotur , Hemant Agrawal , Sachin Saxena , Shai Brandes , Evgeny Schemeilin , Ron Beider , Amit Bernstein , Wajeeh Atrash , Gagandeep Singh , Apeksha Gupta , John Daley , Hyong Youb Kim , Jie Hai , Bruce Richardson , Anatoly Burakov , Rosen Xu , Vladimir Medvedkin , Jiawen Wu , Devendra Singh Rawat , Alok Prasad , Jian Wang Cc: dev@dpdk.org References: <1733882751-29598-1-git-send-email-andremue@linux.microsoft.com> <1733882751-29598-14-git-send-email-andremue@linux.microsoft.com> Content-Language: en-US From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <1733882751-29598-14-git-send-email-andremue@linux.microsoft.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 12/11/24 05:05, Andre Muezerie wrote: > 1) Use portable variadic macros > > Many places are using a GCC extension related to variadic macros, > where a name prepends the ellipsis. This results in a warning like > the one below when compiling the code with MSVC: > > app\test-pmd\testpmd.h(1314): error C2608: > invalid token '...' in macro parameter list > > Variadic macros became a standard part of the C language with C99. > GCC, Clang and MSVC handle them properly. > > The fix is to remove the prefix name (args... becomes ...) and use > __VA_ARGS__. > > 2) Add "do { } while (0)" to macros used to remove logging calls, to > ensure there's no code structure change when enabling/disabling > logging. > > Signed-off-by: Andre Muezerie For sfc, Acked-by: Andrew Rybchenko