From patchwork Sun Jun 2 21:33:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 248139 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 0C8952C00AF for ; Mon, 3 Jun 2013 07:33:10 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753080Ab3FBVdH (ORCPT ); Sun, 2 Jun 2013 17:33:07 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:44822 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752563Ab3FBVdD (ORCPT ); Sun, 2 Jun 2013 17:33:03 -0400 Received: by mail-pd0-f178.google.com with SMTP id w10so496804pde.23 for ; Sun, 02 Jun 2013 14:33:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:x-mailer:content-transfer-encoding:mime-version; bh=ziZ6VqXgIp9Fb8nBPfvMhBqDrFPzpKAWPu7jMp/BNFY=; b=BBoxTSUJ+20vVSjTj19EFMSbwuwwnppD2Cyu4+SO5Ici+jNHIWccMuAkfPG2LwILw2 szERzQgm8WOybWlPFjo0X6W4dAlTBWnKuVUfo2Q4W3gJhj4iy/4ZThJ7elxpt6/VPFFq fOO87kOJJ8319D2xwq2NmHrJGiQ/n+YcWSOtyWmnzH9FZ5Td7ogYWRh5EXAojqcYLpKR 125oKMG3ktSHYMv0Z/CM9d85Gu/xF0wrSycC93exta8xThTLp8j5D6M2nApgl6Y25PHJ g8F5CJSCPnjT0f+bdNnSMHN/lCr5JscZIvbR94Ern3nAfZ4B35xRMPc8w/hJtwwBW2ox b6XA== X-Received: by 10.68.35.3 with SMTP id d3mr21408881pbj.155.1370208783071; Sun, 02 Jun 2013 14:33:03 -0700 (PDT) Received: from [172.29.161.17] ([172.29.161.17]) by mx.google.com with ESMTPSA id wt5sm56126637pbc.38.2013.06.02.14.33.02 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Sun, 02 Jun 2013 14:33:02 -0700 (PDT) Message-ID: <1370208781.24311.89.camel@edumazet-glaptop> Subject: [PATCH iproute2] htb: report overhead attribute From: Eric Dumazet To: Jesper Dangaard Brouer , Stephen Hemminger Cc: netdev Date: Sun, 02 Jun 2013 14:33:01 -0700 In-Reply-To: <1370207755.24311.81.camel@edumazet-glaptop> References: <20130529151330.22c5c89e@redhat.com> <1370207755.24311.81.camel@edumazet-glaptop> X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Eric Dumazet "tc class show dev ..." omits the overhead attribute for HTB. After patch I have : tc class add dev $DEV parent 1: classid 1:1 est 1sec 4sec htb \ rate 12Mbit mtu 1500 quantum 1514 overhead 20 tc class show dev $DEV class htb 1:1 root prio 0 rate 12000Kbit overhead 20 ceil 12000Kbit burst 1500b cburst 1500b Signed-off-by: Eric Dumazet --- tc/q_htb.c | 2 ++ 1 file changed, 2 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/tc/q_htb.c b/tc/q_htb.c index caa47c2..e6b09bb 100644 --- a/tc/q_htb.c +++ b/tc/q_htb.c @@ -264,6 +264,8 @@ static int htb_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) fprintf(f, "quantum %d ", (int)hopt->quantum); } fprintf(f, "rate %s ", sprint_rate(hopt->rate.rate, b1)); + if (hopt->rate.overhead) + fprintf(f, "overhead %u ", hopt->rate.overhead); buffer = tc_calc_xmitsize(hopt->rate.rate, hopt->buffer); fprintf(f, "ceil %s ", sprint_rate(hopt->ceil.rate, b1)); cbuffer = tc_calc_xmitsize(hopt->ceil.rate, hopt->cbuffer);