aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorShmulik Ravid <shmulikr@broadcom.com>2010-12-30 01:26:55 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-31 13:50:54 -0500
commitea45fe4e176a42d2396878f530cfdc8265bef37b (patch)
treebf4d4b035223b3e315fcdabf814398766482fb58 /include/linux
parent6241b6259b16aa390ff4bf50f520685b3801200b (diff)
dcbnl: adding DCBX feature flags get-set
Adding a pair of set-get routines to dcbnl for setting the negotiation flags of the various DCB features. Conforms to the CEE flavor of DCBX The user sets these flags (enable, advertise, willing) for each feature to be used by the DCBX engine. The 'get' routine returns which of the features is enabled after the negotiation. This patch is dependent on the following patches: [net-next-2.6 PATCH 1/3] dcbnl: add support for ieee8021Qaz attributes [net-next-2.6 PATCH 2/3] dcbnl: add appliction tlv handlers [net-next-2.6 PATCH 3/3] net_dcb: add application notifiers Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dcbnl.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h
index 16eea36d8934..68cd248f6d3e 100644
--- a/include/linux/dcbnl.h
+++ b/include/linux/dcbnl.h
@@ -137,6 +137,8 @@ struct dcbmsg {
137 * @DCB_CMD_IEEE_GET: get IEEE 802.1Qaz configuration 137 * @DCB_CMD_IEEE_GET: get IEEE 802.1Qaz configuration
138 * @DCB_CMD_GDCBX: get DCBX engine configuration 138 * @DCB_CMD_GDCBX: get DCBX engine configuration
139 * @DCB_CMD_SDCBX: set DCBX engine configuration 139 * @DCB_CMD_SDCBX: set DCBX engine configuration
140 * @DCB_CMD_GFEATCFG: get DCBX features flags
141 * @DCB_CMD_SFEATCFG: set DCBX features negotiation flags
140 */ 142 */
141enum dcbnl_commands { 143enum dcbnl_commands {
142 DCB_CMD_UNDEFINED, 144 DCB_CMD_UNDEFINED,
@@ -176,6 +178,9 @@ enum dcbnl_commands {
176 DCB_CMD_GDCBX, 178 DCB_CMD_GDCBX,
177 DCB_CMD_SDCBX, 179 DCB_CMD_SDCBX,
178 180
181 DCB_CMD_GFEATCFG,
182 DCB_CMD_SFEATCFG,
183
179 __DCB_CMD_ENUM_MAX, 184 __DCB_CMD_ENUM_MAX,
180 DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1, 185 DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1,
181}; 186};
@@ -197,6 +202,7 @@ enum dcbnl_commands {
197 * @DCB_ATTR_BCN: backward congestion notification configuration (NLA_NESTED) 202 * @DCB_ATTR_BCN: backward congestion notification configuration (NLA_NESTED)
198 * @DCB_ATTR_IEEE: IEEE 802.1Qaz supported attributes (NLA_NESTED) 203 * @DCB_ATTR_IEEE: IEEE 802.1Qaz supported attributes (NLA_NESTED)
199 * @DCB_ATTR_DCBX: DCBX engine configuration in the device (NLA_U8) 204 * @DCB_ATTR_DCBX: DCBX engine configuration in the device (NLA_U8)
205 * @DCB_ATTR_FEATCFG: DCBX features flags (NLA_NESTED)
200 */ 206 */
201enum dcbnl_attrs { 207enum dcbnl_attrs {
202 DCB_ATTR_UNDEFINED, 208 DCB_ATTR_UNDEFINED,
@@ -218,6 +224,7 @@ enum dcbnl_attrs {
218 DCB_ATTR_IEEE, 224 DCB_ATTR_IEEE,
219 225
220 DCB_ATTR_DCBX, 226 DCB_ATTR_DCBX,
227 DCB_ATTR_FEATCFG,
221 228
222 __DCB_ATTR_ENUM_MAX, 229 __DCB_ATTR_ENUM_MAX,
223 DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1, 230 DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1,
@@ -506,4 +513,30 @@ enum dcbnl_app_attrs {
506 DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1, 513 DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1,
507}; 514};
508 515
516/**
517 * enum dcbnl_featcfg_attrs - features conifiguration flags
518 *
519 * @DCB_FEATCFG_ATTR_UNDEFINED: unspecified attribute to catch errors
520 * @DCB_FEATCFG_ATTR_ALL: (NLA_FLAG) all features configuration attributes
521 * @DCB_FEATCFG_ATTR_PG: (NLA_U8) configuration flags for priority groups
522 * @DCB_FEATCFG_ATTR_PFC: (NLA_U8) configuration flags for priority
523 * flow control
524 * @DCB_FEATCFG_ATTR_APP: (NLA_U8) configuration flags for application TLV
525 *
526 */
527#define DCB_FEATCFG_ERROR 0x01 /* error in feature resolution */
528#define DCB_FEATCFG_ENABLE 0x02 /* enable feature */
529#define DCB_FEATCFG_WILLING 0x04 /* feature is willing */
530#define DCB_FEATCFG_ADVERTISE 0x08 /* advertise feature */
531enum dcbnl_featcfg_attrs {
532 DCB_FEATCFG_ATTR_UNDEFINED,
533 DCB_FEATCFG_ATTR_ALL,
534 DCB_FEATCFG_ATTR_PG,
535 DCB_FEATCFG_ATTR_PFC,
536 DCB_FEATCFG_ATTR_APP,
537
538 __DCB_FEATCFG_ATTR_ENUM_MAX,
539 DCB_FEATCFG_ATTR_MAX = __DCB_FEATCFG_ATTR_ENUM_MAX - 1,
540};
541
509#endif /* __LINUX_DCBNL_H__ */ 542#endif /* __LINUX_DCBNL_H__ */