Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5221611rwl; Tue, 11 Apr 2023 02:09:02 -0700 (PDT) X-Google-Smtp-Source: AKy350Zo7ShZAJj8BZPmOVxgWw0Z1/MbOTC1aN8gHx4vzeOUENphU03OusiqBFLPRyrh6Hna8vhQ X-Received: by 2002:a17:902:e847:b0:1a1:ab92:5c88 with SMTP id t7-20020a170902e84700b001a1ab925c88mr19576174plg.13.1681204142080; Tue, 11 Apr 2023 02:09:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681204142; cv=none; d=google.com; s=arc-20160816; b=VvtoMi0Macs3cO2Gl9Rs+U+cv3Jmh5s40XYVCZv3tE+A8QE/1ijFyChyhX1h+dTMdG mT0VN8BSRZg0eHj9yHp+nnoTVCC7ELwAQTCYneXETktbxhNvYnSeQ9ZeglUR7pfVnFmH jj5QXbuy8xyyXEBbz2muONgig0Op1T6ZtcyMXVuffh/MvjE2GoxFOm2ZERrckEciF74h /z59RCXyyYq4twM6zRQaV9hKW3WSlMdB/FgsmfXpvOLHR6qteGNvJKPk7eO2KBy8HTp2 UwN3CO+HU+IAdX7Zqdq9RD3EkMeEMYhRtQXo8+fSN+vKwHva9Fd1JyV29VF2AHeKfYXY lcDw== 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=ZUKikyYIDNWMEYeaBDZPX7RuRueYQ4+8HIhwyTHOelIUZ9C5MLbQgotsHDA1yJ8q/a dSXjcJxOIMr5ePukrikAzh5Xzgl//vw0VqMlSKEAyFqdkFUvorEXDR/MrXiN5MG8PCMl RRTJaV37uj43YZfbKBAk5TByFE7Yix3xceU+vGkqRpyUQgtVi6orTdh8BqMIGPo54Xt5 0z3LOWLpH1FcHxBIdDQ9EfR36t/8hZ2Cs6Sg3b+yLhoQt6y0OHIUKiHaAYvtdxKqDcBR m5AeUdEPFOBi0KAsUH9Xpo3JvkJhf4hXVXp5zag4yMnJ7k0DPSzJdxT/Y136FAJ0wZKR 8BWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=idcspAdO; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h6-20020a170902ac8600b001a55571febesi6489494plr.277.2023.04.11.02.08.49; Tue, 11 Apr 2023 02:09:02 -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=idcspAdO; 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 S230266AbjDKJFt (ORCPT + 99 others); Tue, 11 Apr 2023 05:05:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230495AbjDKJFD (ORCPT ); Tue, 11 Apr 2023 05:05:03 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD38E3AA2; Tue, 11 Apr 2023 02:04:57 -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 33B8g4BS014870; Tue, 11 Apr 2023 02:04:48 -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=idcspAdOrHA36DRIvGepsqn8DgMBnuUj5mfw1QOYq4ncIhKQTokN4/EiS5ESSlI7nepQ yIxDZXyJH1DftmvU1OdJ3D0pjDkRfE1G9Xc1MQLZ2BN6QPvQzcRNodDcUr7fxMWrCbgt 3oH/86JVVY2YrcXT8AijMAsAyVJu8wWcZTZsGKD5EO3OhEjV53baZ/lhn2vCmwjC/kTI 8Ba/MpCG1vzVvu/sw+6uDSzaE12W5/8c/Q9HziniZ98W2bOmfD/8v900AGOhtoBvUWXu v4DMTEO8Y2yp99sBVwcMT4Mk1sNbo9P0jx5f/pPkEYbVB3/nERsbdtlxESF7+ZQfkZ1e eQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3purfs93d0-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 11 Apr 2023 02:04:48 -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; Tue, 11 Apr 2023 02:04:43 -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; Tue, 11 Apr 2023 02:04:43 -0700 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 3B8863F706F; Tue, 11 Apr 2023 02:04:37 -0700 (PDT) From: Hariprasad Kelam To: , CC: , , , , , , , , , , , , , , , , , Subject: [net-next Patch v9 6/6] docs: octeontx2: Add Documentation for QOS Date: Tue, 11 Apr 2023 14:33:59 +0530 Message-ID: <20230411090359.5134-7-hkelam@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230411090359.5134-1-hkelam@marvell.com> References: <20230411090359.5134-1-hkelam@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: 7HuvmxVok2XpKYBXR_Qtw6GJFYOqiedx X-Proofpoint-GUID: 7HuvmxVok2XpKYBXR_Qtw6GJFYOqiedx 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-11_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 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 -- 2.17.1