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 08A3AA00C5; Sat, 5 Feb 2022 10:00:10 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 958E5406A2; Sat, 5 Feb 2022 10:00:09 +0100 (CET) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by mails.dpdk.org (Postfix) with ESMTP id 6B47D40143 for ; Sat, 5 Feb 2022 10:00:07 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id C167D58012A; Sat, 5 Feb 2022 04:00:06 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sat, 05 Feb 2022 04:00:06 -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=KD9nOspAGQqkKg 0G3SdkkIvRE0yw8wNpMAUmeMgOpKg=; b=a58ReOAtZTi5JKM83X8iTvGKibU87z ZlGWLxUXU8WWu0D3IgJNM+30ew84Cy8Td8sscKeYUfztf/3K6ALh2SeSqm7df2H7 tm4A6zx7W9b5mlgPH5Nz2QtjJXI2E+sG31yEkR5EUWTbihrnCA+++N7DSO78Iie8 Muk2OkQaKwbyeYn6Vbk5WospCBiNNeu2GV5hjud2WO8UbTJU5WQSAqh71n3uJixL rwEuK9L3IdnLBOg9faKn2Mi+AwHj07U4Cz6Xd3yVs8QopyAXmz/9BtvIT0zeVSLM KaBzjM2mmAPnOHlRZfbpBrnnvCSIHTM2OPSO36kVg1dzIICm5enluZ4w== 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=KD9nOspAGQqkKg0G3SdkkIvRE0yw8wNpMAUmeMgOp Kg=; b=REUvvBfk2w3Oz64yxo5h9h+Wnhqhfi/3gSE64ctPSShNLOA+SDpwPRCWf LKAC/X+ZrAiXb/LCagt5pETW9o79X7GbsxdWSwwQnkQw8bWShXWIGY9R36nq9qcG 4cWrzFDxsYIn9sZ5b15H9yPmXkvVZWniING1MlNX6XRCUsdjor+X+a75RFAFiEGs Lc2ItOfK05nKARIuk8BJbbMxG99dPD1Q8YlpbWfYnY/vAjAYIryavuCpxILfSs79 DFeRBFSj3GkwnQK1zSTrIL70AIw0ZWRD8wMGWtrG6oPbwoAVHulcV3iGrdmEcWU4 HYUJj/a26Gh2lbO7xD3PQoo/suP3g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrhedtgdduvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 5 Feb 2022 04:00:04 -0500 (EST) From: Thomas Monjalon To: "Ananyev, Konstantin" , Tyler Retzlaff , "navasile@linux.microsoft.com" Cc: "Richardson, Bruce" , "david.marchand@redhat.com" , "dev@dpdk.org" , "dmitry.kozliuk@gmail.com" , "dmitrym@microsoft.com" , "khot@microsoft.com" , "navasile@microsoft.com" , "ocardona@microsoft.com" , "Kadam, Pallavi" , "roretzla@microsoft.com" , "talshn@nvidia.com" Subject: Re: [PATCH v18 2/8] eal: add thread attributes Date: Sat, 05 Feb 2022 10:00:01 +0100 Message-ID: <7543187.gsGJI6kyIV@thomas> In-Reply-To: <20220205044140.GA7734@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20220205044140.GA7734@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> 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 05/02/2022 05:41, Tyler Retzlaff: > On Fri, Feb 04, 2022 at 07:21:10PM +0000, Ananyev, Konstantin wrote: > > > +int > > > +rte_thread_attr_init(rte_thread_attr_t *attr) > > > +{ > > > + RTE_VERIFY(attr != NULL); > > > > As a generic one, here and everywhere: > > Please don't use RTE_VERIFY() for checking input function parameters. > > We don't want to panic in case of just invalid parameter from user. > > i ask this question again. what useful thing will the user application > do when handling -EINVAL or rte_errno = EINVAL is returned for > incorrectly supplied parameters? > > again, there should be a mechanism that allows a policy for how these > non-recoverable errors are handled rather than defaulting to tossing > it over the fence and expecting the application to do something > sensible when the only thing it could do is conclusively more > complicated than having passed the correct parameters in the first place. > > more often then not application programmers will ignore superfluous > return values from functions like this resulting in the bug remaining > longer and the state / reason being lost. > > please reconsider. The application should just abort this feature indeed. But remember the application can have other features. In some applications, the DPDK features are a minor part. So we don't want to crash the entire application just because a DPDK feature has a bug. More generally, a library should never crash an entire application.