summaryrefslogtreecommitdiffstats
path: root/include/linux/dcbnl.h
diff options
context:
space:
mode:
authorAmir Vadai <amirv@mellanox.com>2012-04-04 21:33:30 +0000
committerDavid S. Miller <davem@davemloft.net>2012-04-05 05:08:04 -0400
commit08f10affe45051e18e0d8291c0a53aecef1b8a14 (patch)
tree0f18aa6f7d3885f695dfe5ad876363afe03ce6a6 /include/linux/dcbnl.h
parent366cddb4028858079a9a8145bd713c13a9edb3dc (diff)
downloadop-kernel-dev-08f10affe45051e18e0d8291c0a53aecef1b8a14.zip
op-kernel-dev-08f10affe45051e18e0d8291c0a53aecef1b8a14.tar.gz
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>
Diffstat (limited to 'include/linux/dcbnl.h')
-rw-r--r--include/linux/dcbnl.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h
index 65a2562..6bb4338 100644
--- a/include/linux/dcbnl.h
+++ b/include/linux/dcbnl.h
@@ -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)
OpenPOWER on IntegriCloud