mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
net/dcb: Add an optional max rate attribute
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> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
366cddb402
commit
08f10affe4
3 changed files with 34 additions and 0 deletions
|
|
@ -67,6 +67,17 @@ struct ieee_ets {
|
|||
__u8 reco_prio_tc[IEEE_8021QAZ_MAX_TCS];
|
||||
};
|
||||
|
||||
/* This structure contains rate limit extension to the IEEE 802.1Qaz ETS
|
||||
* managed object.
|
||||
* Values are 64 bits long and specified in Kbps to enable usage over both
|
||||
* slow and very fast networks.
|
||||
*
|
||||
* @tc_maxrate: maximal tc tx bandwidth indexed by traffic class
|
||||
*/
|
||||
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 +332,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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue