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 19C2BA00C4; Mon, 30 May 2022 14:02:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CA67540694; Mon, 30 May 2022 14:02:22 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 8BFD2400D6 for ; Mon, 30 May 2022 14:02:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653912140; x=1685448140; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version:content-transfer-encoding; bh=oNaJpjuaHJj4UJaU/1AvmURXadRZCKYnxSkMzB0Rqgo=; b=h9C/3P4uLoRHnPSPMpMlm+7W49XLn9YDO6hT/skpNoC1vdeTCvOnfzLt 7BoA/1pqRNV5u1kfAHRcxZZHUz7PCdAyFVAIsTyD03EhfXCO4um1RKIQI Cr3oqMpChfop1G2R80SbUXa1Em1/8RTj5FA/7NPIHWA/uzRmds7YNU55b GEyuyOyCcQskjXHx9vuN/qqsJp/ZVq6AvRHtrq/aGAHAulMTfVo5cGmrB SMdlvSAtl2AKAm9JfrttGWSqEIJFXyMHNTvQG9/VspAAvGOUnAOdllBJv NaYyh8HvnONf4zxMLHjkTinN3Gy1zEUbGgzWFpT4zP0TjhDTzwIe5ZHJQ g==; X-IronPort-AV: E=McAfee;i="6400,9594,10362"; a="300332541" X-IronPort-AV: E=Sophos;i="5.91,262,1647327600"; d="scan'208";a="300332541" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2022 05:02:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,262,1647327600"; d="scan'208";a="644600438" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga004.fm.intel.com with ESMTP; 30 May 2022 05:02:19 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 30 May 2022 05:02:18 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 30 May 2022 05:02:18 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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.2308.27 via Frontend Transport; Mon, 30 May 2022 05:02:18 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.175) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 30 May 2022 05:02:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iwN+dTkwx4/kR8Xy2cujVFRl3O36oJ3N/YVqvJXysEtUHDhb9RJ5xPOQ60fLFUe5A8fwy8+4LZWqrVjGg/XLM571K2QZbSBXYKU9KWsh3DB6x+f6H8GZVaC98OTRRoPZUNmxoycDwJPsDTmwZLgpAO5O0b4qCoftsc1D1B4AgtrLY2uwauEK4PzlsiQ5lThoSKCw3d327xBwUnRnBQLJJUrPsBw0hH7z6x9accJVDzajZ6rDv71WbIwPJX06Hoa/GD4sDcJ/AXBwR3v7XN3mBhtKVE/K7jVoHnGZdmhIoBMZ+hQu67qOtHcY3JujXOMor7J1+yi7h0w0n+jVd/Zjrg== 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=0CST+6CvD8chFsQVj6tXxr47fCPc7aTt3PMFE/a/cpk=; b=bZG5O+wnA6tkur9DOt4T5PBknrJksQSbMdhbjtJv0x05QMJURfLDS17CG0V2xaALOzkPzLBgrNmzQrAihtVfagT7BJU35U3y3SDyinvrG2vb0G2QKL8oTIQTtyufCOdHxCTOB6tvaXm1Ghi/ZE7MZiWipmzSCMhLkUceDLB2R3suIQBPMBxTwJ+Fqp6qfzywQcrCSLVDcOa37AZwxFllrBaInpleYXlbfzpDQR8lb3qXThQS8aGhqrEinkpfLtmtZrdun/cn1jy5aJ0NrWZB0KUJiwmMVxoOFfiG34zcn3JLE4FFdw6W7sa0tbZzLudmgvnFJOY8OCrcpPZgbh8WBA== 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 Received: from PH0PR11MB5784.namprd11.prod.outlook.com (2603:10b6:510:129::22) by CH0PR11MB5753.namprd11.prod.outlook.com (2603:10b6:610:101::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13; Mon, 30 May 2022 12:02:16 +0000 Received: from PH0PR11MB5784.namprd11.prod.outlook.com ([fe80::2de4:72f5:cf30:ba97]) by PH0PR11MB5784.namprd11.prod.outlook.com ([fe80::2de4:72f5:cf30:ba97%9]) with mapi id 15.20.5273.023; Mon, 30 May 2022 12:02:16 +0000 From: "Danilewicz, MarcinX" To: "Dumitrescu, Cristian" , "dev@dpdk.org" , "Singh, Jasvinder" CC: "Ajmera, Megha" , "Liu, Yu Y" Subject: RE: [PATCH v6] sched: enable traffic class oversubscription conditionally Thread-Topic: [PATCH v6] sched: enable traffic class oversubscription conditionally Thread-Index: AQHYdAGgMporU/PU1ESxr15HtPRuLq03PUIwgAAUKwA= Date: Mon, 30 May 2022 12:02:16 +0000 Message-ID: References: <20220527000900.795357-1-marcinx.danilewicz@intel.com> <20220530084520.827724-1-marcinx.danilewicz@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.500.17 dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 42e7f3ff-a024-4a12-e1a9-08da42343da7 x-ms-traffictypediagnostic: CH0PR11MB5753:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +J35w/6+yp9s3n4JacwY85pwqyt/ZH67NA2LinTWdt4ZRuzCpWpY9VXfopcXIbtdNumd9YKvfsNUK+T99sp8vad9v21hnqSI5qNtGgGEEbTEybHq6+8Y49j/u3V5ffYWa/bdSh//9olnr5BnGC9aSuSnVStbmerwL5nYuxdRGPxqeF+yPf/ClU9zA4r+vEZ5bbg2XKGLzOwzKyeMgIxoq+AhX77iOsooIWx91FVXfDn7Pmj7puezWDl6G2tFXiNxEdT5kkxVN41Rjfez48sUrVyUim6SDqh2HO+x0BYjmRpGlsGU6StiDMoKDDiMF0106qyOi4CI5M5hlD+TC5TZW6VSVpxUxDETDkN8j19XzqJrv8oBe9aNHyzQWiWBfZ46oeaMiPf8EoTIJ5OKaelGx7EC0Dz8fpd5HgcfGkGyhYJyzVrM3f2alSI3+FAoLdEs0+7UxZbgtng15j5GXF78hczSW/pBBUFGaUf1rA4KqvLsjdydbT7dO3H645rhwgnCOlUt0B53HYcCyYWQ/P3TItLcmrFWKxBCZz+f23xZdMEVKFSiyVNG+5lGM9wySZgM5ejdOrTPMDHdfv5VlFTfhmmV0fTwsPidiIW93zQztq43LLkopWIMoPppoeUiDkEvljPZw3CIrkN6hpqx9XAFn/KAt5S/A/kfMtvBr5zdvISkOBMR63GLGrKZ8d3C/ywYpDIp8UnYh8wcYyA5fwZD5w== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5784.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(38070700005)(86362001)(316002)(186003)(2906002)(9686003)(33656002)(110136005)(107886003)(122000001)(55016003)(54906003)(6636002)(508600001)(8676002)(66446008)(6506007)(7696005)(5660300002)(82960400001)(83380400001)(64756008)(4744005)(66946007)(4326008)(8936002)(76116006)(71200400001)(66476007)(38100700002)(66556008)(52536014); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 2 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?U4vWiPD1re6BlDenFo+pGMTN9QfLWbM0NnWQ8BF9g/u5JEouDv1/YUSvmLbI?= =?us-ascii?Q?XN2INviJI/by43EoAf71/gF9KvkzPk6vMyvPcP3Rw4tRlilqpenMkFyrPX2n?= =?us-ascii?Q?BnPaIjZSRFbqBvIiN2WuKpuI+vMzQn0pXZ0/QEoYvTlNRpGEULAU2yZdN6Bg?= =?us-ascii?Q?QFeNOulN8L1uAnmJUVpudKqa/NiqgX63TdbdPZqWrPdJJ0FnljBHK69pHgnW?= =?us-ascii?Q?eW0wPwDGk+OJ1BW2BAJnSHdt0uwHrjqfUF5P/5hXqffTo0/t0urx+AuJr5LR?= =?us-ascii?Q?w8GH8MLzSIGBct4DLb5xNolOLjDbN2+I002oA5E920tyH35wI5x/GbCWu8nx?= =?us-ascii?Q?pOdVbaUKsu4VL2Ck45Kkdi7Vm6vVrBapgxaj/BwsA7plgDK8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MItqwUZPs/17nAKIzzgZyNlJEKmBdPgY61P3uW4flh6NJk6?= =?us-ascii?Q?jAblpJ9ZLpTV7XUlS4xqCsm+rI+mHI+vggqjrH+nn4+7cyWqh0H0apbnoE5e?= =?us-ascii?Q?Pj719LK/JUeZy8brDNqmmpC9BvVTefc/+Ub6cO3A1N5WTiDcy88ZITQU7iCj?= =?us-ascii?Q?LE0u9PxQAfdnfrPcR89kiJpLWCq8yVqQMI+AQi1cI2scTVZPT0fU+jjDjNOL?= =?us-ascii?Q?w2uHoUubGDrqBLrZASyjMTM97BjDycgcd8/q96TLsT2gpOwAOXItB84RtrbJ?= =?us-ascii?Q?kfYeLhM5lcAtBGkVj5aKDZX6dgB6/02r6u7vuc2VlHyPKc7Jew0BacZvYQJG?= =?us-ascii?Q?K/Tk1xbWhX8eo751uPtreuF0qlb8OPz6KFSGvHRvRBkMH2wkV683B0Yj/Y12?= =?us-ascii?Q?JBrV4YR+F9qNTjVKe+s5TAIhB95Du6UaUg7zlDF9kgQc0pc2dsqg2mmFlA/i?= =?us-ascii?Q?x13XbtBUofKApBy2cOHgiY220Im9POZDG/4DWTAEZXe9S3qrF4cMUcTjTVl5?= x-ms-exchange-antispam-messagedata-1: dtOagOVfivcESN5y/k1s+m5AXjtDqHQciHM= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5784.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 42e7f3ff-a024-4a12-e1a9-08da42343da7 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 May 2022 12:02:16.6335 (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: RQdJ+QzArP8fGjQILhKbB0r8VlvHP6Ln2Yk2s7uPDKEbDPYWd3NjLtiaKIfVFxXGAwa158ON7Tex8SVLJWc7BIS680FuqsPacNhg7X/POvg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR11MB5753 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable 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 Hi Cristian, > = > Using a switch statement for a binary condition instead of if-else does n= ot > make sense to me. I know you mention you saw better performance with the > switch, but I am pretty sure it is not the switch providing the performan= ce > increase. You are using if-else for testing the new subport->tc_ov_enabled > throughout the code (an example is just below in your patch), so I suggest > you do the same here: > = > if (subport->tc_ov_enabled) { > if (!grinder_credits_check_with_tc_ov(port, subport, pos)) > return 0; > } else { > if (!grinder_credits_check(port, subport, pos)) > return 0; > = I've changed this snip to what you requested, but I've spent some time on t= his comparing, if, unlike, switch and switch-case was the fastest. We can f= ocus on that later on.. because there is clear difference. Regards, /Marcin -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the s= ole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact = the sender and delete all copies.