netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Nishanth Devarajan <ndev2021@gmail.com>
Cc: stephen@networkplumber.org, netdev@vger.kernel.org,
	doucette@bu.edu, michel.machado@gmail.com
Subject: Re: [PATCH iproute2/net-next v2]tc: B.W limits can now be specified in %.
Date: Wed, 15 Nov 2017 00:13:28 -0800	[thread overview]
Message-ID: <20171115001328.2ef6bf11@cakuba> (raw)
In-Reply-To: <20171115013618.GA19575@gmail.com>

On Wed, 15 Nov 2017 07:06:21 +0530, Nishanth Devarajan wrote:
> This patch adapts the tc command line interface to allow bandwidth limits
> to be specified as a percentage of the interface's capacity.
> 
> For this purpose, we've modified and moved int read_prop() from
> ip/iptuntap.c to lib.utils.c to make it accessible to tc.
> 
> Additionally, adding this functionality requires passing the specified
> device string to each class/qdisc which changes the prototype for a
> couple of functions: the .parse_qopt and .parse_copt interfaces. The
> device string is a required parameter for tc-qdisc and tc-class, and when
> not specified, the kernel returns ENODEV. In this patch, if the user tries
> to specify a bandwidth percentage without naming the device, we return an
> error from userspace.
> 
> Signed-off by: Nishanth Devarajan <ndev2021@gmail.com>

IMHO you need to at least add a big warning in the man page that the
per cent speed means the fraction of *current* speed, and if the speed
changes the value will not be recalculated.

  reply	other threads:[~2017-11-15  8:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15  1:36 [PATCH iproute2/net-next v2]tc: B.W limits can now be specified in % Nishanth Devarajan
2017-11-15  8:13 ` Jakub Kicinski [this message]
2017-11-15 17:58 ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171115001328.2ef6bf11@cakuba \
    --to=jakub.kicinski@netronome.com \
    --cc=doucette@bu.edu \
    --cc=michel.machado@gmail.com \
    --cc=ndev2021@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).