Credit-based algorithm

To constrain the CPU resources consumed processing control channel status messages, the system should implement a credit-based mechanism. If a user enables control channel status on a PW[n], a certain number of credits (c_n) are consumed from a CPM-wide pool of max_credit credits. The number of credits consumed is inversely proportional to the configured refresh timer (the first three messages at 1 s intervals do not count against the credit). If the current_credit <= 0, the control channel status signaling cannot be configured on a PW (but the PW can still be configured, and no shutdown).

The following is an example algorithm:

If refresh timer > 0, c_n = 65535 / refresh_timer

Else c_n = 0.

For n=1, current_credit[n] = max_credits – c_n

Else current_credit [n] = current_credit [n-1] – c_n

By default, if a PE with a non-zero refresh timer configured does not receive control channel status refresh messages for 3.5 times the specified timer value, the PE will time out and assume a PW status of zero. A proprietary optional extension to the [RFC6478] protocol should be implemented to enable a node to resolve such a stale PW status condition by requesting the status from the far-end node in certain cases.