From: David Miller <davem@davemloft.net>
To: ogerlitz@mellanox.com
Cc: john.r.fastabend@intel.com, netdev@vger.kernel.org,
amirv@mellanox.com, idos@mellanox.com
Subject: Re: [PATCH net-next V2 1/3] net: Add max rate tx queue attribute
Date: Mon, 16 Mar 2015 15:53:09 -0400 (EDT) [thread overview]
Message-ID: <20150316.155309.890032766051959784.davem@davemloft.net> (raw)
In-Reply-To: <1426424596-3911-2-git-send-email-ogerlitz@mellanox.com>
From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Sun, 15 Mar 2015 15:03:14 +0200
> From: John Fastabend <john.r.fastabend@intel.com>
>
> This adds a tx_maxrate attribute to the tx queue sysfs entry allowing
> for max-rate limiting. Along with DCB-ETS and BQL this provides another
> knob to tune queue performance. The limit units are Mbps.
>
> By default it is disabled. To disable the rate limitation after it
> has been set for a queue, it should be set to zero.
>
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
> ---
> include/linux/netdevice.h | 9 ++++++
> net/core/net-sysfs.c | 67 +++++++++++++++++++++++++++++++++++++--------
> 2 files changed, 64 insertions(+), 12 deletions(-)
>
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index ddab1a2..0719307 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -587,6 +587,7 @@ struct netdev_queue {
> #ifdef CONFIG_BQL
> struct dql dql;
> #endif
> + unsigned long tx_maxrate;
> } ____cacheline_aligned_in_smp;
>
> static inline int netdev_queue_numa_node_read(const struct netdev_queue *q)
> @@ -1025,6 +1026,11 @@ struct fib_info;
> * the set of features that the stack has calculated and it returns
> * those the driver believes to be appropriate.
> *
> + * int (*ndo_set_tx_maxrate)(struct net_device *dev,
> + int queue_index,
> + u32 maxrate);
> + * Called when a user wants to set a max-rate limitation of specific
> + * TX queue.
Every comment line you add should start with a "*" just like the rest
of the comment does.
You'll also need to re-spin this against net-next as the swdev_ops changes
that went in recently conflict.
Thanks.
next prev parent reply other threads:[~2015-03-16 19:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-15 13:03 [PATCH net-next V2 0/3] Add max rate TXQ attribute Or Gerlitz
2015-03-15 13:03 ` [PATCH net-next V2 1/3] net: Add max rate tx queue attribute Or Gerlitz
2015-03-16 19:53 ` David Miller [this message]
2015-03-15 13:03 ` [PATCH net-next V2 2/3] net/mlx4_core: Add basic support for QP max-rate limiting Or Gerlitz
2015-03-15 13:03 ` [PATCH net-next V2 3/3] net/mlx4_en: Add tx queue maxrate support Or Gerlitz
2015-03-15 17:08 ` [PATCH net-next V2 0/3] Add max rate TXQ attribute Tom Herbert
2015-03-15 21:10 ` Or Gerlitz
2015-03-16 19:50 ` David Miller
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=20150316.155309.890032766051959784.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=amirv@mellanox.com \
--cc=idos@mellanox.com \
--cc=john.r.fastabend@intel.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
/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).