aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorShani Michaeli <shanim@mellanox.com>2015-03-05 13:16:11 -0500
committerDavid S. Miller <davem@davemloft.net>2015-03-06 21:50:02 -0500
commitc93682477bd861744589215515a63b81fdbd8948 (patch)
tree780a1c7bd60b70db558dd89d7fbebf6b582716ba /include/uapi
parent34de26d366ea49d99be633ae389e751fd5d592f5 (diff)
net/dcb: Add IEEE QCN attribute
As specified in 802.1Qau spec. Add this optional attribute to the DCB netlink layer. To allow for application to use the new attribute, NIC drivers should implement and register the callbacks ieee_getqcn, ieee_setqcn and ieee_getqcnstats. The QCN attribute holds a set of parameters for management, and a set of statistics to provide informative data on Congestion-Control defined by this spec. Signed-off-by: Shani Michaeli <shanim@mellanox.com> Signed-off-by: Shachar Raindel <raindel@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Acked-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/dcbnl.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/include/uapi/linux/dcbnl.h b/include/uapi/linux/dcbnl.h
index e711f20dc522..6497d7933d5b 100644
--- a/include/uapi/linux/dcbnl.h
+++ b/include/uapi/linux/dcbnl.h
@@ -78,6 +78,70 @@ struct ieee_maxrate {
78 __u64 tc_maxrate[IEEE_8021QAZ_MAX_TCS]; 78 __u64 tc_maxrate[IEEE_8021QAZ_MAX_TCS];
79}; 79};
80 80
81enum dcbnl_cndd_states {
82 DCB_CNDD_RESET = 0,
83 DCB_CNDD_EDGE,
84 DCB_CNDD_INTERIOR,
85 DCB_CNDD_INTERIOR_READY,
86};
87
88/* This structure contains the IEEE 802.1Qau QCN managed object.
89 *
90 *@rpg_enable: enable QCN RP
91 *@rppp_max_rps: maximum number of RPs allowed for this CNPV on this port
92 *@rpg_time_reset: time between rate increases if no CNMs received.
93 * given in u-seconds
94 *@rpg_byte_reset: transmitted data between rate increases if no CNMs received.
95 * given in Bytes
96 *@rpg_threshold: The number of times rpByteStage or rpTimeStage can count
97 * before RP rate control state machine advances states
98 *@rpg_max_rate: the maxinun rate, in Mbits per second,
99 * at which an RP can transmit
100 *@rpg_ai_rate: The rate, in Mbits per second,
101 * used to increase rpTargetRate in the RPR_ACTIVE_INCREASE
102 *@rpg_hai_rate: The rate, in Mbits per second,
103 * used to increase rpTargetRate in the RPR_HYPER_INCREASE state
104 *@rpg_gd: Upon CNM receive, flow rate is limited to (Fb/Gd)*CurrentRate.
105 * rpgGd is given as log2(Gd), where Gd may only be powers of 2
106 *@rpg_min_dec_fac: The minimum factor by which the current transmit rate
107 * can be changed by reception of a CNM.
108 * value is given as percentage (1-100)
109 *@rpg_min_rate: The minimum value, in bits per second, for rate to limit
110 *@cndd_state_machine: The state of the congestion notification domain
111 * defense state machine, as defined by IEEE 802.3Qau
112 * section 32.1.1. In the interior ready state,
113 * the QCN capable hardware may add CN-TAG TLV to the
114 * outgoing traffic, to specifically identify outgoing
115 * flows.
116 */
117
118struct ieee_qcn {
119 __u8 rpg_enable[IEEE_8021QAZ_MAX_TCS];
120 __u32 rppp_max_rps[IEEE_8021QAZ_MAX_TCS];
121 __u32 rpg_time_reset[IEEE_8021QAZ_MAX_TCS];
122 __u32 rpg_byte_reset[IEEE_8021QAZ_MAX_TCS];
123 __u32 rpg_threshold[IEEE_8021QAZ_MAX_TCS];
124 __u32 rpg_max_rate[IEEE_8021QAZ_MAX_TCS];
125 __u32 rpg_ai_rate[IEEE_8021QAZ_MAX_TCS];
126 __u32 rpg_hai_rate[IEEE_8021QAZ_MAX_TCS];
127 __u32 rpg_gd[IEEE_8021QAZ_MAX_TCS];
128 __u32 rpg_min_dec_fac[IEEE_8021QAZ_MAX_TCS];
129 __u32 rpg_min_rate[IEEE_8021QAZ_MAX_TCS];
130 __u32 cndd_state_machine[IEEE_8021QAZ_MAX_TCS];
131};
132
133/* This structure contains the IEEE 802.1Qau QCN statistics.
134 *
135 *@rppp_rp_centiseconds: the number of RP-centiseconds accumulated
136 * by RPs at this priority level on this Port
137 *@rppp_created_rps: number of active RPs(flows) that react to CNMs
138 */
139
140struct ieee_qcn_stats {
141 __u64 rppp_rp_centiseconds[IEEE_8021QAZ_MAX_TCS];
142 __u32 rppp_created_rps[IEEE_8021QAZ_MAX_TCS];
143};
144
81/* This structure contains the IEEE 802.1Qaz PFC managed object 145/* This structure contains the IEEE 802.1Qaz PFC managed object
82 * 146 *
83 * @pfc_cap: Indicates the number of traffic classes on the local device 147 * @pfc_cap: Indicates the number of traffic classes on the local device
@@ -334,6 +398,8 @@ enum ieee_attrs {
334 DCB_ATTR_IEEE_PEER_PFC, 398 DCB_ATTR_IEEE_PEER_PFC,
335 DCB_ATTR_IEEE_PEER_APP, 399 DCB_ATTR_IEEE_PEER_APP,
336 DCB_ATTR_IEEE_MAXRATE, 400 DCB_ATTR_IEEE_MAXRATE,
401 DCB_ATTR_IEEE_QCN,
402 DCB_ATTR_IEEE_QCN_STATS,
337 __DCB_ATTR_IEEE_MAX 403 __DCB_ATTR_IEEE_MAX
338}; 404};
339#define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1) 405#define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1)