From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1813EA0577; Tue, 7 Apr 2020 09:30:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A2F672BE2; Tue, 7 Apr 2020 09:30:35 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 00D8A2B86 for ; Tue, 7 Apr 2020 09:30:34 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0377U5JE021270; Tue, 7 Apr 2020 00:30:34 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pfpt0818; bh=vHKomNQaHYjPmXdOgbdq1E43+4nRGf0sWKt9s1Ejpyc=; b=ZqGiLT8nuNbBm0PJJ+5pDAayNSemGmsY70Gexe0RqLjtZh+3anFVAOwt5Iu8CCWTXsre G5Gqj2ImAH2gFn63XkbdYFZ6TNZJIM8JBI2KUEPf/qbtepf6jhTBRYms/ldZ6bWhObiZ oxhaLxaSV2euomYbulZTOsyACp5TOKt6/H1SkVnH0yaVCWePisfUXVPTmQGmuamcVLy5 zs0NDr3Bt1xFw/Hse7MA0vJuOKc+EPUoFzhZFz8LoSsIaXIjsQ+BjCaklkEYFHib5ZMu cUQarbMhnjO1bMrUIVyjnleYXUb2hHx2Ws74U2RIbyxojA5Hlm2KcXfoZ4bu8a8ZhppC uw== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 306srm95re-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 07 Apr 2020 00:30:34 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 7 Apr 2020 00:30:32 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 7 Apr 2020 00:30:32 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.176) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Tue, 7 Apr 2020 00:30:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U5XW9YN0wrHliZu70iVfoWxahGobdkv9z1gjuDN76ixNIydiJlL7QSkn1zUZWrOeexHQQcfAeudEuZnI793O1qqQU7wGcL7pPqNzXcSbOK2h39HskDHhw6NvDFz5E3fbqjLgDPTqLmmO77OQZONtNOxR5AJaietV4a8gpCMGuJJYPnPVqUy5W7/gUxx/7NCgXM+CFNPjlieVZi+S0Nra+Vs52OgTGrqbUq6qR/zU6vt7/QOUM+DSxCdaOIBy2Ndx96DkRvLLOvGLAj8fEsG4Sm6cnGpWSi1YTk36jYHThxqgUEBttvdJ2NuQw2oFDjzi7HUwUv1hNmCqnsJZo4bJDw== 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-SenderADCheck; bh=vHKomNQaHYjPmXdOgbdq1E43+4nRGf0sWKt9s1Ejpyc=; b=ORR6GDHDMJ++AinDkoysSFTXK+gmAbUuAHOpwMblSC9N13SuT9miOVe+/w7ouoKwjQdjrwKgp/hzWaE0i6RmZUAB2kY397uoRT1pExnrXLb3R+ilL7bz7hXZB9Tijx81T1ecrUvNv2TdjIFDUGECcl7rLXhpC2Wpl7ePot0a14qAEx2sRutVmtIC+S5PTEEOHvn+/Voc95MjqQGhBRKt856xDhU7ge9N0VZcUMoVMpY6U123iS/06Z63SIHm9QVzaj0WMJJH6RCfkQIs4FnEKwTgSavWO8YRQEgKaysxTSxtAqZdA2uKeH4Q6MroXWUAeG37qVdTGBdy6pZhcCXQpQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vHKomNQaHYjPmXdOgbdq1E43+4nRGf0sWKt9s1Ejpyc=; b=IV3Rq7NjlUtPm5Bn/CxJKchj+FEGvZL7YK6d1wPBQIYG1ZUIjDTg8rIPO8sjP1KeFGVmvdK9O3wD8BdjRqsaprUmNh3V8z333jtMfsGtaUeE4VwmhNjP3phDUz8AbiL4zeI62o95/AB2zaAHUCnBTBtvSAwyUwwSAUZppnKGQWo= Received: from MWHPR1801MB2063.namprd18.prod.outlook.com (2603:10b6:301:6a::11) by MWHPR1801MB1888.namprd18.prod.outlook.com (2603:10b6:301:68::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.21; Tue, 7 Apr 2020 07:30:30 +0000 Received: from MWHPR1801MB2063.namprd18.prod.outlook.com ([fe80::380f:5ca1:ce60:6586]) by MWHPR1801MB2063.namprd18.prod.outlook.com ([fe80::380f:5ca1:ce60:6586%7]) with mapi id 15.20.2856.027; Tue, 7 Apr 2020 07:30:30 +0000 Date: Tue, 7 Apr 2020 13:00:14 +0530 From: Nithin Dabilpuram To: Cristian Dumitrescu , Thomas Monjalon , Ferruh Yigit , "Andrew Rybchenko" CC: , , Message-ID: <20200407073014.GA7763@outlook.office365.com> References: <20200330160019.29674-1-ndabilpuram@marvell.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200330160019.29674-1-ndabilpuram@marvell.com> User-Agent: Mutt/1.12.2 (34cd43c) (2019-09-21) X-ClientProxiedBy: BMXPR01CA0092.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:54::32) To MWHPR1801MB2063.namprd18.prod.outlook.com (2603:10b6:301:6a::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from outlook.office365.com (115.113.156.2) by BMXPR01CA0092.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:54::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15 via Frontend Transport; Tue, 7 Apr 2020 07:30:27 +0000 X-Originating-IP: [115.113.156.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2e358482-2f4a-4f44-af92-08d7dac58c4b X-MS-TrafficTypeDiagnostic: MWHPR1801MB1888: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-Forefront-PRVS: 036614DD9C X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1801MB2063.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(376002)(136003)(346002)(366004)(39850400004)(396003)(2906002)(5660300002)(26005)(6666004)(107886003)(8676002)(66946007)(478600001)(8936002)(66556008)(81156014)(16526019)(81166006)(66476007)(956004)(6506007)(186003)(9686003)(4326008)(1076003)(55016002)(86362001)(33656002)(110136005)(52116002)(55236004)(316002)(7696005)(290074003); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j2dwc+mg0N5hS8IrDDVcWLl8I+Nzpcawhz4zN8VSnXQ5lcPgaLCLGyXORYnEQAQzv6yHil1MVJ/SDHSZRheMURJyl3Tpo3KfQzZOZKmG3fwX1jlFe8QgAEKntXi84T92ZUTF6Z+CdBgzhTA5IOSPuVXPlUs30zXme0i03QDF4y+7REXLE4Jim2J/aRaB+3PUPmYNPzgVlBIYp6SQQvZMujiUNId1Hn3dwHsfMb8b5GG9uk4FEXUoLf+ccsEIJtdfVrA/yZy8HQNZBn5JHE1wnlQ09VTtc2TmYRTLDxCh0YUNCv1SrDYP9NT2ir1qKjDXpVyaDDCguJsRhWbrNXIHhOqVFjiqOWAhVavGCNaT983gB7kJO95voyhSOgYZZyXb7EieogGg7XlMNQ3ZuQX3Jd9shib9CvLkSpHX2iCpg1vHr6R54QYkaDpsKHrn0KMA3ZafnF82MvdwiiNgw1L5nwUktMQAv0jJZtSJJWlu/IBU0TRe12M4mKN9FZ8Qq37z X-MS-Exchange-AntiSpam-MessageData: JCuAvAl4n486M/M6kHvzv3tk4Uy3iTcKm5rHxwBbyDrfvd1Dh721Dw4QeJyzcdwUZie/CIE+YF+4BJCaHUAAGrF2OmNSO0TYLkVlVp/j5kIIZBRc6BhUCXQ2VGkdfVdQeslHaUvtG8Kk8BMakVHfYQ== X-MS-Exchange-CrossTenant-Network-Message-Id: 2e358482-2f4a-4f44-af92-08d7dac58c4b X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2020 07:30:29.7435 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bgixNcaFaFUrMhMkN+RY5maQ4TN3wsdOdM5IY7jJ8oAU+ujrIjbhfj3pZ7MrG99Fwyr8zfGH269LSlnJTGfT5A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1801MB1888 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-07_01:2020-04-07, 2020-04-06 signatures=0 Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add tm cap for private shaper packet mode 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Ping. On Mon, Mar 30, 2020 at 09:30:18PM +0530, Nithin Dabilpuram wrote: > Some NIC hardware have private shaper attached to > every node and has a limitation where packet mode is applied > both to the scheduling of a node's children using WFQ and > shaping of traffic out of the private shaper. > This cannot be expressed using existing capabilities or configurations. > > So this patch adds a tm capability that if set by a PMD implies that > packet mode when configured is even applied to private shaper > connected to that node. This also implies the limitation > that all the SP children of that node should have same mode > at any point of time i.e either packet mode or byte mode and > same applies to private shaper in that NIC PMD. > > This patch also adds missing capability that tells whether PMD > supports wfq weight mode or not. > > Signed-off-by: Nithin Dabilpuram > --- > lib/librte_ethdev/rte_tm.h | 62 +++++++++++++++++++++++++++++++++++++++++++--- > 1 file changed, 59 insertions(+), 3 deletions(-) > > diff --git a/lib/librte_ethdev/rte_tm.h b/lib/librte_ethdev/rte_tm.h > index f9c0cf3..50bcea6 100644 > --- a/lib/librte_ethdev/rte_tm.h > +++ b/lib/librte_ethdev/rte_tm.h > @@ -339,6 +339,20 @@ struct rte_tm_capabilities { > */ > uint32_t sched_wfq_weight_max; > > + /** WFQ weight mode supported. Non-zero value indicates wfq weight mode > + * is supported and a SP child (even a wfq group) can be configured to > + * use packet-mode or byte-mode for weight calculations. > + */ > + int sched_wfq_weight_mode_supported; > + > + /** Private shaper and scheduler weight mode. > + * When non-zero value indicates that all SP children should have > + * same weight mode and the same mode applies to private > + * shaper as well. This is only valid if > + * *sched_wfq_weight_mode_supported* is set. > + */ > + int sched_shaper_private_weight_mode; > + > /** WRED packet mode support. When non-zero, this parameter indicates > * that there is at least one leaf node that supports the WRED packet > * mode, which might not be true for all the leaf nodes. In packet > @@ -554,6 +568,21 @@ struct rte_tm_level_capabilities { > */ > uint32_t sched_wfq_weight_max; > > + /** WFQ weight mode supported. Non-zero value indicates > + * wfq weight mode is supported and a SP child > + * (even a wfq group) can be configured to use > + * packet-mode or byte-mode for weight calculations. > + */ > + int sched_wfq_weight_mode_supported; > + > + /** Private shaper and scheduler weight mode. > + * When non-zero value indicates that all SP children > + * should have same weight mode and the same mode > + * applies to private shaper as well. This is only > + * valid if *sched_wfq_weight_mode_supported* is set. > + */ > + int sched_shaper_private_weight_mode; > + > /** Mask of statistics counter types supported by the > * non-leaf nodes on this level. Every supported > * statistics counter type is supported by at least one > @@ -735,6 +764,21 @@ struct rte_tm_node_capabilities { > * WFQ weight, so WFQ is reduced to FQ. > */ > uint32_t sched_wfq_weight_max; > + > + /** WFQ weight mode supported. Non-zero value indicates > + * wfq weight mode is supported and a SP child > + * (even a wfq group) can be configured to use > + * packet-mode or byte-mode for weight calculations. > + */ > + int sched_wfq_weight_mode_supported; > + > + /** Private shaper and scheduler weight mode. > + * When non-zero value indicates that all SP children > + * should have same weight mode and the same mode > + * applies to private shaper as well. This is only > + * valid if *sched_wfq_weight_mode_supported* is set. > + */ > + int sched_shaper_private_weight_mode; > } nonleaf; > > /** Items valid only for leaf nodes. */ > @@ -836,10 +880,19 @@ struct rte_tm_wred_params { > * Token bucket > */ > struct rte_tm_token_bucket { > - /** Token bucket rate (bytes per second) */ > + /** Token bucket rate. This is in "bytes per second" by default. > + * For private shaper attached to node that is set in packet mode > + * and tm capability *sched_shaper_private_weight_mode* is set, > + * this is interpreted as "packets per second". > + */ > uint64_t rate; > > - /** Token bucket size (bytes), a.k.a. max burst size */ > + /** Token bucket size, a.k.a. max burst size. > + * This is in "bytes" by default. > + * For private shaper attached to node that is set in packet mode > + * and tm capability *sched_shaper_private_weight_mode* is set, > + * this is interpreted as "packets". > + */ > uint64_t size; > }; > > @@ -924,7 +977,10 @@ struct rte_tm_node_params { > * indicates that WFQ is to be used for all priorities. > * When non-NULL, it points to a pre-allocated array of > * *n_sp_priorities* values, with non-zero value for > - * byte-mode and zero for packet-mode. > + * byte-mode and zero for packet-mode. The same mode is > + * used for private shaper connected to this node if > + * tm capability *sched_shaper_private_weight_mode* is > + * true. > */ > int *wfq_weight_mode; > > -- > 2.8.4 >