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 2A585A054F; Tue, 2 Mar 2021 18:09:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E867640693; Tue, 2 Mar 2021 18:09:16 +0100 (CET) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) by mails.dpdk.org (Postfix) with ESMTP id E9E3E40142 for ; Tue, 2 Mar 2021 18:09:15 +0100 (CET) Received: by mail-lj1-f179.google.com with SMTP id e2so17708702ljo.7 for ; Tue, 02 Mar 2021 09:09:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B0gHmBZHyU2wLWhNbRauQzW2Sd9zfs/WXRYZ4mOITvM=; b=gQvLRErN+y06opYwjNVlIj5+t2oLqcFSAsT8Su7/JDpCoGu7uPEwc7AmO64AaVDmHJ esgrKghkxCoM/o1Xtbx/M+JUd0C+jj7WnzE6gy4ksbZNNvrGvLvlBBeY456rrRr1M4Oi WDsU2C5mSJg56GmE5xody4vTdfc32kd3Vht75qk8N9JNjUtSfkjgjkulEmfdotWORT0Z IJYi99ih6jhXobzlNa/aWPFiOxKggtqJ4Arzv5dJKnYm9uBCJ2T8IZmOX9fiAhzgc4Tg b7zR6NLNM1xtNS3G8VgDv0+mRG9DmzI4oda5Gveu41cMxgEgQtJ06nowXeUMlzTF2mIk D2sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B0gHmBZHyU2wLWhNbRauQzW2Sd9zfs/WXRYZ4mOITvM=; b=qG+hFavg33KdRMA4K2ZU323yYlDKIOiPu5umnkcPcoUVLX14oVQNRgaSEdiIP0y0ia MIQT9tfCIoTyYo75X5Hu0lYIlpFavGX3wXRZ3kHt1+Ijo3xZgfYO+XjiEel7Mjxlnzro Xq2XGylDzkcB9P/1TUsKXtnwpNZYrnqx2qlhdGDzWJjc+CQR3jy+2pLktPlfdAM9kyZc XdSBGTt3pTkM1/rXdqn+uWlnar/zV2l7fyom09WXwM6jaPGoleDWd6JdarTn9DYhN1Vc c+3DLpvu4mkgKdLrkOs5pX2aXOQRo+BBTaWfkxjCjqTkUzDOjd683jlZhAuRQL5xbVXv +HQQ== X-Gm-Message-State: AOAM531MmTMnBhA4fB29NcHPnHpZZGYIfu9s1FCU+ZTXVtoxrR1kIIF0 HsnJvGlr17PhIKnuHZUrvDs= X-Google-Smtp-Source: ABdhPJy8g35dOAneAMUgeC8mtW5ipaErT8ms9nxl4TD80iXQnwJMv2zzIlbxCClg3BxFT9mrziLmfA== X-Received: by 2002:a05:651c:1a3:: with SMTP id c3mr11013592ljn.77.1614704954562; Tue, 02 Mar 2021 09:09:14 -0800 (PST) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id t17sm797471lft.224.2021.03.02.09.09.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Mar 2021 09:09:13 -0800 (PST) Date: Tue, 2 Mar 2021 20:09:12 +0300 From: Dmitry Kozlyuk To: Tal Shnaiderman Cc: dev@dpdk.org, thomas@monjalon.net, pallavi.kadam@intel.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, david.marchand@redhat.com, anatoly.burakov@intel.com, vladimir.medvedkin@intel.com, mb@smartsharesystems.com Message-ID: <20210302200912.63b57033@sovereign> In-Reply-To: <20210302152658.9136-2-talshn@nvidia.com> References: <20210302152658.9136-1-talshn@nvidia.com> <20210302152658.9136-2-talshn@nvidia.com> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 1/2] eal: error number enhancement for thread TLS API 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 Sender: "dev" 2021-03-02 17:26, Tal Shnaiderman: > add error number reporting to rte_errno in all > functions in the rte_thread_tls_* API. > > Suggested-by: Anatoly Burakov > Signed-off-by: Tal Shnaiderman > --- > lib/librte_eal/include/rte_thread.h | 6 +++--- > lib/librte_eal/unix/rte_thread.c | 6 ++++++ > lib/librte_eal/windows/rte_thread.c | 8 +++++++- > 3 files changed, 16 insertions(+), 4 deletions(-) Using OS error codes for rte_errno isn't the right thing to do: this way callers cannot write a portable check of rte_thread_*() result. Consider returning some suitable stable values. OS-specific error info can be logged at debug level, as it is already is some places.