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 DC348A0C41; Sun, 24 Oct 2021 13:48:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 683764013F; Sun, 24 Oct 2021 13:48:28 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id CC6D04003C for ; Sun, 24 Oct 2021 13:48:26 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10146"; a="210289500" X-IronPort-AV: E=Sophos;i="5.87,178,1631602800"; d="scan'208";a="210289500" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2021 04:48:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,178,1631602800"; d="scan'208";a="553904943" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga004.fm.intel.com with ESMTP; 24 Oct 2021 04:48:25 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Sun, 24 Oct 2021 04:48:24 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Sun, 24 Oct 2021 04:48:24 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Sun, 24 Oct 2021 04:48:24 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Sun, 24 Oct 2021 04:48:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XrdTb6wrl4R+udx5sZ1yYEzwggzLNe63TInXICbsnJ5tzsnvWmAN5AuLo1G8vBiihMpaHiBB4JSpm4LmgIrEXU907YzubYJHGDbu6FrQ07gI66gLBNaiPU0xARfCMbJjLeYP8xK9aHLjgXkrcpqXdAJjmY4+BA6Gsppl8qxGmHwGTQFbI/LBHM7ZgD6zQ3/2It6sjVOO2fyhd+aGoSNe/AkFA/gs1ZZncX/ZVKz8RX5ZBoWxIzbkxB1TStqEkFGxBKrDAhIRqeqERuooCHFqztBGrE8pfxWjsOvsyhmlp67VseV3uejvHbAQtC5/wyMpd2hQIfYNlovbs0XwCn4IFQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YPyy9IE5jylZVWBP00oing9WszNnNiBM1r6SWiX12Gc=; b=DwIalM4FHVL8H+jPz86P4wmOW9AP3RG6EAxB0lDtYmRQBx/3VKkjd6sDG8YJLz4FhME6cnqzw2Yp7t1+fGu9rD2YSa9Wk/P7MNxn+z4gN2TbwFWfXCpKt5sNQRDRHi4HI5JwBboJDkHhvyLtoPrIQQn3Pj+2zmktzwHgA0e8jblFlLb1+1wZAHrM4d0+pC9IcEKCzyGZEoVn1tfDLqTd9JXPEfa0/5GaMRbqT8XBT9tUx7QlwFKDfq1gioxzRjj+fbckQ9WfB1NFxTHfqRvfvYpLJIrLoFzT/0yj8YKQPrMWs+ZVhd9tOX6Xatbq2zVCCCn716qf6ywAY7fCQMvUMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YPyy9IE5jylZVWBP00oing9WszNnNiBM1r6SWiX12Gc=; b=mZAC8UFxa2xm/8AujD6iStesxC19rJRRrlx6TpBw7EgJPQ4vGRTFNW6dhcjJpCBBKLTVLtZQu5+7LrNZ7GeuLGEqO+9cx2FCbzyCoLNsWF7sxR7UJIBnb3SABjeKo9f8mIRRUvB/lZG2HQcyOwZMxZ5BH9q+uc/P223oj8wFRGw= Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by DM5PR11MB1819.namprd11.prod.outlook.com (2603:10b6:3:10a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.20; Sun, 24 Oct 2021 11:48:23 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::2c0c:5383:f814:3b4e]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::2c0c:5383:f814:3b4e%6]) with mapi id 15.20.4628.020; Sun, 24 Oct 2021 11:48:23 +0000 From: "Ananyev, Konstantin" To: Bing Zhao , NBU-Contact-Thomas Monjalon CC: "Yigit, Ferruh" , "andrew.rybchenko@oktetlabs.ru" , "dev@dpdk.org" Thread-Topic: [PATCH 1/2] ethdev: fix log level of Tx and Rx dummy functions Thread-Index: AQHXx4nV9yD7Ux+55kyOu1uLYtIAKavgQgCAgAA0zbCAABG5AIABf3Vg Date: Sun, 24 Oct 2021 11:48:23 +0000 Message-ID: References: <20211022211407.315068-1-bingz@nvidia.com> <3239661.XpjLsnopmV@thomas> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 55d6203f-b64b-4894-f1c0-08d996e42ed6 x-ms-traffictypediagnostic: DM5PR11MB1819: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iee7vYgET46+8M9NM2/vAuUHy4zIhi6j2/96W7Rg9CTMBnEuVmpfrJaWpx6qYVqVSxcED7Y/2gXgQqgmNI5BW4m1v3FxkTlO1t7Z8DoBlAoRxtl3jf0yM6/2ghR8rco7KonfiHA4P2Cn9BZGgW/s6jwHHYOpg+NaeJ5Uci6M21T76Ws5VNvzvLoiWJlQlpO5Fs8HPgQDg58nVVjLEAtPvq51zHenikDzTvuGlroFNd9lZkaR6Djn8sWzFRQUdAsTRIMUlswO2yuecLVzzUSg7t9tX+3l+YqpQUa6c8HYjWojr6vv7mvDmxeXqoK7Mkphg8isdfw6TEvP7HdCPSn4R7Vfas/ikm8V63CSZGrE2oXp8e0djN4jffel7ymrBCy+Aqw1NZ78+GN5XWsq2bqMNR/UBr+Bx2OEU9VPW/crXyy0HXKG9JavKv4aRD4RLAKieYNIl8PAk0lZjNbtVLvWGO3PfHedenrFVsRa7WUcIflbxAm3HH9A/lWqvgzLLyImN9T5aVi+O/ToRdjRVvEgpPyQ6KDbaQ4JrbjlaXRFpxQc4rAWO6pJiSUWK+kOujEwvnpjdjbHkuoVDUimuvlCCyB2URxZ8zZ5AWlqN5lbHOEtEfUJXJwlYWsjeyvfVvlin+pFi2N/5SJjqWCuYJduYt/fsQiz+ORwEDAh3HjYpZoN0bGjM0+ycssQVKy7uadg3/OQh2ZwOMvHhl53RKIlgg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(5660300002)(52536014)(508600001)(316002)(83380400001)(86362001)(38100700002)(33656002)(122000001)(26005)(38070700005)(8676002)(186003)(2906002)(66556008)(71200400001)(6506007)(9686003)(55016002)(8936002)(4326008)(55236004)(66476007)(66946007)(54906003)(64756008)(76116006)(66446008)(82960400001)(110136005)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?9eL4+AR0lxaMxKbQu4hrHNYGgVr0DxVH+4BM8phBSBgsBPXTVlrg6gjBW+/2?= =?us-ascii?Q?VAJGiTRrm6bc26UwyR0FWiyf07XmeMyttM8EupEpE4sdxOXMsqkCH7D8C0Ho?= =?us-ascii?Q?qaEt41t7pvnjBPgRWs0oFO12Se1qgpVe3U73q+D4Nx/a+JyEedBTB3zFghHO?= =?us-ascii?Q?wWWk/e+jIq9m2J0R6FEpxzKF+4vovD1g87jaTW3U+PGIbyNoe2DRPLz8wOUD?= =?us-ascii?Q?qxmkdozT3Ren8L5tT6QAfk057f3AjdJwW30WnP3MnHat2NNUhHsswNZpy4Ci?= =?us-ascii?Q?ZD4ad/s3Zq9FHKhdO6kCbSsZl6H8Fz6LEBGIAZ2AMeTV9m27cZvlHBF/1qCt?= =?us-ascii?Q?uX6gyKyomre65XO0iry6EyBuBmTbvFAjd28tcLoYr5QwNX9laVXLXsjhjJhX?= =?us-ascii?Q?mvFxgxCMeouCYDcXEEenHqOSF2ICzHI29ohtM+VyrGE2uYOGbb0rxeU5dShz?= =?us-ascii?Q?/dOr0Oob7NqrT23LV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dks?= =?us-ascii?Q?DBRyOOKXrojmk2tidps9xsGJ0SHOSS8HpL/0cMKf8U7vpDpp5VpXc+IGuFTq?= =?us-ascii?Q?M7TF9D2NQIQi+Z7d9DWvy+0tOBOyv/J+rCwq08ob63Lxea8DEbND8y1UjJVT?= =?us-ascii?Q?wuaZPE2L50AvEiGiE8JMwEnrmRKZNqR/dZeqYMGPP0IbDEiTLT+a9M3xFqYg?= =?us-ascii?Q?DyBnaVY8mIqPRkhHJimBHd3KILE9W1cejyAxdJkbTILCe4BiXqqAMA16lsqS?= =?us-ascii?Q?WnmH9rknx/f2BFhwJAXYEnzFsqPhOLCkeOMHltEFe4FObJR3mVS0ZTj5pGoc?= =?us-ascii?Q?eUlJyQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 55d6203f-b64b-4894-f1c0-08d996e42ed6 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Oct 2021 11:48:23.1654 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 5SQs6HDM26HsePStaEmKM44fddNK+EoH/a+U6luDrFQoEIGsfxzT+qSosZsAB4Afji4QHwkchfL5x5lH0BQr2RFULb8dNGv8oBmYljxWI9o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1819 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: fix log level of Tx and Rx dummy functions 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" > > > > When stopping a port, the data path Tx and Rx burst functions > > should > > > > be stopped firstly conventionally. Then the dummy functions are > > used > > > > to replace the callback functions provided by the PMD. > > > > > > > > When the application stops a port without or before stopping the > > > > data path handling. > > > > If the application really does that, then it is a severe bug in the > > application, then needs to be fixed ASAP. >=20 > I agree, this should be some improper / wrong behavior in the application= . >=20 > > > > > The dummy functions may be invoked heavily and a lot > > > > of logs in these dummy functions will result in a flood. > > > > > > Why does it happen? We should not use a stopped port. > > > Is it a problem of core synchronization? > > > > > > > Debug level log should be enough instead of the error level. > > > > > > > > > > Dummy function is supposed to be set only when device is not able to > > do RX/TX properly (not attached, or attached but not configured, or > > attached and configured, but not started). > > Obviously if app calls rx/tx_burst for such port it is a major issue, > > that should be flagged immediately. > > So I believe having ERR level here makes a perfect sense here. >=20 > I do not insist on this. Some notification to the application may be need= ed. While to my understanding, the log flood should be prevented, > or the logs may slow down the application, the IO, and would also have im= pact on other logs and some information may get lost (but that is > the users' decision). > Since the rx/tx burst are usually in the data path and invoked heavily, i= f the log is needed, how about print it only once? WDYT? >=20 Correctly behaving app should never call these stub functions and should ne= ver see these messages. If your app ended up inside this function, then there something really wron= g is going on, that can cause app crash, silent memory corruption, NIC HW hang, or many ot= her nasty things. The aim of this stubs mechanism: 1) minimize (but not completely avoid) risk of such damage to happen in cas= e of programming error within user app. 2) flag to the user that something very wrong is going on within his app. In such situation, possible slowdown of misbehaving program is out of my co= ncern. =20