From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50053.outbound.protection.outlook.com [40.107.5.53]) by dpdk.org (Postfix) with ESMTP id A072498 for ; Tue, 21 Aug 2018 12:04:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oYc3TA69anOwxdQwtE7anZNBwrdt2zli0dcL8NG+AD4=; b=oZHDGMKVRL8VfcWOLEic7Z+lBD5nh1uM8dpZJVBCX8yr+C0BwWKdGnIC3oURObQuPVZ+z9t7gkXV/suKHgSwGd+r21U9N1lWJdCnEDFYhmzcDJ8Jtdj7sg7UFJhhBVvOII2c1ysEx0iVLLxWljTTyMwsPkTaadctJTuU8qSEblk= Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com (52.133.41.11) by AM0PR0502MB3826.eurprd05.prod.outlook.com (52.133.47.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.21; Tue, 21 Aug 2018 10:04:32 +0000 Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::88fa:4498:85a5:9e5a]) by AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::88fa:4498:85a5:9e5a%3]) with mapi id 15.20.1080.010; Tue, 21 Aug 2018 10:04:32 +0000 From: Matan Azrad To: Stephen Hemminger CC: "dev@dpdk.org" Thread-Topic: [PATCH 1/2] ethdev: silence error message on rte_eth_dev_owner_unset Thread-Index: AQHUNbKqStC3UZUkgkeeUiYIHB/sMaTJ/jtw Date: Tue, 21 Aug 2018 10:04:32 +0000 Message-ID: References: <20180814001926.19630-1-stephen@networkplumber.org> <20180816224409.5719-1-stephen@networkplumber.org> <20180816224409.5719-2-stephen@networkplumber.org> In-Reply-To: <20180816224409.5719-2-stephen@networkplumber.org> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM0PR0502MB3826; 6:kfRLY6ZaJYqC0GwLg4dF/E0vMnXmcOp6fu5WUJ/Umv5so1ErHdKDlhnAuts9jo3bmjh53uEo/0tKqJ8ie2jb9FnqUVSUyNsP3bKWfza7ZPmtkTW78a6k3QqfeSMOlWVg6S2DEnrwNO+vtKWRriIRFrqm+UOJrrqaUeSCvNxryBduMFT4pUvDCiBQEn0Uibw/UabCd6e7+01f19f3a0ChLyc5H6AUtS1BdMgNJiU3M4RSXt0mrBDV39cKYXlRH9CwHTovnVzjOZRHddBUervtsQKSW0r2T8JP+fSS3vywgofI/O4vYy6ExrLtJq4ahA+VSW92ZY5zRizlCjl3HDlrmY7qAd7khDVXwbfjlrVZJ6T8FR9JP7NckT+cLjAnf49+svzqyPYQHFp+Y8A1EKOBgsVKMI0Tt0MGYWk3pBVTYkOPlqRdGcqqlZIdata5JvYJJUK652acj+2gcakt/gFaNw==; 5:/HkRrdvTtJBUFzNYXxuVRTGBZ5aKJUsD6QkFgjN8bFLYbhwe/G4NT0d5qkCSlfjZmifhMXsGMwNExPQLd3V4W03ev045x3Q54MUFG248dhyMu0ZPL7pN+TfFEu48x/hs++r7g1k8NPlFdZdgPZD52tFzpR/OSVkUS1VvQvvQToQ=; 7:gEK1PYkjv6j9NvjHpB6/mPespQn3Fvk8cyt8nPxdgVs9WjK4tuPl5CMOQ1N6GQpGu+wSCvHd8qRY2e2Wy/W+QSGlmtNTfoFWFd1BihLWj0oS02UEHvugWZntmbW1L4clx29e2O9y9PGyHacLK8ZmPUlsmHi0ck1JVMVrUXz7oC9YDS5doE0iuzEEw+DVRCVekW0uzM3b08iVDXI9WTQGVXBPmvvTBY1/bhKD+tPGEGdgjqtlvtNom5irqQBqpJoP x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 997e0399-5977-4f26-01bc-08d6074d7e21 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR0502MB3826; x-ms-traffictypediagnostic: AM0PR0502MB3826: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(60795455431006); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016); SRVR:AM0PR0502MB3826; BCL:0; PCL:0; RULEID:; SRVR:AM0PR0502MB3826; x-forefront-prvs: 0771670921 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(396003)(346002)(366004)(136003)(199004)(189003)(105586002)(53936002)(2906002)(55016002)(6436002)(66066001)(8936002)(106356001)(33656002)(229853002)(26005)(6506007)(102836004)(9686003)(14454004)(11346002)(6346003)(478600001)(446003)(81156014)(316002)(68736007)(8676002)(6246003)(476003)(99286004)(2900100001)(4326008)(76176011)(3846002)(7736002)(6916009)(6116002)(74316002)(186003)(25786009)(7696005)(81166006)(97736004)(15650500001)(486006)(305945005)(5250100002)(86362001)(256004)(14444005)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3826; H:AM0PR0502MB4019.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-microsoft-antispam-message-info: lRBGPzG0cftnpbfDpmkMgG+Taj645ykOiaQy2VwluFFjirVb3xV7hFYKuPuPSLc2zJ45P6REVyCqyYFOsi3O3Titj89muNkLhXr9yaOB5Q8n4SKz9sDMrpE54x1YUiWJGZ9I/a22K4h72/rCbh1m3O4gd3/evalobgBIc5mYKSjiY2eXcTsEi4ocEnN+uAsJGaRRt01zqhKKIcXFDUPr6RWrBZBohW0CHb+L1gli1V4NLQfCw7caeO2YeAUwiMiWcFQ6MOuh5x8MekVh8SyYjgumuIQT10VSWfmUZFbvIhPEX/agXFRyBEwWUSY5Fd9DDWKe/r5IET6aRviCNIwbvDgzeOvbs5xTL2lQXBoRIYk= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 997e0399-5977-4f26-01bc-08d6074d7e21 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Aug 2018 10:04:32.8534 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3826 Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: silence error message on rte_eth_dev_owner_unset X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2018 10:04:34 -0000 Hi Stephen From: Stephen Hemminger > The rte_eth_dev_owner_unset function always generates a log message > because the unset value for owner id is 0. >=20 > Fixes: 5b7ba31148a8 ("ethdev: add port ownership") > Signed-off-by: Stephen Hemminger > --- > lib/librte_ethdev/rte_ethdev.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) >=20 > diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethde= v.c > index 4c320250589a..f09bf8bc8b01 100644 > --- a/lib/librte_ethdev/rte_ethdev.c > +++ b/lib/librte_ethdev/rte_ethdev.c > @@ -393,11 +393,8 @@ static int > rte_eth_is_valid_owner_id(uint64_t owner_id) { > if (owner_id =3D=3D RTE_ETH_DEV_NO_OWNER || > - rte_eth_dev_shared_data->next_owner_id <=3D owner_id) { > - RTE_ETHDEV_LOG(ERR, "Invalid owner_id=3D%016"PRIx64"\n", > - owner_id); > + rte_eth_dev_shared_data->next_owner_id <=3D owner_id) > return 0; > - } > return 1; > } When you remove the log from this function you remove the error log also fr= om rte_eth_dev_owner_delete, so please add the missing error print there too. >=20 > @@ -444,8 +441,12 @@ _rte_eth_dev_owner_set(const uint16_t port_id, > const uint64_t old_owner_id, > } >=20 > if (!rte_eth_is_valid_owner_id(new_owner->id) && > - !rte_eth_is_valid_owner_id(old_owner_id)) > + !rte_eth_is_valid_owner_id(old_owner_id)) { > + RTE_ETHDEV_LOG(ERR, > + "Invalid owner old_id=3D%016"PRIx64" > new_id=3D%016"PRIx64"\n", > + old_owner_id, new_owner->id); > return -EINVAL; > + } >=20 > port_owner =3D &rte_eth_devices[port_id].data->owner; > if (port_owner->id !=3D old_owner_id) { > -- > 2.18.0