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 58C4BA04A5; Wed, 9 Feb 2022 15:58:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0ED8B41144; Wed, 9 Feb 2022 15:58:34 +0100 (CET) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mails.dpdk.org (Postfix) with ESMTP id DD2C641143 for ; Wed, 9 Feb 2022 15:58:31 +0100 (CET) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 6F2B13201F7B; Wed, 9 Feb 2022 09:58:29 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 09 Feb 2022 09:58:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding: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; bh=tbFkvwm7xDYT4+ DHsqL/z2N0IslQVZ/x9A/R53LivaI=; b=UzEfNUtOMsx6f94S6c/HbIovvzHriD 2Pv1+PParwYE4YbfFfF2NrClLbpXpOMWxYyIQTtAdWrQMrpH0DKqkz6moQLsPb7i mb5OKoknrn8f6lTJMSMgbLCdpsfyyRSMiN2CdYNLHGnaNCLeYJenV1XT2Ayu9n48 JB+/DCBG4FLMzcfOAsJtDGP6dtSpAw+KJybN0Mqu/76tddR84p92W6snJLml1wbq dri0i8lvq5+M7ne2xebc87nIT3wGz5KbMAsVCkzllv5DnBGZ5aFgHPh4KyfiPsCl av2wAP8Ske0O8ZeRkNdxdkO/60SRgbSGhSFpUPpLewXVDhjwyYerj1tA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date: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=fm2; bh=tbFkvwm7xDYT4+DHsqL/z2N0IslQVZ/x9A/R53Liv aI=; b=dCc1/h3SFgsY9iLAtfnPghk6PyoHkImqDgtg6GKjpFC9WPLsN7nFkYdnc q++wtI/UIh/PZ4tVAc3xUu1pEQZWHObThX/JLWWt+1XBcHttR3XvVLBfc69N9VCW 2h5SPVr38i2qaofDmqIbl3g08abpgV1kDUEmiRx9+vmsDYnbUlpB10UMcbZN6tx+ mb+ibWsGtpmXnxRhyX4ZLbv1TMthAaEIXem6sBoNOBQUtkoIRTeANIr5mRndDDED 2/3o+YY4/dsifRKwBuk79EOHTY+nXiel1ey7PLEVoOc3HMIuyl1x3fGqVZc/gl5A diE0MU6m1EDx9HcUeboWKF4nczPtA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrheelgdeilecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 9 Feb 2022 09:58:28 -0500 (EST) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org, Stephen Hemminger , david.marchand@redhat.com Subject: Re: [PATCH] eal: remove unnecessary argv[0] handling Date: Wed, 09 Feb 2022 15:58:26 +0100 Message-ID: <2032198.bB369e8A3T@thomas> In-Reply-To: <20220202194738.404876-1-stephen@networkplumber.org> References: <20220202194738.404876-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 02/02/2022 20:47, Stephen Hemminger: > The rte_eal_init function looks at argv[0] to determine > the program name to pass to the log init function. > This is both unnecessary and in a corner case a problem. > > Parsing argv[0] is unnecessary because the function openlog() > already determines the log identifier from program name if > NULL is passed, see openlog man page: > The string pointed to by ident is prepended to every message, and is > typically set to the program name. If ident is NULL, the program name > is used. (POSIX.1-2008 does not specify the behavior when ident is > NULL.) What about POSIX warning? Did you test it? Which libc? What about musl? [...] > - if (eal_log_init(logid, internal_conf->syslog_facility) < 0) { > + if (eal_log_init(NULL, internal_conf->syslog_facility) < 0) { We could completely remove the logid parameter.