Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Data Center Discovery and Capability Exchange Protocol (DCBX)

Data Center Discovery and Capability (DCBX) OpEN API

This document provides a brief description of the Data Center Discovery and Capability Protocol (DCBX) OpEN API. DCBX is a protocol used for conveying capabilities and configuration of ETS and PFC features. This is done amongst neighboring peers to ensure consistent network configuration.

THE API provides the following services:

Example C Application dcbx_example

dcbx_example.c is a sample application that exercises the APIs provided by the DCBX OpEN APIs.

./dcbx_example [-a appIndex] [-r role] [-v version] [-c caps] -i interface
-a appIndex – application index (openapiDcbxAppPriTableGet, default 0)
-r role – set port role. Use one of the following to specify the role:
1: OPEN_DCBX_PORT_ROLE_MANUAL
2: OPEN_DCBX_PORT_ROLE_AUTO_UPSTREAM
3: OPEN_DCBX_PORT_ROLE_AUTO_DOWNSTREAM
4: OPEN_DCBX_PORT_ROLE_AUTO_CFG_SRC
-v version – set version. Use one of the following to specify the version:
1: OPEN_DCBX_AUTO
2: OPEN_DCBX_IEEE
3: OPEN_DCBX_CIN
4: OPEN_DCBX_CEE
-c caps – set capabilities. Argument must be a base 10 integer that contains a bitmask of the following values:
1: OPEN_DCBX_CAP_PFC_BITMASK
2: OPEN_DCBX_CAP_ETS_CFG_BITMASK
4: OPEN_DCBX_CAP_ETS_REC_BITMASK
8: OPEN_DCBX_CAP_APP_PRI_BITMASK
16: OPEN_DCBX_CAP_CONTROL_BITMASK
-i interface – interface id (required argument)

Initialization

In the main function, the sample application initializes the OpEN API RPC service by calling openapiClientRegister() and waits for the RPC service in switchdrvr to start. A Client Handle is returned by openapiClientRegister() which is used while invoking the OpEN APIs. The application then exercises the associated OpEN APIs and logs informational and/or error messages on the console. The example application runs to its completion and exits. A minimal run uses the -i argument to specify an interface. The various data about that interface (for each supported priority) is output by the application.

DCBX CLI/API Cross Reference

The mapping between the OpEN APIs and CLI commands is shown below.

CLI Command | OpEN API Functions
--------------------------------------—

show lldp tlv-select interface {all | <u/s/p> [detail]} | openapiDcbxPortConfigTLVsEnabledGet

lldp dcbx version | openapiDcbxVersionSet

lldp dcbx port-role | openapiDcbxAutoCfgPortRoleSet

lldp tlv-select dcbxp | DcbxPortConfigTLVsEnabledGet, DcbxPortConfigTLVsEnabledset

show lldp dcbx interface {all status| <u/s/p> [detail]} | openapiDcbxCfgSrcGet, openapiDcbxOperStatusGet, openapiDcbxAutoCfgPortRoleGet, openapiDcbxVersionGet, openapiDcbxPeerVersionGet, openapiDcbxCounterGet, openapiDcbxPeerMacGet, openapiDcbxPeerDescGet, openapiDcbxIsValidIntf, openapiDcbxAutoCfgPortRoleGet, openapiDcbxIntfIsCfgSrcGet, openapiDcbxTimedOutAndMultiPeerCountGet, openapiDcbxPortOperationalModeGet, openapiDcbxPeerTlvMaskGet, openapiDcbxPortLegacyRemOperVerGet, openapiDcbxPortLegacyRemMaxVerGet, openapiDcbxPortLegacyRemSeqNumGet, openapiDcbxPortLegacyRemRcvdAckNumGet, openapiDcbxPortWillingGet, openapiDcbxLocalEtsSchedGet, openapiDcbxLocalEtsBwGet, openapiDcbxAppPriTableGet, openapiDcbxPeerAppPriTableGet

show interface priority-flow-control | openapiIfPfcStatusGet, openapiIfPfcModeGet, openapiIfPfcPriorityModeGet, openapiPfcOprPriorityModeGet, openapiPfcOperLinkDelayAllowanceGet, openapiPfcPeerCfgCompatibleGet, openapiPfcPeerCompatibleCfgCountGet, openapiPfcPeerIncompatibleCfgCountGet, openapiIfPfcRxPriorityStatGet, openapiPfcTxPriorityStatGet, openapiIfPfcRxStatGet, openapiIfPfcTxStatGet