From patchwork Mon Apr 10 08:42:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hariprasad Kelam X-Patchwork-Id: 81430 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1771378vqo; Mon, 10 Apr 2023 02:17:24 -0700 (PDT) X-Google-Smtp-Source: AKy350ayx7qwOZAPORitnRh3FRPBrF5i4LyGHYpLNabebxzk93loBayioFEwg1i+pHs2Wssq3NDV X-Received: by 2002:aa7:c404:0:b0:504:8a0f:13ca with SMTP id j4-20020aa7c404000000b005048a0f13camr6238101edq.10.1681118244350; Mon, 10 Apr 2023 02:17:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681118244; cv=none; d=google.com; s=arc-20160816; b=n13FqT8eIMLK5qzMhuoI7WuRxCgMEu7LGz2u3tblSSAeqwds/ruZmWYJjPyX1XoTQ2 +D+ilISbfz2apUAKyJejR+ExBTturuDgPYw9ja3M+iwp4oMhntXRCpQU+cNXvZJIQ44f jiBLAQXkCgzVq/5Yr2ZRL6lb6KRRunZ+wbyR+F5fE3CpEyqW+FixMA2L3NvmwRgaFS10 gih/ZhFCXY1JX+snoE+OsrlOKQTlGRwI8X3cpBaQCdwS3+EyylpQQw9WBuvP4zEgskXr 4JPrLMgwLl1B3PAE4/nnuTZ0GC+gpyXHAVN7D3+JOJ9xTGQGrGhI7y+n3MFgqLP1OF0M InLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ettstRGWvS56fnp3bZw7OTRsDyBJuDTMzGdoHrt4m3U=; b=ze1Xq9EgHqfFm8ayE3im0loPB7psrQlgx/MlV/5PJZUvXjEDAibCmlwZRJD/EmY5Yu qHputdhJTrlth2XUauy5K0lvAMczpGVPVY89btsN9xSTsiohBJo/bx9rdgoRv5OObC9V WqzDl7CQCSvcqhBXgKbbZtDslxhsRS9luWbEySOXz5FmYOl7ut6fpywx8SiHV389OVxy FLznsme0N0qcR3WNTQWooygxG9iuO2aDlx8QqVBeFRC/Q3MoOZpBukAwZPPepT20emsk Bnfn1XLYW19L21qqIvm5t7iHN8VOVhzyrz5fGH2jLoDPzhGFQhxEy6R1xLo9pLbE7xww DUJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=Ez72myM6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l9-20020a056402344900b005002e71a84fsi7540122edc.137.2023.04.10.02.16.58; Mon, 10 Apr 2023 02:17:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=Ez72myM6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229988AbjDJJMG (ORCPT + 99 others); Mon, 10 Apr 2023 05:12:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229937AbjDJJL0 (ORCPT ); Mon, 10 Apr 2023 05:11:26 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 096095FCD; Mon, 10 Apr 2023 02:11:23 -0700 (PDT) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 339MjWB8008008; Mon, 10 Apr 2023 01:43:11 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=ettstRGWvS56fnp3bZw7OTRsDyBJuDTMzGdoHrt4m3U=; b=Ez72myM6VweY8JisO4LsQBbOYsg9hlvuiTy3F/6XR7QieOMqBeSIBoYaTWsPogycKiAT vTzSYXWDYOegfk2q8adskdAJfXNCxCWJp+th1iQEX7LGHHUdwPy2BBLGZjMuFmPjVkBl OXzoILDxllIbST57kjjC+AHZzDY78MgS/dfcvzkmroQlTXLVuJG/w7DVz9EQSRpFOIWT KJYzWg1ZdDi9dMXeQ/pim6ww/eTy0H+e+1cexEYkIvaWIy6SGvr7HTm0O/7TLzY5DXAf P3tVpYMvwJY5iusRzqCLSxzpX1Zman5AmSdoil+Da6eGFs4rFfam4ywqISCxE90Sx3t7 zw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3purfs42qg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 10 Apr 2023 01:43:11 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 10 Apr 2023 01:43:09 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Mon, 10 Apr 2023 01:43:09 -0700 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id D8C8D5C68E4; Mon, 10 Apr 2023 01:43:03 -0700 (PDT) From: Hariprasad Kelam To: , CC: , , , , , , , , , , , , , , , , , Subject: [net-next Patch v8 6/6] docs: octeontx2: Add Documentation for QOS Date: Mon, 10 Apr 2023 14:12:23 +0530 Message-ID: <20230410084223.5325-7-hkelam@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230410084223.5325-1-hkelam@marvell.com> References: <20230410084223.5325-1-hkelam@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: VxNqPtAbAtZAiRkt6Tj_9EH042S44yKU X-Proofpoint-GUID: VxNqPtAbAtZAiRkt6Tj_9EH042S44yKU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-10_05,2023-04-06_03,2023-02-09_01 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762780243699265630?= X-GMAIL-MSGID: =?utf-8?q?1762780243699265630?= Add QOS example configuration along with tc-htb commands Signed-off-by: Hariprasad Kelam Reviewed-by: Simon Horman --- .../ethernet/marvell/octeontx2.rst | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst b/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst index 5ba9015336e2..eca4309964c8 100644 --- a/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst +++ b/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst @@ -13,6 +13,7 @@ Contents - `Drivers`_ - `Basic packet flow`_ - `Devlink health reporters`_ +- `Quality of service`_ Overview ======== @@ -287,3 +288,41 @@ For example:: NIX_AF_ERR: NIX Error Interrupt Reg : 64 Rx on unmapped PF_FUNC + + +Quality of service +================== + +octeontx2 silicon and CN10K transmit interface consists of five transmit levels starting from SMQ/MDQ, TL4 to TL1. +The hardware uses the below algorithms depending on the priority of scheduler queues + +1. Strict Priority + + - Once packets are submitted to MDQ, hardware picks all active MDQs having different priority + using strict priority. + +2. Round Robin + + - Active MDQs having the same priority level are chosen using round robin. + +3. Each packet will traverse MDQ, TL4 to TL1 levels. Each level contains an array of queues to support scheduling and + shaping. + +4. once the user creates tc classes with different priority + + - Driver configures schedulers allocated to the class with specified priority along with rate-limiting configuration. + +5. Enable HW TC offload on the interface:: + + # ethtool -K hw-tc-offload on + +6. Crate htb root:: + + # tc qdisc add dev clsact + # tc qdisc replace dev root handle 1: htb offload + +7. Create tc classes with different priorities:: + + # tc class add dev parent 1: classid 1:1 htb rate 10Gbit prio 1 + + # tc class add dev parent 1: classid 1:2 htb rate 10Gbit prio 7