From patchwork Wed Aug 15 20:29:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 144289 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1250864ljj; Wed, 15 Aug 2018 13:30:01 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxrc1t519KJwC+Ko1RjcVcTfGAXC+M7kGazMUAxneTClcp9+pjTn3eCfPGRdkGpGVS/mL+g X-Received: by 2002:a17:902:758b:: with SMTP id j11-v6mr25766328pll.29.1534365001702; Wed, 15 Aug 2018 13:30:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534365001; cv=none; d=google.com; s=arc-20160816; b=eftLZ1U3mQycoaQ6HxxbtRrEC7UIN6aI0lJA/bzRArg5sybMbweLMlg6TDM7maX9/H 9c8EguWRpPMqQuC7mwjW65qnWRqwBUcD5DoCIejyfpcvtGFddc46wbgOfKbNXcApHwkD HdPTf1pLTI2oadfl72SD3UwQywJVUn/zlZFJSB6jHO2jYAbB8Mt7NGaK9Keb9SdJNPo5 AXplca200NE681mqpqakDzTbVHH044NjoD9wr7aekmsOvFWxY5AoGbLhEeJe6B/rYxfD 0G0EVfQCzxs5Q95a61vrV6dllxwKOB3KNVufXmG0MjoPo3Y+XOhxUVvUDn/HzDU1Fgxk QhWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=TWNhjrmgLpSO5MJV73m5bOu5n1H+413r7T8xRTQZNdA=; b=d8koDGHMbnM1dj8Pu4kkA1xr3GCBkat79NWAbvlBrf1NQqZJmW3e4KXxtxjJzQF2Q6 yJ3zbj+5GzxWwF+asLPAYgQCF0BO23PbyS/fgGi5y72KJSVTqd4pa9m9cxNnm9uPOFg3 VHI21K7WnoBqN6vn76v3T/5Jrt3y7N3k8/bSgp1CW74M6IIFMiM79sKHZlLPTmvAaGih +ot4qUzAp7ZZqrPGL+jzRBNxnK8lKT8BRI785FawXRa3CeHQ5J7JzulqbgYW3PBSMZne RhQzaBer894QwAMxVyS0i1/9WdeA1GmYi6PWZqNqf7rudTlAejY8/QefSpnSXfBIBGc6 VV5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HxVe4yiX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z10-v6si12670980plk.17.2018.08.15.13.30.01; Wed, 15 Aug 2018 13:30:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HxVe4yiX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728220AbeHOXXk (ORCPT + 32 others); Wed, 15 Aug 2018 19:23:40 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:35210 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728083AbeHOXXk (ORCPT ); Wed, 15 Aug 2018 19:23:40 -0400 Received: by mail-lj1-f195.google.com with SMTP id p10-v6so1939654ljg.2 for ; Wed, 15 Aug 2018 13:29:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=TWNhjrmgLpSO5MJV73m5bOu5n1H+413r7T8xRTQZNdA=; b=HxVe4yiXT/cVV+jcYufkzUnRhINVIclBJ6+TZeyxYDn+E9lClIiJ94c7K32GTtBoMH MoqnRk9OE3GoxDL2nMCoApEWWe0BJrRJF8BJ6eTap96qrGtQuxC4hGNnASIJUC8KDGgm rB7r4/AD9a+q91ipw30ZUKyBV3I1iW/PpmepI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TWNhjrmgLpSO5MJV73m5bOu5n1H+413r7T8xRTQZNdA=; b=o4M/A0ygYMxvJtdH956mWF6sX2eG0iL2FLoCihSuwETLvc38HZcIbrofRcZcdt5yt9 hsZ8LtRxbCmmsELwiERy8ITHCVUWkx2jBHUWztC+NPApBt8DxvsCdX+6VGcsM8iNshNv kuEuV6Yup46DKUCTRW4v9tiflg9TaOMYxN+u5S7JUx7xDMEMJwmjQtRMsOk0LGkes+R0 U+B6elb2afE76CXn3Su2vUW7zwrpHu4KnogQ3RjJQYhdJl3NyOeMe7t3c+DkWxDTQ/ym VWNLaI2zSOkrevqCgl+h/UEo9E9CEh8V3l1mJhvGMgwznbTyDhEXia9B118QosdWuvv8 hqSA== X-Gm-Message-State: AOUpUlEnaseJ2b2Cj2lJNL4K84Xb5Jq/yHm56VQmQRuzFN9k7OtPR9ww 0pKu1jKjN+45DCV3gciXFdyPWVeNGaA= X-Received: by 2002:a2e:3c1a:: with SMTP id j26-v6mr9111405lja.149.1534364996620; Wed, 15 Aug 2018 13:29:56 -0700 (PDT) Received: from localhost.localdomain (59-201-94-178.pool.ukrtel.net. [178.94.201.59]) by smtp.gmail.com with ESMTPSA id w2-v6sm4139026lje.73.2018.08.15.13.29.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Aug 2018 13:29:55 -0700 (PDT) From: Ivan Khoronzhuk To: grygorii.strashko@ti.com, davem@davemloft.net Cc: corbet@lwn.net, netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH net-next] Documentation: networking: ti-cpsw: correct cbs parameters for Eth1 100Mb Date: Wed, 15 Aug 2018 23:29:53 +0300 Message-Id: <20180815202953.10137-1-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If set cbs parameters calculated for 1000Mb, but use on 100Mb port w/o h/w offload (for cpsw offload it doesn't matter), it works incorrectly. According to the example and testing board, second port is 100Mb interface. Correct them on recalculated for 100Mb interface. It allows to use the same command for CBS software implementation for board in example. Signed-off-by: Ivan Khoronzhuk --- Based on net-next/master Documentation/networking/ti-cpsw.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/Documentation/networking/ti-cpsw.txt b/Documentation/networking/ti-cpsw.txt index 67039205bd69..d4d4c0751a09 100644 --- a/Documentation/networking/ti-cpsw.txt +++ b/Documentation/networking/ti-cpsw.txt @@ -469,17 +469,18 @@ $ tc -g class show dev eth1 14) // Set rate for class A - 31 Mbit (tc0, txq2) using CBS Qdisc for Eth1 -// here only idle slope is important, others ignored +// here only idle slope is important, others ignored, but calculated +// for interface speed - 100Mb for eth1 port. // Set it +1 Mb for reserve (important!) -$ tc qdisc add dev eth1 parent 100:3 cbs locredit -1453 \ -hicredit 47 sendslope -969000 idleslope 31000 offload 1 +$ tc qdisc add dev eth1 parent 100:3 cbs locredit -1035 \ +hicredit 465 sendslope -69000 idleslope 31000 offload 1 net eth1: set FIFO3 bw = 31 15) // Set rate for class B - 11 Mbit (tc1, txq3) using CBS Qdisc for Eth1 // Set it +1 Mb for reserve (important!) -$ tc qdisc add dev eth1 parent 100:4 cbs locredit -1483 \ -hicredit 34 sendslope -989000 idleslope 11000 offload 1 +$ tc qdisc add dev eth1 parent 100:4 cbs locredit -1335 \ +hicredit 405 sendslope -89000 idleslope 11000 offload 1 net eth1: set FIFO2 bw = 11 16)