lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4F7B0B9A.2050603@intel.com>
Date:	Tue, 03 Apr 2012 07:39:22 -0700
From:	John Fastabend <john.r.fastabend@...el.com>
To:	Amir Vadai <amirv@...lanox.com>
CC:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	Roland Dreier <roland@...estorage.com>,
	Yevgeny Petrilin <yevgenyp@...lanox.com>,
	Oren Duer <oren@...lanox.com>,
	Amir Vadai <amirv@....mellanox.co.il>
Subject: Re: [PATCH net-next V5 7/8] net/dcb: Add an optional max rate attribute

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@...lanox.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
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ