From patchwork Fri Nov 10 22:34:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesus Sanchez-Palencia X-Patchwork-Id: 836953 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yYZmL07fbz9sRW for ; Sat, 11 Nov 2017 09:42:26 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754310AbdKJWmX (ORCPT ); Fri, 10 Nov 2017 17:42:23 -0500 Received: from mga06.intel.com ([134.134.136.31]:28829 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751041AbdKJWmW (ORCPT ); Fri, 10 Nov 2017 17:42:22 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP; 10 Nov 2017 14:42:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,376,1505804400"; d="scan'208";a="1242655616" Received: from cvitu-mobl1.amr.corp.intel.com (HELO darjeeling.amr.corp.intel.com) ([10.254.187.91]) by fmsmga002.fm.intel.com with ESMTP; 10 Nov 2017 14:42:20 -0800 From: Jesus Sanchez-Palencia To: netdev@vger.kernel.org Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, andre.guedes@intel.com, vinicius.gomes@intel.com, ivan.briano@intel.com, Jesus Sanchez-Palencia Subject: [PATCH iproute2] man: Clarify idleslope calculation for tc-cbs Date: Fri, 10 Nov 2017 14:34:36 -0800 Message-Id: <20171110223436.18221-1-jesus.sanchez-palencia@intel.com> X-Mailer: git-send-email 2.14.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In order to calculate the idleSlope parameter of CBS correctly, users must take into account the entire packet size, including the overhead from all layers. Add some more details to the man page to clarify that, giving one simple example and pointing users to the correct 802.1Q section for further clarifications if needed. Signed-off-by: Jesus Sanchez-Palencia --- man/man8/tc-cbs.8 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/man/man8/tc-cbs.8 b/man/man8/tc-cbs.8 index 97e00c84..32e1e0d4 100644 --- a/man/man8/tc-cbs.8 +++ b/man/man8/tc-cbs.8 @@ -43,7 +43,19 @@ second) when there is at least one packet waiting for transmission. Packets are transmitted when the current value of credits is equal or greater than zero. When there is no packet to be transmitted the amount of credits is set to zero. This is the main tunable of the CBS -algorithm. +algorithm and represents the bandwidth that will be consumed. +Note that when calculating idleslope, the entire packet size must be +considered, including headers from all layers (i.e. MAC framing and any +overhead from the physical layer), as described by IEEE 802.1Q-2014 +section 34.4. + +As an example, for an ethernet frame carrying 284 bytes of payload, +and with no VLAN tags, you must add 14 bytes for the Ethernet headers, +4 bytes for the Frame check sequence (CRC), and 20 bytes for the L1 +overhead: 12 bytes of interpacket gap, 7 bytes of preamble and 1 byte +of start of frame delimiter. That results in 322 bytes for the total +packet size, which is then used for calculating the idleslope. + .TP sendslope Sendslope is the rate of credits that is depleted (it should be a