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 303DFA0509; Tue, 5 Apr 2022 23:14:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C315240F35; Tue, 5 Apr 2022 23:14:20 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 85A8F40DF6 for ; Tue, 5 Apr 2022 23:14:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649193259; x=1680729259; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=FWDzQoZBWkF9P5DdUq4z//XEDyn2IdMQQ13xhMwdfNs=; b=fXi0RvjDSzkJpktm65d4eZEk2nDfAgy9NtTDPLMOyClShIurpQf/i0tn VpG2V+++zbXmothxRVV8zdOnrWdViZ2ygHacNBQCe1gr7r0KXJXp3R6b8 uGmDtlWxFIIWJ4zk44WJ5bb/T+4s9iWCbK5YEqdxQ5WW/nje6yuR5wk40 /m495//zEs6WXlqDo9CNi/WqP8ydYKxw8gvr/Pef0zLTiRn4/WXztkjwh VRQaue1pNPqyxESRwG91yVSgErZqJ1wBCTg7EQlFQTd31goXUa9vWBxdK nSEnt+scKG2T5Tc6sMhGgaO/U3iIxYix60BFsFV6IQW9PEjYXJX34U04q Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10308"; a="260561996" X-IronPort-AV: E=Sophos;i="5.90,238,1643702400"; d="scan'208";a="260561996" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2022 14:14:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,238,1643702400"; d="scan'208";a="570096245" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga008.jf.intel.com with ESMTP; 05 Apr 2022 14:14:18 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 5 Apr 2022 14:14:17 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 5 Apr 2022 14:14:17 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Tue, 5 Apr 2022 14:14:17 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.170) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Tue, 5 Apr 2022 14:14:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c1bvS29gcHwyenxS8lwaTKCniTBM+WRi/u9bpiKcLHvtNONmii8hU9uEQTTbb3BmA8O36LGICtQ5wAoglrBTkQVqlhj3f2vA6H8XTsd/srxNwmf3A4tZ5ent2C3gV851SqlrKVOpmHUcPNu5c2sLRWz6CmeMiZroeW0mCInQVTzX6TMibwbLPRN+4cH5QTPumz3vpvgzYX1YxbfDiSs1zpuBPJCuWCoIGCqDWgmppyLYXnFSLs4iGG6W9iRIP4Mum9KCIoXcqerhkRxKjzPx09wXVRYGD0S/n5SCayOCTvHTVmqvjEBVikkNspjcTK3t8xNy7eUFRlkph0bhlSPnFA== 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=Tju2up8Tbtw6KV49Rp8nlC5tJl0CGu3JAybNj7QYzLA=; b=BywkNa029Y4KHnq/jtTmOsyJdaBshZXSacuDpfDO+v8lkvPutmpoJyAuZNpeRit3AeEcvOySs20DQtfHx02SiXD7YQScvBUEV7YkKFm0SrwuTmONWMfCWDOeT6/HBwPA+n+XyuPFByQ0A//gUcS2ojg33WMlKC72qUvLR+npJvYM41dI9d3u5lsMZUiAZoq744aDUNHTem4GBW4gK8IsvNmmVOQyR/ptPBzW1SdsJncsEO8n8qxVT3ncv13fKJKb1n1sD5vaIUw2qwo/r2axvbcGNgit0BJJzbT8jWXK9TFFJu4f9siNyC4WUCaRu1dnsUD84NPeWhjZA9nqjnWAdw== 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 DM8PR11MB5670.namprd11.prod.outlook.com (2603:10b6:8:37::12) by BY5PR11MB4292.namprd11.prod.outlook.com (2603:10b6:a03:1cb::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.31; Tue, 5 Apr 2022 21:14:15 +0000 Received: from DM8PR11MB5670.namprd11.prod.outlook.com ([fe80::69dc:2fe0:11fb:f157]) by DM8PR11MB5670.namprd11.prod.outlook.com ([fe80::69dc:2fe0:11fb:f157%4]) with mapi id 15.20.5123.031; Tue, 5 Apr 2022 21:14:15 +0000 From: "Dumitrescu, Cristian" To: "Dumitrescu, Cristian" , "skori@marvell.com" , Thomas Monjalon , "Yigit, Ferruh" , "Andrew Rybchenko" , Ray Kinsella CC: "dev@dpdk.org" , Jerin Jacob Subject: RE: [PATCH v3 1/1] ethdev: mtr: support input color selection Thread-Topic: [PATCH v3 1/1] ethdev: mtr: support input color selection Thread-Index: AQHYLUqRS4Gue5XPLEydpbjLv3rNVayqvwWQgDdKTQA= Date: Tue, 5 Apr 2022 21:14:15 +0000 Message-ID: References: <20220214120246.4181470-1-jerinj@marvell.com> <20220301085824.1041009-1-skori@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.401.20 dlp-reaction: no-action 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: 730729a5-760b-4e4b-9e7d-08da17493d39 x-ms-traffictypediagnostic: BY5PR11MB4292: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: qXopxVfhizkv2N702ywZNNDxzViZXHH+Ujj26SdsyPtsormNL4RQA/D6HPSu/a1DzB29hn+XX2hm2c9gBJQ6P3Uu5tFnLpRpIPmoZw0NMZmoBkLIaQ/21JnTwj8xEgih4M7HHFf/GEKQ+Y3unNxLTA5es+SBdmlioXH2e+UOFZTAF6ZI7dzkhOgWflLctiP5P8jF9JIhD2ohbmUJOCiuOy2XZHZvAqBKA4fD7M68qmZYvf7tXbmF4Zitmxex3epsbcFlIgnhta/nqVEaINSg8S1GucDiswFRSzUE7K8aeTGFeHO0dvjL6BaLK+vLK4uhfqLmpf2uMo6LjYRtNNCiJJLMuJFCQPHziOn8XF5sdvFcFX1uP8kew6Ldbr3FI/UdE1Q83OTFbFw6s8g71JKAzUSynS0owQZfHvPNLyXgNVMBwSE6ozwkFYojop+q9I98zJWcT01vt4uBEsXdC7H8loH3eXpyuQW6DQ2S9RyD+9O2p3Sorsv1h19vhLtENRZr2vGxLq7yBnEGvQUyc4r5Td0C4bIzCiTnFuaW7bdQ04ZxEcdDtJ9OupxCngumDQ6REEFcd4pK7sfGs0oLEzrgDmAvwM5VfKIXFOxTrOGM0F9TZXRq3og/QAZbVm3+m1Z/iYxsCBu2S+8+TOoXpO2Eug3SSfQ7j9Mm8DIWjeiJl9iisSxtrjOlXiv6MggqWeTeYke3Ed8I6J8E2rY2qp1yOA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR11MB5670.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(53546011)(2906002)(7696005)(38070700005)(86362001)(6506007)(71200400001)(508600001)(9686003)(66946007)(33656002)(66556008)(122000001)(66476007)(4326008)(76116006)(38100700002)(54906003)(66446008)(64756008)(316002)(8676002)(110136005)(26005)(83380400001)(52536014)(82960400001)(186003)(55016003)(8936002)(5660300002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?mWq5/ld08UN1QYGO8Azaa4LF8BOowVr0lQEKNmAQ4o0CLHB3jzvcuosGWHyQ?= =?us-ascii?Q?WpE6MjtV3LE4QxF9b5sxeXt7VrxYru2deWqWoC7hdIhzg0KI8cFyHfOfXFH8?= =?us-ascii?Q?D6MXsRAnHOMnC2VodmQYTCM1APmlgWnRZmQE7KV5UwwwEjepo0+Uq077502y?= =?us-ascii?Q?zFHU965slD16DpVFVLqE5PAVnccqvz+QT7mdXahyWZ6ZE3fu87fupdr2E9iv?= =?us-ascii?Q?ugeemvEjJWIazYvwiMi0UOjPjcvTKAA7+K7VVxKhga3lwPXITX1cUAszNP0Y?= =?us-ascii?Q?Kbj1KNuRBhLJUW9QlmiE+J7dNkiHd1qgCfnk9/L6CeS5/MZDQkANK1eZOG3f?= =?us-ascii?Q?S1849WWBSI1siI12E45KiByI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ii?Q?030OeTyb4kLBi1WFhNR7VrgoBrSOgQEjZmkMuhFj2oq7paJ/c1G9icX+4MLL?= =?us-ascii?Q?Tot8KaYsXIvTS0KPHV0KJZO0dbc9jj3TFSWYjbCyMgw7nUIx5Oen6FFDq4xw?= =?us-ascii?Q?94E6e29HAtmfLCHxTjBKmqBfmS5H+jNMmt4rKRzN+1L1R+oG/A0N6ThNz64G?= =?us-ascii?Q?VixZwSuB/9O3OZJ0uIEg7PD4690Gxc61gL5XXf0vyI1looGdrJYYDyb0fXV5?= =?us-ascii?Q?WqQWRG5VyJDgTk2VD2/HVrWGDb7iTO0m1t37IoBu+FEdKOpxB48QKn0vyg6i?= =?us-ascii?Q?Y8IV7M6YtuDxZGdisQSBKDs/VMYR2c/osGn99cQ0MrovkkyLEMF4eKtkqyjN?= =?us-ascii?Q?mdFwLiKQkKASdFn01hQJvFFwj42apnHkEoTNzw48KI7bYwj23R3VRaj8u9zN?= =?us-ascii?Q?1O5LXd6IzOGyTcJFwHZhf3j6smhESrOq2iWiwJU84ROnLqVuwX4H4gli1Gx4?= =?us-ascii?Q?OFYDzq1+3YG4HL3ai8VGDpjmkpInZn0=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: DM8PR11MB5670.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 730729a5-760b-4e4b-9e7d-08da17493d39 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Apr 2022 21:14:15.2334 (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: KiB7Rwd9sZJKtnJA6cVmdAmHz+07X7Ij1CEYjsYLI3Tpuj3pnBkgzRyCyBNXf9uMFWeUHgHwg+oOjFadt6wvrnYtTgoNAerSzGgvYm0yNQ4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4292 X-OriginatorOrg: intel.com 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 Jerin and folks, any update on this one? Thanks, Cristian > -----Original Message----- > From: Dumitrescu, Cristian > Sent: Tuesday, March 1, 2022 5:48 PM > To: skori@marvell.com; Thomas Monjalon ; Yigit, > Ferruh ; Andrew Rybchenko > ; Ray Kinsella > Cc: dev@dpdk.org; Jerin Jacob > Subject: RE: [PATCH v3 1/1] ethdev: mtr: support input color selection >=20 > HI Jerin, >=20 > Thanks for your patch! I think we are making great progress, here are a f= ew > more comments: >=20 > >=20 > > +/** > > + * Input color method > > + */ > > +enum rte_mtr_input_color_method { >=20 > We should clean up the names of these methods a bit: we should not mix > header names (VLAN, IP) with header field names (DSCP, PCP), in the sense > that to me METHOD_VLAN_DSCP should be replaced with either: > * METHOD_OUTER_VLAN_IP :shorter name, as only the headers are > mentioned (my preference, but I am OK with both) > * METHOD_OUTER_VLAN_PCP_IP_DSCP: longer name, as both the headers > and the header fields are mentioned >=20 > Please put a blank line in between these methods to better readability. >=20 > I see some issues in the list of methods below, I am trying to do my best= to > catch them all: >=20 > > + /** > > + * The input color is always green. > > + * The default_input_color is ignored for this method. > > + * @see struct rte_mtr_params::default_input_color > > + */ > > + RTE_MTR_INPUT_COLOR_METHOD_COLOR_BLIND =3D RTE_BIT64(0), >=20 > OK. >=20 > > + /** > > + * If the input packet has at least one VLAN label, its input color i= s > > + * detected by the outermost VLAN DEI(1bit), PCP(3 bits) > > + * indexing into the struct rte_mtr_params::vlan_table. > > + * Otherwise, the default_input_color is applied. > > + * @see struct rte_mtr_params::default_input_color > > + * @see struct rte_mtr_params::vlan_table > > + */ > > + RTE_MTR_INPUT_COLOR_METHOD_VLAN =3D RTE_BIT64(1), >=20 > OK. > Does your HW use PCP+DEI , or just PCP? >=20 > > + /** > > + * If the input packet is IPv4 or IPv6, its input color is detected b= y > > + * the outermost DSCP field indexing into the > > + * struct rte_mtr_params::dscp_table. > > + * Otherwise, the default_input_color is applied. > > + * @see struct rte_mtr_params::default_input_color > > + * @see struct rte_mtr_params::dscp_table > > + */ > > + RTE_MTR_INPUT_COLOR_METHOD_DSCP =3D RTE_BIT64(2), >=20 > OK. > Please change name to METHOD_IP. > Description: Change the "outermost DSCP" to "the DSCP field of the outerm= ost > IP header". > I would move this up on the second position (to follow immediately after = the > color blind method). >=20 > > + /** > > + * If the input packet has at least one VLAN label, its input color i= s > > + * detected by the outermost VLAN DEI(1bit), PCP(3 bits) > > + * indexing into the struct rte_mtr_params::vlan_table. > > + * If the input packet is IPv4 or IPv6, its input color is detected b= y > > + * the outermost DSCP field indexing into the > > + * struct rte_mtr_params::dscp_table. > > + * Otherwise, the default_input_color is applied. > > + * @see struct rte_mtr_params::default_input_color > > + * @see struct rte_mtr_params::vlan_table > > + * @see struct rte_mtr_params::dscp_table > > + */ > > + RTE_MTR_INPUT_COLOR_METHOD_VLAN_DSCP =3D RTE_BIT64(3), >=20 > OK. > Please change name to METHOD_VLAN_IP. > This should follow immediately after the METHOD_VLAN. > Description: please use "Otherwise" before "if the input packet is IP"; p= lease > replace "outermost DSCP" as above. > Is your HW using DEI + PCP or just PCP? >=20 > > + /** > > + * If the input packet has at least one VLAN label, its input color i= s > > + * detected by the innermost VLAN DEI(1bit), PCP(3 bits) > > + * indexing into the struct rte_mtr_params::vlan_table. > > + * Otherwise, the default_input_color is applied. > > + * @see struct rte_mtr_params::default_input_color > > + * @see struct rte_mtr_params::vlan_table > > + */ > > + RTE_MTR_INPUT_COLOR_METHOD_INNER_VLAN =3D RTE_BIT64(4), >=20 > OK. > Is your HW using DEI + PCP or just PCP? >=20 > > + /** > > + * If the input packet is IPv4 or IPv6, its input color is detected b= y > > + * the innermost DSCP field indexing into the > > + * struct rte_mtr_params::dscp_table. > > + * Otherwise, the default_input_color is applied. > > + * @see struct rte_mtr_params::default_input_color > > + * @see struct rte_mtr_params::dscp_table > > + */ > > + RTE_MTR_INPUT_COLOR_METHOD_INNER_DSCP =3D RTE_BIT64(5), >=20 > This is very confusing to me, I don't get what this one is about: The "in= ner" word > in the name suggests that inner VLAN is attempted first, then IP DSCP (if= no > VLAN is present), but the description only talks about IP. >=20 > > + /** > > + * If the input packet has at least one VLAN label, its input color i= s > > + * detected by the innermost VLAN DEI(1bit), PCP(3 bits) > > + * indexing into the struct rte_mtr_params::vlan_table. > > + * If the input packet is IPv4 or IPv6, its input color is detected b= y > > + * the innermost DSCP field indexing into the > > + * struct rte_mtr_params::dscp_table. > > + * Otherwise, the default_input_color is applied. > > + * @see struct rte_mtr_params::default_input_color > > + * @see struct rte_mtr_params::vlan_table > > + * @see struct rte_mtr_params::dscp_table > > + */ > > + RTE_MTR_INPUT_COLOR_METHOD_INNER_VLAN_DSCP =3D > > RTE_BIT64(6), >=20 > OK. > Description fixes: Use "otherwise" before "if IP"; replace innermost DSCP= with > "DSCP field of the outermost IP header". >=20 > >=20 > Regards, > Cristian