From patchwork Sun Mar 26 18:12:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hariprasad Kelam X-Patchwork-Id: 75150 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1104719vqo; Sun, 26 Mar 2023 13:06:20 -0700 (PDT) X-Google-Smtp-Source: AKy350Yaj2duVtI8pp/v4MVsG2spg++kf1m7wdmwla/SLOJxIZR5O7Xa3Um+WbxbfHOPz7xzACk3 X-Received: by 2002:a17:90b:3b4f:b0:234:2485:6743 with SMTP id ot15-20020a17090b3b4f00b0023424856743mr10282179pjb.3.1679861180701; Sun, 26 Mar 2023 13:06:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679861180; cv=none; d=google.com; s=arc-20160816; b=qHA94YQN5XwJ0t6Rd12sysB6hz8ifNa0S3jwr40uuuxM1fT9leGb1jgnI7vrcRKS1A xSzUegZAMLeE9XGyM5egH5ew4bbnRn80P5dlKmGbko5ag7ccP5L3T/RuoRtPqJStkVSt VwVMi3sNeNnLtyZT3jmHGO3OuDWl6sh4BJWqjfuQ9/tGlnd5qp1r4TeepmXz8ILpCVvF eAm3bE9Y5QZwfRZ++R4nREQZ/R30Yi8ov4o4zjPfIfjju8Ot1NZw8IOiPdnZdX+BLXsC jNOO7ZZUT2Rvbhv8lmCY+Nq89UL4NzABkIuhqdO/vDch7Jf6OFWfJz7ktWtBAw32+ll7 hAbQ== 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=g/6c23UcmUdzhzNLKqF3fKU9v4YadyrWid9pKjlYVD8=; b=cHUbBDnZvnlOkWdmD/c1KhfhFKSvXwF7pqyrDDU8oL0y0kd0pe4/0rSbu6RTmxKdn+ z37SbZ+69yyx00lwzI0iNFvsiXaUVaNzYv5jlB/YEhT5SvQ2LK2VMvlABOzneRSNJCP3 b8soYH0HqShgro0eiskkd8ePkTN3YQ+5xuJJoh2fjq6oWuROlie96PNm60+qrk/BlqVu mxyIJd1VuZSCMbBvCwHY7P1oOp0B3gSdaCGICytizLzXV5ekD4kSSV5180kQc6ONG0yu iGEE+kNTUoqzz1O47YuRZERoifEo9tqfQYO2SPg8E1DIiEHIyymOY4OnjB6I892K4Mdj k7uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=bfMnQVn+; 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 y65-20020a638a44000000b0050fab5a8c2fsi14337706pgd.476.2023.03.26.13.06.08; Sun, 26 Mar 2023 13:06:20 -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=bfMnQVn+; 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 S231913AbjCZSOP (ORCPT + 99 others); Sun, 26 Mar 2023 14:14:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231737AbjCZSOI (ORCPT ); Sun, 26 Mar 2023 14:14:08 -0400 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FE874494; Sun, 26 Mar 2023 11:13:39 -0700 (PDT) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32QFk9PD018296; Sun, 26 Mar 2023 11:13:29 -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=g/6c23UcmUdzhzNLKqF3fKU9v4YadyrWid9pKjlYVD8=; b=bfMnQVn+d7Qn7bEUhkJweVj5tfiYbbaUKVUPiHJrOHE5yopdrAsEWHvY+hfhypo3RC1M cFFL5hQXROFHn2mdwSTKksvCbJgfM5fL+bpPmQ05JZCqXhaRBDfFnJugY+uwtBrhMtLU 9zRKsDwO9MpDU/7NbC3FG22vBbKeWg5fhnOcOQ6erRe5NuJs+XLU87AkZwzZFbdPKott eH7tg2gsq45uujisGH5zw+J7dhmrfGW5xefJN6A7tDBXKG/sVt3Q9Y45kOP2qWgZwnMo N1xJeArxCbJ0Rg3EJkTFNaBBc44opi9EzW/gYHobaMraAsgK8Nxxa2TQrPhDrhF0PY3E 0A== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3phxas3uff-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 26 Mar 2023 11:13:28 -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; Sun, 26 Mar 2023 11:13:26 -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; Sun, 26 Mar 2023 11:13:26 -0700 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id B1A613F7098; Sun, 26 Mar 2023 11:13:21 -0700 (PDT) From: Hariprasad Kelam To: , CC: , , , , , , , , , , , , , , , , Subject: [net-next Patch v5 6/6] docs: octeontx2: Add Documentation for QOS Date: Sun, 26 Mar 2023 23:42:45 +0530 Message-ID: <20230326181245.29149-7-hkelam@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230326181245.29149-1-hkelam@marvell.com> References: <20230326181245.29149-1-hkelam@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: R3KdvTLX5Lucxy155TfL13sJNoILWxRI X-Proofpoint-ORIG-GUID: R3KdvTLX5Lucxy155TfL13sJNoILWxRI 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-03-24_11,2023-03-24_01,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?1761462117575355949?= X-GMAIL-MSGID: =?utf-8?q?1761462117575355949?= 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