[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150316.155309.890032766051959784.davem@davemloft.net>
Date: Mon, 16 Mar 2015 15:53:09 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: ogerlitz@...lanox.com
Cc: john.r.fastabend@...el.com, netdev@...r.kernel.org,
amirv@...lanox.com, idos@...lanox.com
Subject: Re: [PATCH net-next V2 1/3] net: Add max rate tx queue attribute
From: Or Gerlitz <ogerlitz@...lanox.com>
Date: Sun, 15 Mar 2015 15:03:14 +0200
> From: John Fastabend <john.r.fastabend@...el.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@...el.com>
> Signed-off-by: Or Gerlitz <ogerlitz@...lanox.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists