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 87BC5A0579; Mon, 3 May 2021 14:58:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 04EAF4014E; Mon, 3 May 2021 14:58:40 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2138.outbound.protection.outlook.com [40.107.92.138]) by mails.dpdk.org (Postfix) with ESMTP id 14E27411E5 for ; Thu, 29 Apr 2021 17:52:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E3In+MYWMsWKVj+hUeQMNcHa2PnR64QMaj8tBcB/IVqqoqYx8+wB2YA8K70ZZ62YbKUy/5wQRoJSSH+PTrx7d86Gu9cLy9RsAvG0PlKknagyoVs5leGMchcy1mkEpBG/Xxf/tALDGXZgMxpSUcfnJYv1UCrwVrfGZHcxdQatED11S72v7X071hhhC4XgLniAOqz3iAa084lk0WC5lrtAupg7K9cwOZFQXelByWrTmVahZg+vem6fPR7FsZFYhjArS5WkMwqmSI79pyfqfMjR8qCuXIJSuLL42tp/u5YwNgcSRHcqiTg+OFrbC/uzKAg/LZxrhWZ/Wgj+Cinpg6uahQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7SWqcSOGAcwjGvtWOCIQvrmnJ7/TvC9YKulREBs81qE=; b=lzFOHyMyxVV89O49AKhgUhX30izW9L3rq/gYUGRmibTohW9SAiaaSjtYP4QTxUqUZXVfGl4xQlLld7oX0ctW2WOw40feaMhNFc/N2PbNsncgO0HzxU8HExUPTtvkh43+CePe7EVEAwiWIQdavKVQLL6HIMc8npP2UruBsCOVgbmL5gdbr5qzYb+u0pI9Ax6ICRA3olApOUpy0kPsdyhRIdRUC/ErqblwZL480/cJcV8SGXp7frDBECtWlnKR76S2y9l8DBK6/lyaWWhQqCk3G5k5TCLUkUQWtEllJRRK1qKLa2PZQUpBfvNIe+Fbr8l75bLVAsnEBGMYpNL8RbRD+Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7SWqcSOGAcwjGvtWOCIQvrmnJ7/TvC9YKulREBs81qE=; b=JwPQoVg5b7F7O2Ta+tA+2GhivayFxSyNCzoO4Fai7qf6xKfk4h6yzXoDvLIIJuZ7aB6jCmrcIPlVx9FBWgpvbgmC08uMwQazQgdvgGwN7UP9JIC7cAt//zrwfWBN9W3kLyKYltFbisyyK7jjj0B6/a36DE9L+CkS+8UNd0zXsUk= Received: from DM6PR21MB1324.namprd21.prod.outlook.com (2603:10b6:5:175::11) by DM6PR21MB1321.namprd21.prod.outlook.com (2603:10b6:5:175::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.3; Thu, 29 Apr 2021 15:52:45 +0000 Received: from DM6PR21MB1324.namprd21.prod.outlook.com ([fe80::842c:ef91:864f:d9f]) by DM6PR21MB1324.namprd21.prod.outlook.com ([fe80::842c:ef91:864f:d9f%5]) with mapi id 15.20.4108.008; Thu, 29 Apr 2021 15:52:45 +0000 From: Tyler Retzlaff To: thomas , Narcisa Ana Maria Vasile , Dmitry Kozlyuk CC: "dev@dpdk.org" , Khoa To , Narcisa Ana Maria Vasile , Dmitry Malloy , "talshn@nvidia.com" , Omar Cardona , "bruce.richardson@intel.com" , "david.marchand@redhat.com" , "Kadam, Pallavi" Thread-Topic: [EXTERNAL] Re: [PATCH v6 02/10] eal: add thread attributes Thread-Index: AQHXPJGtWjA+u5RIBUucTnso4KKSuarLHugAgACDyFA= Date: Thu, 29 Apr 2021 15:52:45 +0000 Message-ID: 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> In-Reply-To: <2879074.f3q8zTBTW7@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=e27c9f95-c527-4674-8c58-36ac20d65e5b; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2021-04-29T15:39:59Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: monjalon.net; dkim=none (message not signed) header.d=none; monjalon.net; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [2001:569:f858:9100:8009:d8b0:626:b24e] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e993a32d-b816-4097-826a-08d90b26d49d x-ms-traffictypediagnostic: DM6PR21MB1321: x-ms-exchange-transport-forked: True x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Y8foRa2+COjY4VltzsTYqM+sZCvjDkkvbeJvNnCTSu0mUQPsg+VkRKu/lBy9v6SBQuCjP1Qi9L9ePGQrpOlTjTHIrzMW++VEcM6nt8Plpu84QsPMVPDq5riePrNfvkXJR8sr2TSeo71gUwigyZS8K2ZhcJQ9pgIkHQc1Fva30qr1xxGFaUB0fne4UzD8ci/ym+9CtZeQc6G7FD8gGn48jpmUEiAvIizaT82W4q+KvJ6flgBNKFgdehXAoGHK56rDoLUglPCtQZTSmlveItfjUOW3zo6E+8EGm0zIYpTx3Nn4KolY/Xq803SM3sqdMDGZQN69KFKBjdaXEAiXb64Lf2azRbbyD8+k4GGw71wMVV5Za7XozO5NH/8pWAPahOUs+Ktj39Ax/NXBPhhp5nVGCWOsR4QWCzBAosvxHOB8ZLRG4D5cnKEwORb5L+vuH/pNjDm0csCu0SKEbayVnrutwUGmj6mnvykKsICN/NYyiJ+CLQejCw3SJB7AgPpHd5OqnZRp5gmCXib/98v1UmMsXy+7dk/2ix1Qf4tnJT9E8Nzn0pq7tcej9siQHyhxZ1P+9kTxZ5hAX10k3mX0bfIdbO18uEK2L7/RXEYQJNwVvP4= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR21MB1324.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(8990500004)(10290500003)(83380400001)(8676002)(52536014)(478600001)(122000001)(71200400001)(38100700002)(8936002)(86362001)(5660300002)(2906002)(6506007)(9686003)(33656002)(55016002)(186003)(7696005)(66446008)(64756008)(66476007)(316002)(66556008)(66946007)(82960400001)(110136005)(54906003)(76116006)(82950400001)(4326008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 2 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?oLrtxK7aIKbx21DYgyvWGTHP/W1wjKmrsVSutDCq/EoB0gIT6QDK/Cm26ce9?= =?us-ascii?Q?Wp8TzlfCADYb6z0PPdiTea/kReIxc3slzhPRUHZwq8YbKvoBO40RjkO1OSA+?= =?us-ascii?Q?/kyf94F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= x-ms-exchange-antispam-messagedata-1: sv+yt3RolHuSRhFQSOg5ieD4AD3IPjvZH6ZeeqL2FolFIR+b/4BrmqoYrJfCoQ8SAFZKdnJziVJCzACuFvUzTK+JG2OIUMhdwuc7RfENQj1ryGW42Ddidq8XXtIxz/9HkIYAhGtd2Yfga0Dg1cdWPpCDCaz2fpRGRDU108qFa/wMcQr9+CPN8bnRYp8d6hjYNYoN7xfvyfI3k9o9EeIBmWzsaZUV19ddNjVeXvQAxpC3H1Fz3Q4ruATmrlULbJ6bjpGZY2z3E69sKXbtL5IvnHkhtC50/mujDjPS4BjYe+fRTfZShmC22zcdtPeRDXZ1XQAkbWZXYu7CDkaLz9xJqnIVEfTtJAfuW1iXiChqkFRovXR2s6tFyhWzHkhjXKHGyRkKZ5Zdpd30yotJZlYhhk/j Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR21MB1324.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e993a32d-b816-4097-826a-08d90b26d49d X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Apr 2021 15:52:45.2056 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9Y5gwerDx5sBi2VEy09HCNVtxRPSVniJ1gI9FIg/B2lqRgGtdq2tQcFGek4X8KLq67zxAWE0K3rA1oWdpas0+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR21MB1321 X-Mailman-Approved-At: Mon, 03 May 2021 14:58:38 +0200 Subject: Re: [dpdk-dev] [EXTERNAL] Re: [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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- From: Thomas Monjalon =20 Sent: Thursday, April 29, 2021 12:48 AM 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 =3D=3D NULL) { > > > + RTE_LOG(DEBUG, EAL, > > > + "Unable to init thread attributes, invalid parameter\n"); > > > + return EINVAL; > > > + } > >=20 > > This message doesn't add value for debugging: caller already knows=20 > > that attribute initialization failed (that's what function attempts to= =20 > > 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 ;) Shouldn't this specific case be an assert? Unless we are trying to maintai= n compatibility with existing badly designed semantics. The whole calling pattern is non-sensible, the caller passes an NULL parame= ter to a function where the input contract is non-NULL and then proceeds to= handle the error by doing what that could possibly be useful exactly?