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 D8D1443C2C; Wed, 28 Feb 2024 18:29:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C50AF42D90; Wed, 28 Feb 2024 18:29:30 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id E512540E0F for ; Wed, 28 Feb 2024 18:29:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709141369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5okff4T3buPaumwg2BhIoq1vKwNRZk4WIXOep5gYEIY=; b=QjQj0wowbsiqpUiscYTZUyqltcmZkdpkL2921bOPMm7fbq7czCQ4l90EL4HGVrnKhBTfcW 9L/5h5Fe8FK7T0LDexmXnArHyiFYka28CjQKmXn63gVwwJ1lUsJg1errYKylQmRmvI5Rk8 8AQxN9Vk7p/nOLGh/Hz8W2/8vHNtLsA= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-557-nfzuJmfeN-W6uvi803hEKw-1; Wed, 28 Feb 2024 12:29:28 -0500 X-MC-Unique: nfzuJmfeN-W6uvi803hEKw-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2d2617b1214so49247881fa.1 for ; Wed, 28 Feb 2024 09:29:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709141366; x=1709746166; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5okff4T3buPaumwg2BhIoq1vKwNRZk4WIXOep5gYEIY=; b=W3lickWMJNdDdayCWoGLqknk7FJ4ZIUQ4GUSLAGMWrWEu/sCi4zCQUXCoAy7v40zDd jO5qQ1TcXDmqITou4zQ4Y1shc5E8TBy2BqB3uJPk9hwcmjxy91H25czjvyLIXCJFvtjO heqXLtEKV2kiRPm749r0NZzTY1s4SuO1p+1hhV7pcIRFJe/ptYHynWm80LnBHoH3r3hH vUNMoGa/rOl2s3b5P4IGeN11YmjALiPvfgE95TOTntBgJTmbHOgXUzee4AwB24b4WmqE tQoPcYmdnDdkr9d+THFYHaFMyu9dITTr7I1C44Zer5eW3keeQ+wm5a90vq2jTuIwCUnW CcNg== X-Gm-Message-State: AOJu0YxzLgqK+ja1oUR3NedAByk8CGydiaFtbHzaczrPUY6YzHcY0CDj PJGkLf0ObvcPiEzYsXzPZo6dTVO+M83N7RLoCPFVi5DjRtaveJp/CPBYNQNrkkfu+N3seu3OYwB FHNeBBoU5MNRddK5K8OlzcogWjkooO+1lSptdlZ5o5fFSRz00HFrB4NnOMwbED95JHcdFck0YtS s8uDBIiv6TaLgLnd0= X-Received: by 2002:a05:6512:3b84:b0:513:1c3e:1e13 with SMTP id g4-20020a0565123b8400b005131c3e1e13mr339034lfv.8.1709141366779; Wed, 28 Feb 2024 09:29:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFi1Tz+Es/qdx09EW6fnMjdjYxNKm6MJtkI+L9Q7RD41pTMYTDzQ4qOBCVMj+BKK9COagDsBiPbUgTIsJ4HqYU= X-Received: by 2002:a05:6512:3b84:b0:513:1c3e:1e13 with SMTP id g4-20020a0565123b8400b005131c3e1e13mr339021lfv.8.1709141366473; Wed, 28 Feb 2024 09:29:26 -0800 (PST) MIME-Version: 1.0 References: <1707774557-16012-1-git-send-email-roretzla@linux.microsoft.com> <1708978786-6740-1-git-send-email-roretzla@linux.microsoft.com> In-Reply-To: <1708978786-6740-1-git-send-email-roretzla@linux.microsoft.com> From: David Marchand Date: Wed, 28 Feb 2024 18:29:14 +0100 Message-ID: Subject: Re: [PATCH v3 00/16] stop using variadic argument pack extension To: Tyler Retzlaff Cc: dev@dpdk.org, Anatoly Burakov , Ashish Gupta , Chenbo Xia , Cristian Dumitrescu , David Hunt , Fan Zhang , Hemant Agrawal , Honnappa Nagarahalli , Jasvinder Singh , Jerin Jacob , Konstantin Ananyev , Maxime Coquelin , Reshma Pattan , Sachin Saxena , Sivaprasad Tummala , Srikanth Yalavarthi , Stephen Hemminger , Sunil Kumar Kori , bruce.richardson@intel.com, mb@smartsharesystems.com, thomas@monjalon.net X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Mon, Feb 26, 2024 at 9:20=E2=80=AFPM Tyler Retzlaff wrote: > > RTE_LOG_LINE cannot be augmented with a prefix format and arguments > without the user of RTE_LOG_LINE using the args... and ## args compiler > extension to conditionally remove trailing comma when the macro receives > only a single argument. > > Provide a new/similar macro RTE_LOG_LINE_PREFIX that accepts the prefix > format and arguments as separate parameters allowing them to be expanded > at the correct locations inside of RTE_FMT() allowing the rest of the > non-prefix format string and arguments to be collapsed to the argument > pack which can be directly forwarded with __VA_ARGS__ avoiding the need > for conditional comma removal. > > I've done my best to manually check expansions (preprocessed) and compile= d > printf of the logs to validate correct output. > > note: due to drastic change in series i have not carried any series acks > forward. > > v3: > * remove leading _ from RTE_LOG_COMMA the macro is not internal > * add doxygen comment for existing RTE_LOG{,DP}_LINE function-like > macros, based on RTE_LOG{,DP} comments. > * add doxygen comment for new RTE_LOG{,DP}_LINE_PREFIX function-like > macros, based on RTE_LOG{,DP} comments. > * merge 2 vhost patches into a single patch (mistake in previous > submission) I find this new helper less tricky to use and easier to read than the RTE_FMT_* stuff that gets copy/pasted everywhere. The changes are quite mechanical, so even though we are past -rc1, +1 for me on the series. Can we finish the job and convert remaining macros that prefix messages in = lib/? --=20 David Marchand