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]
Date:	Wed, 4 Apr 2012 17:39:51 -0700
From:	Dave Taht <dave.taht@...il.com>
To:	John Fastabend <john.r.fastabend@...el.com>
Cc:	Amir Vadai <amirv@...lanox.com>, Or Gerlitz <or.gerlitz@...il.com>,
	"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 V6 7/8] net/dcb: Add an optional max rate attribute

(I try not to pay too much attention to the DCB stuff as it gives me nightmares)

It would comfort me to know if or which of:

Is 802.1au being implemented?

802.3bd?

There was some other standard involving active queue management at
this layer that I can't remember the alphabet soup for that must be
dead in the water at this point..

http://www.ieee802.org/1/files/public/docs2009/au-yasuda-10G-QCN-Implementation-1109.pdf


On Wed, Apr 4, 2012 at 5:23 PM, John Fastabend
<john.r.fastabend@...el.com> wrote:
> On 4/4/2012 3:58 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>
>> ---
>
> Or, Amir,
>
> Two more comments inline really just minor nit picks but if your going
> to roll new patch mind as well. I'll ack a patch with these changes.
>
>>  include/linux/dcbnl.h |    5 +++++
>>  include/net/dcbnl.h   |    2 ++
>>  net/dcb/dcbnl.c       |   21 +++++++++++++++++++++
>>  3 files changed, 28 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h
>> index 65a2562..ec8e372 100644
>> --- a/include/linux/dcbnl.h
>> +++ b/include/linux/dcbnl.h
>> @@ -67,6 +67,10 @@ struct ieee_ets {
>>       __u8    reco_prio_tc[IEEE_8021QAZ_MAX_TCS];
>>  };
>>
>
> annotate ieee_maxrate so implementers use it correctly per previous note.
>
>> +struct ieee_maxrate {
>> +     __u64   tc_maxrate[IEEE_8021QAZ_MAX_TCS];
>> +};
>> +
>>  /* This structure contains the IEEE 802.1Qaz PFC managed object
>>   *
>>   * @pfc_cap: Indicates the number of traffic classes on the local device
>> @@ -321,6 +325,7 @@ enum ieee_attrs {
>>       DCB_ATTR_IEEE_PEER_ETS,
>>       DCB_ATTR_IEEE_PEER_PFC,
>>       DCB_ATTR_IEEE_PEER_APP,
>> +     DCB_ATTR_IEEE_MAXRATE,
>>       __DCB_ATTR_IEEE_MAX
>>  };
>>  #define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1)
>> diff --git a/include/net/dcbnl.h b/include/net/dcbnl.h
>> index f55c980..fc5d5dc 100644
>> --- a/include/net/dcbnl.h
>> +++ b/include/net/dcbnl.h
>> @@ -48,6 +48,8 @@ struct dcbnl_rtnl_ops {
>>       /* IEEE 802.1Qaz std */
>>       int (*ieee_getets) (struct net_device *, struct ieee_ets *);
>>       int (*ieee_setets) (struct net_device *, struct ieee_ets *);
>> +     int (*ieee_getmaxrate) (struct net_device *, struct ieee_maxrate *);
>> +     int (*ieee_setmaxrate) (struct net_device *, struct ieee_maxrate *);
>>       int (*ieee_getpfc) (struct net_device *, struct ieee_pfc *);
>>       int (*ieee_setpfc) (struct net_device *, struct ieee_pfc *);
>>       int (*ieee_getapp) (struct net_device *, struct dcb_app *);
>> diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
>> index 36f37af..d3df048 100644
>> --- a/net/dcb/dcbnl.c
>> +++ b/net/dcb/dcbnl.c
>> @@ -178,6 +178,8 @@ static const struct nla_policy dcbnl_ieee_policy[DCB_ATTR_IEEE_MAX + 1] = {
>>       [DCB_ATTR_IEEE_ETS]         = {.len = sizeof(struct ieee_ets)},
>>       [DCB_ATTR_IEEE_PFC]         = {.len = sizeof(struct ieee_pfc)},
>>       [DCB_ATTR_IEEE_APP_TABLE]   = {.type = NLA_NESTED},
>> +     [DCB_ATTR_IEEE_MAXRATE]   = {.len = sizeof(struct ieee_maxrate)},
>> +
>
> spurious newline remove it
>
>>  };
>>
>>  static const struct nla_policy dcbnl_ieee_app[DCB_ATTR_IEEE_APP_MAX + 1] = {
>> @@ -1246,6 +1248,17 @@ static int dcbnl_ieee_fill(struct sk_buff *skb, struct net_device *netdev)
>>                       goto nla_put_failure;
>>       }
>>
>> +     if (ops->ieee_getmaxrate) {
>> +             struct ieee_maxrate maxrate;
>> +             err = ops->ieee_getmaxrate(netdev, &maxrate);
>> +             if (!err) {
>> +                     err = nla_put(skb, DCB_ATTR_IEEE_MAXRATE,
>> +                                     sizeof(maxrate), &maxrate);
>
> align sizeof with skb
>
> 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



-- 
Dave Täht
SKYPE: davetaht
US Tel: 1-239-829-5608
http://www.bufferbloat.net
--
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