[{"id":1768208,"web_url":"http://patchwork.ozlabs.org/comment/1768208/","msgid":"<26D9FDECA4FBDD4AADA65D8E2FC68A4A10EAA2A7@ORSMSX104.amr.corp.intel.com>","list_archive_url":null,"date":"2017-09-13T21:43:31","subject":"Re: [Intel-wired-lan] [RFC PATCH v3 1/6] mqprio: Introduce new\n\thardware offload mode and shaper in mqprio","submitter":{"id":66945,"url":"http://patchwork.ozlabs.org/api/people/66945/","name":"Bowers, AndrewX","email":"andrewx.bowers@intel.com"},"content":"> -----Original Message-----\n> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On\n> Behalf Of Amritha Nambiar\n> Sent: Thursday, September 7, 2017 4:00 AM\n> To: intel-wired-lan@lists.osuosl.org; Kirsher, Jeffrey T\n> <jeffrey.t.kirsher@intel.com>\n> Cc: netdev@vger.kernel.org\n> Subject: [Intel-wired-lan] [RFC PATCH v3 1/6] mqprio: Introduce new\n> hardware offload mode and shaper in mqprio\n> \n> The offload types currently supported in mqprio are 0 (no offload) and\n> 1 (offload only TCs) by setting these values for the 'hw' option. If offloads are\n> supported by setting the 'hw' option to 1, the default offload mode is 'dcb'\n> where only the TC values are offloaded to the device. This patch introduces a\n> new hardware offload mode called 'channel' with 'hw' set to 1 in mqprio\n> which makes full use of the mqprio options, the TCs, the queue\n> configurations and the QoS parameters for the TCs. This is achieved through\n> a new netlink attribute for the 'mode' option which takes values such as 'dcb'\n> (default) and 'channel'.\n> The 'channel' mode also supports QoS attributes for traffic class such as\n> minimum and maximum values for bandwidth rate limits.\n> \n> This patch enables configuring additional HW shaper attributes associated\n> with a traffic class. Currently the shaper for bandwidth rate limiting is\n> supported which takes options such as minimum and maximum bandwidth\n> rates and are offloaded to the hardware in the 'channel' mode. The min and\n> max limits for bandwidth rates are provided by the user along with the the\n> TCs and the queue configurations when creating the mqprio qdisc. The\n> interface can be extended to support new HW shapers in future through the\n> 'shaper'\n> attribute.\n> \n> Introduces a new datastructure 'tc_mqprio_qopt_offload' for offloading\n> mqprio queue options and use this to be shared between the kernel and\n> device driver. This contains a copy of the exisiting datastructure for mqprio\n> queue options. This new datastructure can be extended when adding new\n> attributes for traffic class such as mode, shaper, shaper parameters\n> (bandwidth rate limits). The existing datastructure for mqprio queue options\n> will be shared between the kernel and userspace.\n> \n> Example:\n> # tc qdisc add dev eth0 root mqprio num_tc 2 map 0 0 0 0 1 1 1 1\\\n>   queues 4@0 4@4 hw 1 mode channel shaper bw_rlimit\\\n>   min_rate 1Gbit 2Gbit max_rate 4Gbit 5Gbit\n> \n> To dump the bandwidth rates:\n> \n> # tc qdisc show dev eth0\n> \n> qdisc mqprio 804a: root  tc 2 map 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0\n>              queues:(0:3) (4:7)\n>              mode:channel\n>              shaper:bw_rlimit   min_rate:1Gbit 2Gbit   max_rate:4Gbit 5Gbit\n> \n> v3 : Removed supporting new offloads through value 2 for 'hw' option,\n> introduced new netlink based options for offload mode and HW shaper.\n> v2 : Jiri's changes accepted upstream removes the struct tc_to_netdev. Clean\n> up the full offload related changes added to\n> mqprio_init() and mqprio_destroy() to rebase on these changes.\n> \n> Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>\n> ---\n>  include/net/pkt_cls.h          |    9 ++\n>  include/uapi/linux/pkt_sched.h |   32 +++++++\n>  net/sched/sch_mqprio.c         |  183\n> ++++++++++++++++++++++++++++++++++++++--\n>  3 files changed, 215 insertions(+), 9 deletions(-)\n\nTested-by: Andrew Bowers <andrewx.bowers@intel.com>","headers":{"Return-Path":"<intel-wired-lan-bounces@osuosl.org>","X-Original-To":["incoming@patchwork.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)","Received":["from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xswCG6l9Cz9s5L\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 07:43:38 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 81BD888906;\n\tWed, 13 Sep 2017 21:43:36 +0000 (UTC)","from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id mxvNmrX1B_po; Wed, 13 Sep 2017 21:43:35 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id E2B9588868;\n\tWed, 13 Sep 2017 21:43:35 +0000 (UTC)","from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 7019B1C3EBC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Sep 2017 21:43:34 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 63FA588868\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Sep 2017 21:43:34 +0000 (UTC)","from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id UYn9ZibxS3fv for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Sep 2017 21:43:33 +0000 (UTC)","from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 1A37F8885B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Sep 2017 21:43:33 +0000 (UTC)","from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga104.jf.intel.com with ESMTP; 13 Sep 2017 14:43:32 -0700","from orsmsx109.amr.corp.intel.com ([10.22.240.7])\n\tby fmsmga002.fm.intel.com with ESMTP; 13 Sep 2017 14:43:32 -0700","from orsmsx152.amr.corp.intel.com (10.22.226.39) by\n\tORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server\n\t(TLS) id 14.3.319.2; Wed, 13 Sep 2017 14:43:31 -0700","from orsmsx104.amr.corp.intel.com ([169.254.4.142]) by\n\tORSMSX152.amr.corp.intel.com ([169.254.8.88]) with mapi id\n\t14.03.0319.002; Wed, 13 Sep 2017 14:43:31 -0700"],"X-Virus-Scanned":["amavisd-new at osuosl.org","amavisd-new at osuosl.org"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","X-ExtLoop1":"1","X-IronPort-AV":"E=Sophos; i=\"5.42,389,1500966000\"; d=\"scan'208\";\n\ta=\"1218460966\"","From":"\"Bowers, AndrewX\" <andrewx.bowers@intel.com>","To":"\"intel-wired-lan@lists.osuosl.org\" <intel-wired-lan@lists.osuosl.org>","Thread-Topic":"[Intel-wired-lan] [RFC PATCH v3 1/6] mqprio: Introduce new\n\thardware offload mode and shaper in mqprio","Thread-Index":"AQHTJ8iozJZh/pzQQEKYNxERy/2rLKKzYwDw","Date":"Wed, 13 Sep 2017 21:43:31 +0000","Message-ID":"<26D9FDECA4FBDD4AADA65D8E2FC68A4A10EAA2A7@ORSMSX104.amr.corp.intel.com>","References":"<150478158684.24662.17975701233699487888.stgit@anamdev.jf.intel.com>\n\t<150478200636.24662.17572491925361676670.stgit@anamdev.jf.intel.com>","In-Reply-To":"<150478200636.24662.17572491925361676670.stgit@anamdev.jf.intel.com>","Accept-Language":"en-US","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","x-titus-metadata-40":"eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTAwNDZjMTMtZmJjYi00MjM3LWIzOTMtMDMyOWNiOThkMmU0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImM5R05meUo4QlNaZG54U1JJc2dhTnRrR1VwNlUrMW5EcWViSnowcjNyenM9In0=","x-ctpclassification":"CTP_IC","dlp-product":"dlpe-windows","dlp-version":"11.0.0.116","dlp-reaction":"no-action","x-originating-ip":"[10.22.254.138]","MIME-Version":"1.0","Subject":"Re: [Intel-wired-lan] [RFC PATCH v3 1/6] mqprio: Introduce new\n\thardware offload mode and shaper in mqprio","X-BeenThere":"intel-wired-lan@osuosl.org","X-Mailman-Version":"2.1.18-1","Precedence":"list","List-Id":"Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>","List-Unsubscribe":"<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>","List-Archive":"<http://lists.osuosl.org/pipermail/intel-wired-lan/>","List-Post":"<mailto:intel-wired-lan@osuosl.org>","List-Help":"<mailto:intel-wired-lan-request@osuosl.org?subject=help>","List-Subscribe":"<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"intel-wired-lan-bounces@osuosl.org","Sender":"\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"}}]