From: John Fastabend <john.r.fastabend@intel.com>
To: Amir Vadai <amirv@mellanox.com>
Cc: "David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, Roland Dreier <roland@purestorage.com>,
Yevgeny Petrilin <yevgenyp@mellanox.com>,
Oren Duer <oren@mellanox.com>,
Amir Vadai <amirv@dev.mellanox.co.il>
Subject: Re: [PATCH net-next V5 7/8] net/dcb: Add an optional max rate attribute
Date: Tue, 03 Apr 2012 07:39:22 -0700 [thread overview]
Message-ID: <4F7B0B9A.2050603@intel.com> (raw)
In-Reply-To: <1333451407-5293-8-git-send-email-amirv@mellanox.com>
On 4/3/2012 4:10 AM, Amir Vadai wrote:
> Although not specified in 8021Qaz spec, it could be useful to enable drivers
> whose HW supports setting a rate limit for an ETS TC. This patch adds this
> optional attribute to DCB netlink. To use it, drivers should implement and
> register the callbacks ieee_setmaxrate and ieee_getmaxrate. The units are 64
> bits long and specified in Kbps to enable usage over both slow and very fast
> networks.
>
> Signed-off-by: Amir Vadai <amirv@mellanox.com>
> ---
[...]
>
> static const struct nla_policy dcbnl_ieee_app[DCB_ATTR_IEEE_APP_MAX + 1] = {
> @@ -1243,6 +1245,14 @@ static int dcbnl_ieee_fill(struct sk_buff *skb, struct net_device *netdev)
> NLA_PUT(skb, DCB_ATTR_IEEE_ETS, sizeof(ets), &ets);
> }
>
> + if (ops->ieee_getmaxrate) {
> + struct ieee_maxrate maxrate;
> + err = ops->ieee_getmaxrate(netdev, &maxrate);
> + if (!err)
> + NLA_PUT(skb, DCB_ATTR_IEEE_MAXRATE, sizeof(maxrate),
> + &maxrate);
Don't use the NLA_PUT macros anymore they are error prone use nla_put(). Dave
has a series to remove these no point in adding more.
Thanks,
John
next prev parent reply other threads:[~2012-04-03 14:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-03 11:09 [PATCH net-next V5 0/8] net/mlx4_en: DCB QoS support Amir Vadai
2012-04-03 11:10 ` [PATCH net-next V5 1/8] net/mlx4_en: Force user priority by QP attribute Amir Vadai
2012-04-03 11:10 ` [PATCH net-next V5 2/8] net/mlx4_core: set port QoS attributes Amir Vadai
2012-04-03 11:10 ` [PATCH net-next V5 3/8] net/mlx4_en: DCB QoS support Amir Vadai
2012-04-03 11:10 ` [PATCH net-next V5 4/8] net/mlx4_en: sk_prio <=> UP for untagged traffic Amir Vadai
2012-04-03 11:10 ` [PATCH net-next V5 5/8] net/route: export symbol ip_tos2prio Amir Vadai
2012-04-03 11:10 ` [PATCH net-next V5 6/8] IB/rdma_cm: TOS <=> UP mapping for IBoE Amir Vadai
2012-04-03 11:10 ` [PATCH net-next V5 7/8] net/dcb: Add an optional max rate attribute Amir Vadai
2012-04-03 14:39 ` John Fastabend [this message]
2012-04-03 11:10 ` [PATCH net-next V5 8/8] net/mlx4_en: Set max rate-limit for a TC Amir Vadai
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=4F7B0B9A.2050603@intel.com \
--to=john.r.fastabend@intel.com \
--cc=amirv@dev.mellanox.co.il \
--cc=amirv@mellanox.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=oren@mellanox.com \
--cc=roland@purestorage.com \
--cc=yevgenyp@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).