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 1460743214; Fri, 27 Oct 2023 11:13:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B8893402CE; Fri, 27 Oct 2023 11:13:58 +0200 (CEST) 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 4076F40272 for ; Fri, 27 Oct 2023 11:13:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698398036; 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=ZVcEl24qUzDDjMBC2gMnWPbfistZmn06rgPolIrQF8I=; b=NXdvFGDaXMzXPKrPAcH0OXVRdzGnA3sFaIypSBUYaK0Aq2eJXitxysr8g5gVW7C0EmNv/F DUfmaF3t3wqMw/78it5G2IViB7WwbzPXHUTOkatnD94g+0dRADZHDtxhK0C24vD4/OKLBq LbtftjhOV9gq4fQny7+lD/OfxMREOME= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-271-Pyfm2w7AMPiIOXpsE5jMaA-1; Fri, 27 Oct 2023 05:13:55 -0400 X-MC-Unique: Pyfm2w7AMPiIOXpsE5jMaA-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2c515541a25so18876911fa.0 for ; Fri, 27 Oct 2023 02:13:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698398034; x=1699002834; 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=ZVcEl24qUzDDjMBC2gMnWPbfistZmn06rgPolIrQF8I=; b=vOTKIn/jmolsuNjCP2mAuRP442lPTCpbU2oyb58IOpAhb/phSQwTNRJxVOOSxQTHEt EFSh4LRRxzVIAC3uDKm9nmnboxDyV9jxAJMrFrpiCY8klS2yhLJ0T9Uv31HWOo29h4j4 cHjJaXjpV3eRHKoYv+jffEONFbKYq7gVuIJVXRi1c1NZ1OoaRfycGnU0qaAnE/kSy5KH DzoYZFqiaYnndowOAOJrTRB81jdsbIOhqxux0u1VCoBbf3oXb7BX/1yo0AXHCooEGz3b 7kP/ODTjBMVTdc4Mj5ZF4WU+outA4zZOZO3Qr5Z5HDvqBJvbF5Jgo+1Luo1VEvZkZQil 1ntw== X-Gm-Message-State: AOJu0Yys1U5ZNP/HCUmGzSUO36bkgeVuuiLbAo3KY5U3U7DHysG707Qv vp6XtUHoOOer8Or44EMtzLyds4h8Vy/hmuCyN3NZebDFWDILTz0S+YAsWNGBZ6o+tGLa1NUsCaq T33QtZpijyWQFw7DQmOk= X-Received: by 2002:a2e:b254:0:b0:2bf:fa62:5ceb with SMTP id n20-20020a2eb254000000b002bffa625cebmr1453823ljm.11.1698398034032; Fri, 27 Oct 2023 02:13:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG38gASvXjHYhzZrJNpEoL5wmw7j6K+m2YWdrNSVJpiMPLNLlrGWgWKLtmDe6vwZoBNNcqzNXEA4LvO2WWtdAM= X-Received: by 2002:a2e:b254:0:b0:2bf:fa62:5ceb with SMTP id n20-20020a2eb254000000b002bffa625cebmr1453809ljm.11.1698398033696; Fri, 27 Oct 2023 02:13:53 -0700 (PDT) MIME-Version: 1.0 References: <20231027080031.251425-1-david.marchand@redhat.com> <98CBD80474FA8B44BF855DF32C47DC35E9EFA4@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9EFA4@smartserver.smartshare.dk> From: David Marchand Date: Fri, 27 Oct 2023 11:13:41 +0200 Message-ID: Subject: Re: [PATCH] eal/unix: lower log level for reading files To: =?UTF-8?Q?Morten_Br=C3=B8rup?= Cc: ktraynor@redhat.com, dev@dpdk.org 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 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 the > > 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 header= , to support the assumption. I can add this. > Alternatively, add a "bool may_not_exist" parameter to the function to ch= oose the relevant log level. If an API update is to be considered, I would rather add some new helpers with Windows support. --=20 David Marchand