From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0040.outbound.protection.outlook.com [104.47.33.40]) by dpdk.org (Postfix) with ESMTP id A0FECFE5 for ; Wed, 6 Sep 2017 11:15:25 +0200 (CEST) Received: from BN6PR03CA0084.namprd03.prod.outlook.com (10.164.122.150) by CO2PR03MB2262.namprd03.prod.outlook.com (10.166.92.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Wed, 6 Sep 2017 09:15:23 +0000 Received: from BN1AFFO11FD037.protection.gbl (2a01:111:f400:7c10::159) by BN6PR03CA0084.outlook.office365.com (2603:10b6:405:6f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10 via Frontend Transport; Wed, 6 Sep 2017 09:15:22 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD037.mail.protection.outlook.com (10.58.52.241) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1385.11 via Frontend Transport; Wed, 6 Sep 2017 09:15:22 +0000 Received: from [10.232.133.65] (B10814-12.ap.freescale.net [10.232.133.65]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v869FIN9001259; Wed, 6 Sep 2017 02:15:19 -0700 To: "Dumitrescu, Cristian" , "dev@dpdk.org" References: <1496162653-137817-3-git-send-email-cristian.dumitrescu@intel.com> <1503705973-80742-1-git-send-email-cristian.dumitrescu@intel.com> <1503705973-80742-3-git-send-email-cristian.dumitrescu@intel.com> <3EB4FA525960D640B5BDFFD6A3D891267BAB2088@IRSMSX108.ger.corp.intel.com> CC: "thomas@monjalon.net" , "adrien.mazarguil@6wind.com" , "jerin.jacob@caviumnetworks.com" From: Hemant Agrawal Message-ID: <5610d7e1-701b-71ea-42fc-4ac427b87eb6@nxp.com> Date: Wed, 6 Sep 2017 14:45:18 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891267BAB2088@IRSMSX108.ger.corp.intel.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131491629223701227; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39860400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(3190300001)(189002)(377454003)(24454002)(199003)(5660300001)(65826007)(8936002)(2950100002)(83506001)(106466001)(8676002)(81166006)(81156014)(93886005)(626005)(50466002)(97736004)(305945005)(2906002)(4326008)(229853002)(36756003)(64126003)(104016004)(85426001)(77096006)(6246003)(68736007)(498600001)(54356999)(31696002)(76176999)(189998001)(86362001)(50986999)(230700001)(23746002)(54906002)(53936002)(105606002)(4001350100001)(33646002)(47776003)(2501003)(53546010)(356003)(65956001)(31686004)(65806001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2262; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD037; 1:ENsPp3E04bOT633NtFTlzES9azQzgRd+bjV8Wg1SPIjK2D9QAtAMwgiC6O0YBIx7gErkp4L2EdXXCVgqthzbU0u5i42Hf9Xwde0JJvQ8aQZdBKNgsuNQiuSDHMTt7nHe X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d7ad8093-d5b5-48b3-898a-08d4f507cd45 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CO2PR03MB2262; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2262; 3:Vo8OV5Abj9BXN5br4eFIXjM940x7/NbynKld3xZGRr/rUoGanbB4Cj5kD3XHG36DaHkUCgbCN+gx+D0NytEPIdlEBE2fJTnPvTJYDR/1n/FVsnxl4xPVleYQuR8YgGJtEqyY0AmKOfSpFUcKbaHTCXBHcFAiDw3GdEONf/jhJnWL6olx53hEp88bFcRInWonxHpFb8Q+xKh7i4LoigI+hJwo8GFG+3jDgHZ0QM4Olju7ro0zEu8buWGtPyakxqaMhXy1ofxUbYkdK0UAtFWmzRTDd4rmdI6isqLJXdyxuq2DuDb0fO/KWKhtRINBFT/HB78D3oARrHue13cBE6YuZm+dsGbTrXFqssE0JBiK8io=; 25:RJK6U6+j4p5i4MHrycAfpc/MYr9r9Hw/rK0MerjDcFV4qnJjzyMiASrHJWObIwXKbrLY61KBESBspt65jHPvoPQORa6Hg/aQSblComQc0QbM66reEOxkuEE/N2Ku4lfeY04KpUeImr30oLAQQPPduKRrXbG1DEym1a551FA1fz9Q3xjZrh+uVgeqk59rPoKyhoK+zosCkKjlrG2604havVEj8NBYibsG4NUW7aA7IXCbO25xgYoOL60YVngZPZMhSQmvE9lFzJt5WucxAkh8q9doDrEtCLAtKGg2thdQz8fyiVn+FHRSnesYS2wsdlo7CkqliKk7QxJXqXodRoIGjA== X-MS-TrafficTypeDiagnostic: CO2PR03MB2262: X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2262; 31:E5kr1JrHSgfbzV6sOby95Urc4FXxfm8DmWkWVyQYd8Un6hYPFpoeCLIRVdQidvtd5MwiQeDMrrpCSszTNsIQfMFFUWxtWb2QenpDMxCcMo+RD1ru8BIb0auydfVDuGOX5a2VKjD9QBnNPiX7jHt0cmBzOrrnwxKHYSb3xlr+Aq4gYfxdkV1qy7dfylj6DAFcsiiLysIjT+Mwh1G5g3uQHyS1Xyk9o5DZmB5LUD1dm0k=; 4:1+xbVaLjAUAQN09wpk7vME5rQpbcyRn03EKcWEf7deieuoSD7lb1LzHG0qr90rupVeL1/Pbkv28P65NnzJbrA4BDpcm57RLXe+G+Q1NzJbxkzZoAYN6L7DaXWWjDVfR3lA251GE9dBcgYugRjvRfgaqRIBJ+E+u2aYkWIQJCoNQojChoLjEyTxxXjGCJ2bvKBGR3fU9jR6HkpXED7zkJqWjVAeRBMCZvcZtrqj0ScntuANGtuUkY9Iqa+4v6AS+czlRkT1Ci8dEw+OWcwqD++jvb4F86vmIyJgBa+fP42Z8= X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(6055026)(6096035)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123559100)(20161123561025)(20161123565025)(20161123563025)(20161123556025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO2PR03MB2262; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO2PR03MB2262; X-Forefront-PRVS: 0422860ED4 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; CO2PR03MB2262; 23:OMJBtGM7YlpEf9hQfyN0FUDNLdMjzAOiVhWxH?= =?Windows-1252?Q?njh8DD5LflAtK2VxWR/N0Forcm6ntgdkDhU49hQDoYVHYbe1LpaZ5T7L?= =?Windows-1252?Q?HJUD+dEPvfn8ZxYypES1jJrl1q7s4wZxkwRYjISRaiXCc6iYoXNhu4Bk?= =?Windows-1252?Q?da6lj3SjE/yAz56CjFkyr6qatIGMLc41DWAIkwZI2OizaPpW92Vre5sx?= =?Windows-1252?Q?5EpHTKdmkzjA5AAUCzAHKi3ywPO0veN+HhkYZUFkq4KEqamaW/UbamPS?= =?Windows-1252?Q?fOiac252YLJa1RCi9+p6ZfvBMGEIvUoMpCA9v2Cb1aORuLu9x4oCv2Sg?= =?Windows-1252?Q?T1YX8P53YIwSGwJH+EwwLfYYq1kUk1Sr8369BDjCE9GrX2Ifb0TCIqx6?= =?Windows-1252?Q?e4pkgCq6GYzQIH5V4+cdXaBG0wkytmtTCtzdf9U8b1SHc8aggG0hPF71?= =?Windows-1252?Q?xGgrCRdWORVpRTiShMqhgNnW5uKI7CaQsLEclX0RbUsVkN5r6hxpO4IZ?= =?Windows-1252?Q?ton48Kh5+utwr2rB+NbHe0fCTX95DfqBF+9VXFIUwtfRPPlMZ0FpL0tp?= =?Windows-1252?Q?o+okTAPECET8hom4WyaeOP/yxX6GS8J3AI7SAv69xR3Md4CUcfLTSGZK?= =?Windows-1252?Q?pDbqP6x8QIYsF/LSb2S6mv7YM24Dq/9+8+0BrjjRwYCx7/88JyCilDxj?= =?Windows-1252?Q?sVDFDJn7OfHluL5tGmb4drL8U51nxi8yCfBwRnau4fv91Qx4AiS7uHzO?= =?Windows-1252?Q?AXaj1K4Ur4N/0R3x/Dmq5oBh6SaPlVzEtPIye2UqRHkOov13YRvl38GW?= =?Windows-1252?Q?fHv4UG66rdmidGilE5WbK6juevVWmo9InSWDEYt22gwDPR6isg8aOJNY?= =?Windows-1252?Q?SPCvR9s+liW2zjJuZwMBGf/Vs92hjH4vhN71rHRStsZq+6PZn20dW7xU?= =?Windows-1252?Q?15J9u1QsP4u0uK09JaP9ZEEuOSwGjQQKzkAbKcujhbK2ys9zY9dLsusA?= =?Windows-1252?Q?hOpZhJCDofRMLMgAgPIaJrMPFCkGmsj6grXJ74vxMM3+NYmrFB97bJvQ?= =?Windows-1252?Q?USkoL7h8EwU0gU3b7DBvzIRCXxzfYttqEZEQGA0W6WFrG9P+EWqWo6IV?= =?Windows-1252?Q?8tnZAJsATva2CUJLYnycnx+wuJIco/J8Rd96lx5gE+QTw2OyL7z0FS6O?= =?Windows-1252?Q?NPIY7CkIr7j91n3PcQOtbC1X8JlsExMeJHs3vh+LFSOvvbTB+X7QHpip?= =?Windows-1252?Q?/bnFy3uhu2XUG8SAz9yeYL2yGv7MHgENHG5sdEVtYBPfXChNuh/U5px3?= =?Windows-1252?Q?TfV0oSpvCngE1VQtusic0GPrJxj/DkR23KPVz1CnpUz0zTLEv5AXHBYu?= =?Windows-1252?Q?K716PT12CC3lRtN1TJLV2upLw7NJy+4mME66JU3PNzGFnVetNSOze1uR?= =?Windows-1252?Q?+/kBOf8rSJqMJ1vgcu6Yp5hHHitPTJ0P82J1g/lCDVkflk5dzcePAgW5?= =?Windows-1252?Q?OykWKY=3D?= X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2262; 6:uWzuzX2uicK7mQDPc3em6DSPfD4T65HQDPxazSeQxxw9S/nlRKBTlLv1kKrcvXhhs5csOTqtuYnHFj3M2E0SXmYycr3uG7T+vixOFg84tATyScttr0X2tqKUwTDQ1rN4wYJ8jSuUBBiow5E2aT60oWA0DrZkvWjjuopm+ZPCF7LXujrvvjmeNZtD6EY8nZVXUuDek3HwPBW9WucUr9SS+WF0wqrcHgju50A8q62DaIHYQUQrmWo5/NMRx7PThfQ1ywhsYgshXu0ghBU9BxDB01swwJqmDHOnxZgpqilf4ywcjaWZ4R7kFA8w0LP3H4Hg6jDLc6iK6PZGIAo/e9QuZA==; 5:7+fxbsiKQ6mACCtagESAXBTMMthHh+vVpWk5o97UCl0PaLOCYVefv/5ssEO9ANvH8H2mpy7pyvYPaneb+HIYjrbktnb1cWzYpM/8unrbnfNf6nBaIaymjFKf744RPmGbF6uEzIOC8l9lI5MIuZNt6g==; 24:XnQnZMmuWvp82jqKuwG4fJy1fDUKHDXPRSKwpb6EAkXiPAwEzR6dPQSfhYK7u381qRAphel8OpbpHpaNxunEmPL5qOKtsx/O6U3FAd9f8VA=; 7:0Y4CtbMT0E9v63UwsZ3PomZjb7kbny/KUhxhFz/ajwTYPJw3Rj/OYF5tZx+rrKn+cBvtU2h/ed2Mfcrntdn5o/eLgprcmw+cjHsJSll4e0xCew8VYD54ZJB1PRwYj79U+nS0JOi2NXTVLE7wrJuib+bkogLKga9ZctAtXiZ0x6OdVgY150saWfCoLVYwra9TUKG+t3sI/roHirSkzdj11DsLwKRzLx7VFGKxi37vUOk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2017 09:15:22.1517 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR03MB2262 Subject: Re: [dpdk-dev] [PATCH 2/3] ethdev: add new rte_mtr API for traffic metering and policing 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: Wed, 06 Sep 2017 09:15:26 -0000 Hi Cristian, On 9/4/2017 8:02 PM, Dumitrescu, Cristian wrote: > ... > >>> + >>> +/** >>> + * Traffic metering algorithms >>> + */ >>> +enum rte_mtr_algorithm { >>> + /**< Single Rate Three Color Marker (srTCM) - IETF RFC 2697. */ >>> + RTE_MTR_SRTCM_RFC2697 = 0, >>> + >>> + /**< Two Rate Three Color Marker (trTCM) - IETF RFC 2698. */ >>> + RTE_MTR_TRTCM_RFC2698, >> >> will you please also add following here >> 1. RFC-4115-A differentiated service two-rate three-color marker with >> efficient handling of in-profile traffic >> 2. Pass Through Mode- This mode does not implement differentiated >> services. It can be used for some applications to block/pass selected >> flows and set a constant color for these flows. The default (disabled) >> mode is color-aware pass-through with no dropping of packets. >> - In color-aware mode, packet pre-color is copied to the packet color >> - In color-blind mode, the default color is programmable per profile >> - Configurable next module and command per packet color. Each color >> action can be programmed to pass or drop the packet. >> > > Yes, will add both. The trTCM from RFC 4115 was already on my list, adding the pass-through mode makes sense to me as well. > > ... > >>> +/** >>> + * Meter profile delete >>> + * >>> + * Delete an existing meter profile. This operation fails when there is >>> + * currently at least one user (i.e. MTR object) of this profile. >>> + * >> >> Do you want to do this checking at library level or at driver level? >> Same profile can be used by two distinct drivers! >> >> This is applicable for other APIs as well. Your current API >> implementation is mostly pass-through. A stateful will be better. >> > > Yes, the same meter profiles can potentially be shared for a group of ethdev ports, but unfortunately we cannot do this with the current ethdev API, which is per port with no sharing ability between groups of ports. > > Here we are lucky to have just a read-only configuration template that needs to be shared amongst ports, so the quick workaround is to define the same profile for each port at the expense of some (small) work duplication. Hopefully this is OK with you? > Is that mean you will create the meter profile template first and then apply/remove that on a port? how about adding a use-count to the profile? On a different lines, can we do following 1. Metering profile is not applied to a port. Metering object maintain the use-count. 2. metering object is applied to the port, which in turn contains metering profile. Regards, Hemant