[{"id":1768211,"web_url":"http://patchwork.ozlabs.org/comment/1768211/","msgid":"<26D9FDECA4FBDD4AADA65D8E2FC68A4A10EAA2D7@ORSMSX104.amr.corp.intel.com>","list_archive_url":null,"date":"2017-09-13T21:45:15","subject":"Re: [Intel-wired-lan] [RFC PATCH v3 4/6] i40e: Enable 'channel'\n\tmode in mqprio for TC configs","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 4/6] i40e: Enable 'channel' mode in\n> mqprio for TC configs\n> \n> The i40e driver is modified to enable the new mqprio hardware offload mode\n> and factor the TCs and queue configuration by creating channel VSIs. In this\n> mode, the priority to traffic class mapping and the user specified queue\n> ranges are used to configure the traffic classes by setting the mode option to\n> 'channel'.\n> \n> Example:\n> # tc qdisc add dev eth0 root mqprio num_tc 4\\\n>   map 0 0 0 0 1 2 2 3 queues 2@0 2@2 1@4 1@5\\\n>   hw 1 mode channel\n> \n> # tc qdisc show dev eth0\n> \n> qdisc mqprio 8038: root  tc 4 map 0 0 0 0 1 2 2 3 0 0 0 0 0 0 0 0\n>              queues:(0:1) (2:3) (4:4) (5:5)\n>              mode:channel\n>              shaper:dcb\n> \n> The HW channels created are removed and all the queue configuration is set\n> to default when the qdisc is detached from the root of the device.\n> \n> # tc qdisc del dev eth0 root\n> \n> This patch also disables setting up channels via ethtool (ethtool -L) when the\n> TCs are configured using mqprio scheduler.\n> \n> The patch also limits setting ethtool Rx flow hash indirection (ethtool -X eth0\n> equal N) to max queues configured via mqprio.\n> The Rx flow hash indirection input through ethtool should be validated so\n> that it is within in the queue range configured via tc/mqprio. The bound\n> checking is achieved by reporting the current rss size to the kernel when\n> queues are configured via mqprio.\n> \n> Example:\n> # tc qdisc add dev eth0 root mqprio num_tc 4\\\n>   map 0 0 0 1 0 2 3 0 queues 2@0 4@2 8@6 11@14\\\n>   hw 1 mode channel\n> \n> # ethtool -X eth0 equal 12\n> Cannot set RX flow hash configuration: Invalid argument\n> \n> v3: Changes to incorporate new mqprio mode option. Minor clean up of\n> setup_tc error handling based on Shannon's comments.\n> v2: Clean up __i40e_setup_tc() and i40e_setup_tc() to work with Jiri's\n> changes to the ndo_setup_tc interface which now takes a type and the\n> type_data for the offload.\n> No need to disable ATR in MQPRIO mode.\n> \n> Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>\n> ---\n>  drivers/net/ethernet/intel/i40e/i40e.h         |    3\n>  drivers/net/ethernet/intel/i40e/i40e_ethtool.c |    8\n>  drivers/net/ethernet/intel/i40e/i40e_main.c    |  457\n> ++++++++++++++++++------\n>  3 files changed, 362 insertions(+), 106 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.136; helo=silver.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)","Received":["from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 3xswFG6xs9z9s5L\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 07:45:22 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 7349730CB6;\n\tWed, 13 Sep 2017 21:45:21 +0000 (UTC)","from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id F0Q5HRRFAEHI; Wed, 13 Sep 2017 21:45:19 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 6B909258E6;\n\tWed, 13 Sep 2017 21:45:19 +0000 (UTC)","from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id EC6B91C3F94\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Sep 2017 21:45:17 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id E451D8958A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Sep 2017 21:45:17 +0000 (UTC)","from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id IYH8WoZoPGt9 for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Sep 2017 21:45:17 +0000 (UTC)","from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 0ADF58951B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Sep 2017 21:45:16 +0000 (UTC)","from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Sep 2017 14:45:16 -0700","from orsmsx105.amr.corp.intel.com ([10.22.225.132])\n\tby orsmga001.jf.intel.com with ESMTP; 13 Sep 2017 14:45:16 -0700","from orsmsx104.amr.corp.intel.com ([169.254.4.142]) by\n\tORSMSX105.amr.corp.intel.com ([169.254.2.45]) with mapi id\n\t14.03.0319.002; Wed, 13 Sep 2017 14:45:16 -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=\"1171982434\"","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 4/6] i40e: Enable 'channel'\n\tmode in mqprio for TC configs","Thread-Index":"AQHTJ8i3hdNoOanbdUyERnhfJzN5XaKzY4AQ","Date":"Wed, 13 Sep 2017 21:45:15 +0000","Message-ID":"<26D9FDECA4FBDD4AADA65D8E2FC68A4A10EAA2D7@ORSMSX104.amr.corp.intel.com>","References":"<150478158684.24662.17975701233699487888.stgit@anamdev.jf.intel.com>\n\t<150478202229.24662.13170185123985209854.stgit@anamdev.jf.intel.com>","In-Reply-To":"<150478202229.24662.13170185123985209854.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":"eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzk1M2EzZTMtZmYzMC00MjgwLWIyZmUtNzM4YzRhYzVhNmU2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImR1Y3JFWjA5cmtoVm5zaVwvSTBURllsSE4rcmdkNTgzdUV0N1ZYXC9ZNWN6QT0ifQ==","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 4/6] i40e: Enable 'channel'\n\tmode in mqprio for TC configs","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>"}}]