From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 7705BA0547;
	Thu, 29 Apr 2021 18:28:43 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 5F0E94115F;
	Thu, 29 Apr 2021 18:28:43 +0200 (CEST)
Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com
 [209.85.208.173])
 by mails.dpdk.org (Postfix) with ESMTP id 852BC410DD
 for <dev@dpdk.org>; Thu, 29 Apr 2021 18:28:41 +0200 (CEST)
Received: by mail-lj1-f173.google.com with SMTP id a13so23317630ljp.2
 for <dev@dpdk.org>; Thu, 29 Apr 2021 09:28:41 -0700 (PDT)
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=Y/ljyRgf81RrzzNMAL5ajKoZObHEFF8MbLjEP4GhvS0=;
 b=gi6yit4ldNVL4dYFlbFvm6/M1fYKijp21tbKGl/1YRxpz43YClxPQ11IGMdWhhZAxX
 xQKmROEh7ZMbSD1u/aicpGh+TIIqmB3R66nQoM772rrcqGhFrPoMo4MXzM+xxghaSUfQ
 Ygv+sBXnj/u2rQVKIvX66eZ+XVZs4NEMLs8jrB+8ioLY3BYtcLOQ2cYobe4BkRHcYbmP
 FmdqCgj7pwbuYEE/eIic3j/o2ppsZdwiUMjekjskr7W69e2M8I1AousNm9bZ7138Zeei
 vQFcQzpuQJdmjmhUjBnSzVaXRV6zsP/6w/ch8R0uU9UpS8ERu7+HMYuWnjq3t11yqT76
 0wvQ==
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=Y/ljyRgf81RrzzNMAL5ajKoZObHEFF8MbLjEP4GhvS0=;
 b=PzvM/VnmispWiJiKOUCiejkeEQRyd6BHmNDI0RgTVfz3GV6A0LBMNwGS605WS7UfX1
 QoN5y4qY1Gh/UlvJ8hq9qf8r7Jr27PLxeVXh7bJFIUoWEJbkreR6vvPaSrJBtT+sW15H
 4R6xP+wuWMFmWICs8gHfOjVrt2RA3ttoVSwP6CRQntYkqreayHgGa4Sqr6Vn273t7d7f
 ZnimbeVs90avfxtYe/pRq2XmaD8iSQOTHgPSkehpUQcVHepXWZObjuGWj+Gjh8muoJo+
 jUIS2AovQzzDmXNIlaCl0WR+K40an2Mk3kNfm/aqhtbIhJZwvE0MNtbM4y86QOOeNc9s
 yKnA==
X-Gm-Message-State: AOAM5313r7bvLqftQLDp6ZRhnx+G38ixNvzkGstryQKpmaciwHqvemQI
 vO+281OuW0sropVEP1j3RRo=
X-Google-Smtp-Source: ABdhPJx0Dt7MSkMcmCtCiVBzMOhRGNkV/WCD03T71M6V7AsbRSc2t0nTKFQZ/zhESRnTpJir1C//gA==
X-Received: by 2002:a05:651c:105c:: with SMTP id
 x28mr363141ljm.474.1619713721215; 
 Thu, 29 Apr 2021 09:28:41 -0700 (PDT)
Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru.
 [37.110.65.23])
 by smtp.gmail.com with ESMTPSA id g20sm25300lfu.17.2021.04.29.09.28.40
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 29 Apr 2021 09:28:40 -0700 (PDT)
Date: Thu, 29 Apr 2021 19:28:39 +0300
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>, dev@dpdk.org,
 khot@microsoft.com, navasile@microsoft.com, dmitrym@microsoft.com,
 roretzla@microsoft.com, talshn@nvidia.com, ocardona@microsoft.com,
 bruce.richardson@intel.com, david.marchand@redhat.com,
 pallavi.kadam@intel.com
Message-ID: <20210429192839.4afac034@sovereign>
In-Reply-To: <2879074.f3q8zTBTW7@thomas>
References: <1617057640-24301-2-git-send-email-navasile@linux.microsoft.com>
 <1617413948-10504-3-git-send-email-navasile@linux.microsoft.com>
 <20210429035034.570f33e3@sovereign> <2879074.f3q8zTBTW7@thomas>
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 v6 02/10] eal: add thread attributes
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

2021-04-29 09:48 (UTC+0200), Thomas Monjalon:
> 29/04/2021 02:50, Dmitry Kozlyuk:
> > 2021-04-02 18:39 (UTC-0700), Narcisa Ana Maria Vasile:  
> > > +int
> > > +rte_thread_attr_init(rte_thread_attr_t *attr)
> > > +{
> > > +	if (attr == NULL) {
> > > +		RTE_LOG(DEBUG, EAL,
> > > +		"Unable to init thread attributes, invalid parameter\n");
> > > +		return EINVAL;
> > > +	}  
> > 
> > This message doesn't add value for debugging: caller already knows that
> > attribute initialization failed (that's what function attempts to do) and
> > that the parameter is invalid (EINVAL).
> > I'd remove it (same applies below).
> > If you find it useful to keep, an extra indent missing (also more below).  
> 
> Recently in ethdev we added more messages like this for NULL parameters.
> I agree it is not a lot useful but I understand that lazy developers may like it ;)

Messages in 53ef1b34776b ("ethdev: add sanity checks in control APIs")
at least tell why exactly a parameter is invalid and which parameter is it.