From patchwork Sat May 13 08:51:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hariprasad Kelam X-Patchwork-Id: 93490 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp5657869vqo; Sat, 13 May 2023 02:14:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ74omq1fmv628Wk6EQojRyL23UlSL2J6SOiMIy6Gd6OlSPxX/j7r51n0TlIEi0r6apbsdaV X-Received: by 2002:a17:903:2291:b0:1ad:f407:37d1 with SMTP id b17-20020a170903229100b001adf40737d1mr2957293plh.52.1683969268603; Sat, 13 May 2023 02:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683969268; cv=none; d=google.com; s=arc-20160816; b=BDCf1GIsNjLd9n5QrWinMnzb9wHM27936FLzJFSCu+Tt9SOYYNakcAntmxi8zTMY4N yJXFDKFLn0xVEW1+Db6AGbWE/dYjpxOxJYuu4JcCkmREQCGa6YZDFnqRRe0tap8ttYsV 9y+G+gKOxBEJ/YSQP+BC7wHeoqOoBmPSqVHZbYurCW/nq4yC7Q/IShoL5yIdDUJf7CXP 2dfdxAQRRnaW6IexfnaruqTzgt7J0ipFTvTRk5VJHr+nj2Q9HxRDzYI1aiX9LVR3U/q3 Z9zkqxChXBL7hbvFrYmsgEIXxG5Lw/PVh4p+s9YOL9H6+RCpB/Li9EcrR4bqKfjHXGC9 xF0w== 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=Pr0kr9n/DzGBe9MTqSwgVAn7Iur8skCjJRNn9qOW+Uw=; b=tZ9fBV+kCYX2Ssni6EPo59qo9DPiNsKmf0OEaCs/s8y1//zQ4VEL54eiOH1xTe97QL cKjvfkYGJiGySDff+fqvWIyGttaXdkah7WffB+U7fH3y4SqQeig5LPX5LjbYnVnjT1Wl z7I1bNRRtDA7A/5Q1fKMrDDxSf6PuJo2AV8RLIyZ850Lvsxd/yM6IF4JCR4t1juKM4Nz K1TEk1AENa4qHvKrQyAaoZtHe9qMxOw8dUO6RbnCYFBEBb6DmvcmEELLX1It6Si6nWyW 4v1tapwKltEwtA1tMpLrQOOTenN6q4bQUJ+ZN3TKC6TzfszoS6aklykzleVhZAPOEpI+ dU4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=jOrFsBvx; 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 lg13-20020a170902fb8d00b001adf56751ccsi1470754plb.520.2023.05.13.02.14.15; Sat, 13 May 2023 02:14:28 -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=jOrFsBvx; 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 S233950AbjEMI4A (ORCPT + 99 others); Sat, 13 May 2023 04:56:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229463AbjEMIz6 (ORCPT ); Sat, 13 May 2023 04:55:58 -0400 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B484D12A; Sat, 13 May 2023 01:55:57 -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 34D8bLjW024516; Sat, 13 May 2023 01:55:47 -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=Pr0kr9n/DzGBe9MTqSwgVAn7Iur8skCjJRNn9qOW+Uw=; b=jOrFsBvxQeoRH3m6xzJRzDgneBACLQFBSPIyZ0AbVbjNtPoltvOr63umvL+uBAefSksK 8+soHURaO1GEMlgrJnpv7NbKtptZiaDIjyf9HFWahV4k7yYqWtKt5g+Vj4bfVzeCp/ca MOhYc/k2kAtYqkAAuUpOtUinuar9HMUQDngF+BzG4aV3Q5tTG751WxhitVe7AdpumCwC +ZlSsN+fseeErDeJqfgEGAGZv9VwVqW+nrkicn5Pi0bWmNz199Xmqz+AwHZtPvsarwT8 xU1joE0h15OQQCHkgyFXdDsnA0xEr8KSCo0XRrtpgBfbI1h5ftH3dmKJcBPYUy6cPN0u CQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3qhs82tgdk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sat, 13 May 2023 01:55:47 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sat, 13 May 2023 01:55:45 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Sat, 13 May 2023 01:55:45 -0700 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 9501D5B6F81; Sat, 13 May 2023 01:52:44 -0700 (PDT) From: Hariprasad Kelam To: , CC: , , , , , , , , , , , , , , , , , , Subject: [net-next Patch v10 8/8] docs: octeontx2: Add Documentation for QOS Date: Sat, 13 May 2023 14:21:43 +0530 Message-ID: <20230513085143.3289-9-hkelam@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230513085143.3289-1-hkelam@marvell.com> References: <20230513085143.3289-1-hkelam@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: Jdu_l_nvF9-zxkij4P59xjPaxMzUhxpX X-Proofpoint-ORIG-GUID: Jdu_l_nvF9-zxkij4P59xjPaxMzUhxpX 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-05-13_06,2023-05-05_01,2023-02-09_01 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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?1765769759451940877?= X-GMAIL-MSGID: =?utf-8?q?1765769759451940877?= Add QOS example configuration along with tc-htb commands Signed-off-by: Hariprasad Kelam Reviewed-by: Simon Horman --- .../ethernet/marvell/octeontx2.rst | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst b/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst index 5ba9015336e2..bfd233cfac35 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,47 @@ For example:: NIX_AF_ERR: NIX Error Interrupt Reg : 64 Rx on unmapped PF_FUNC + + +Quality of service +================== + + +Hardware algorithms used in scheduling +-------------------------------------- + +octeontx2 silicon and CN10K transmit interface consists of five transmit levels +starting from SMQ/MDQ, TL4 to TL1. Each packet will traverse MDQ, TL4 to TL1 +levels. Each level contains an array of queues to support scheduling and shaping. +The hardware uses the below algorithms depending on the priority of scheduler queues. +once the usercreates tc classes with different priorities, the driver configures +schedulers allocated to the class with specified priority along with rate-limiting +configuration. + +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. + + +Setup HTB offload +----------------- + +1. Enable HW TC offload on the interface:: + + # ethtool -K hw-tc-offload on + +2. Crate htb root:: + + # tc qdisc add dev clsact + # tc qdisc replace dev root handle 1: htb offload + +3. 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