Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
This document provides a brief description of the Priority-based Flow Control OpEN API. Priority-based Flow Control (PFC) is defined by 802.1Qbb. it is a flow-control mechanism that allows frames to be paused based on their priority. specifies enhancement of transmission selection to support allocation of bandwidth amongst traffic classes. Should a given traffic class not use all of its allocated bandwidth, ETS allows that bandwidth to be used by other traffic classes.
THE API provides the following services:
pfc_example.c is a sample application that exercises the APIs provided by the PFC OpEN APIs.
./pfc_example [-p priority] [-m [enable | disable]] [-d | -n] [-c] -i iface
-p priority – priority (used by -d and -n commands)
-m [enable | disable] – enable or disable pfc on an interface
-d | -n – drop (-d) or nodrop (-n) at the given priority on an interface (requires -p)
-i iface – interface id (required argument)
-c – clear the PFC stats on an interface
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.
The mapping between the OpEN APIs and CLI commands is shown below.
CLI Command | OpEN API Functions
--------------------------------------—