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 E7E7D4323E; Mon, 30 Oct 2023 11:35:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6541A402BD; Mon, 30 Oct 2023 11:35:01 +0100 (CET) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id EE83140285 for ; Mon, 30 Oct 2023 11:34:59 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 32CC25C00F3; Mon, 30 Oct 2023 06:34:59 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 30 Oct 2023 06:34:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1698662099; x=1698748499; bh=TnSU7D+kHj+UrYzSFGpcjVx/SND1s1RWhBy 3F5VuPYs=; b=R4dVHzXtsoEfY/0B0/kcsCb+GNb0WSTHNwJXKv8aR72BgYLbDow OPatHUXx+Q0hC07A4nVPhTr1BzDXAjSiZo4br7L/sqAjlllbYxYQZophaT2Ib2z8 gbseW3kpr9SN/e3EFkYt7XXdGSEcbKOywtmF6p353cCuYfqzPIdDfdzoPpveoViE qKu2rWOqbmU1sRSGtc9uJVQ1FBadW3tWjzEJJZtPfscnbjKzqIVtL8tczdRPSzDg tXQ6ZdUNbYuoZB8kLXyKaKtPPGWY26VXRrfPVBAFcdq2ObtSthEcN3g664PXPhWT lqE1OHAtWYjoF7yA6M4iWgTP425Dg8jAfpA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1698662099; x=1698748499; bh=TnSU7D+kHj+UrYzSFGpcjVx/SND1s1RWhBy 3F5VuPYs=; b=SIrXMEwjaLEHrVqt/A/fHAtgHJ2ucMu8S+PIt6Gt1MmyMOMFDMv S0M+NgWDPPfO2t4t/pr2N/fSr8e2dfVWHWVLD2ir6mB534fbJnweNiVYNRv6Sktq y2HS8bBkPQ7oYGSoPG18wLacIGBZ5oKGE1WwLGPeZX6t/w/BkKN4hDtvORz1tel0 Z1zO7T1oEGRhaw4JRG6VyAknYWl3moT9KKF30vomIS2abw6N3qiZXe6oX+Bq33nv psdwD9oiktOHs9LcCSKgbYSlJobjIPnz6wUCxhg7Dd6EvtKZ1mTuRerZuDV31HuA 5zgMh4W7VZaT+nJj/SXbbrWhHVdBnsarwUg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddttddgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthhqredttddtjeenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeegtddtleejjeegffekkeektdejvedtheevtdekiedvueeuvdei uddvleevjeeujeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 30 Oct 2023 06:34:57 -0400 (EDT) From: Thomas Monjalon To: Morten =?ISO-8859-1?Q?Br=F8rup?= , David Marchand Cc: ktraynor@redhat.com, dev@dpdk.org Subject: Re: [PATCH] eal/unix: lower log level for reading files Date: Mon, 30 Oct 2023 11:34:55 +0100 Message-ID: <3255719.aeNJFYEL58@thomas> In-Reply-To: References: <20231027080031.251425-1-david.marchand@redhat.com> <98CBD80474FA8B44BF855DF32C47DC35E9EFA4@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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 I would add "sysfs" in the title. 27/10/2023 11:13, David Marchand: > On Fri, Oct 27, 2023 at 11:00=E2=80=AFAM Morten Br=C3=B8rup wrote: > > > > > From: David Marchand [mailto:david.marchand@redhat.com] > > > Sent: Friday, 27 October 2023 10.01 > > > > > > The eal_parse_sysfs_value helper both returns an error code and logs = an > > > error level message when something goes wrong. > > > On the other hand, internal users of this helper either ignore this > > > error code (like when trying to find out some numa information from t= he > > > Linux sysfs, or discovering some optional feature), or add their own > > > error > > > logging when reading the file actually matters. > > > > > > Lower this helper log messages to debug level as it provides no useful > > > information to final DPDK users. > > > > Such assumptions seem risky. > > > > Please add __attribute__ ((warn_unused_result)) to this function's head= er, to support the assumption. >=20 > I can add this. Would be __rte_warn_unused_result I'm not sure it is required to mandate checking the result. I'm fine with or without it. I agree with this patch because not having a sysfs entry is never critical = in itself. If the entry is required in a case, it should be handled by the caller with a more meaningful message. Acked-by: Thomas Monjalon > > Alternatively, add a "bool may_not_exist" parameter to the function to = choose the relevant log level. >=20 > If an API update is to be considered, I would rather add some new > helpers with Windows support. Please don't change the API for such detail.