sapling/common/stats
Jasmeet Bagga 9bbee241e6 Change API between SwSwitch and HwSwitch to indicate HwSwitch might fail some
Summary:
Depend on D4492997
Currently, we assume that changes applied to HwSwitch always succeed (or the process exits). There is a case where we want to keep moving despite failures: when we get excessive number of route (probably) because of some misconfiguration. This diff is a step towards taking care of such situation.

We change the interface between SwSwitch and HwSwitch so that HwSwitch, when asked to apply delta of old and new state, returns either the new state if it succeeds, or returns a "pruned version of new state" if some elements of new state it was not able to apply.

SwSwitch now keeps track of two states, a state that has been applied in the hardware, and another one that is desired in hardware. SwSwitch strives to catch applied state to the desired state (while desired state is also changes as move state updates are arriving).

One issue with this diff: Warmboot is not preserving "unapplied" routes, i.e., unapplied routes get lost across warmboots. This will be fixed in a seperate diff.

One naming issue: I thought about keeping SwSwitch::getState() name intact, but thought that it is not a good idea to keep distinction of states opaque to callers. So, decided to change the name.

Reviewed By: ninas

Differential Revision: D4405751

fbshipit-source-id: c933b4418445ae49d5b8e21dea95e437a8e1593d
2017-06-02 13:38:22 -07:00
..
ExportedHistogramMap.h Add fb303 stubs in common/ to support building in the opensource repo 2017-03-17 17:08:05 -07:00
ExportedHistogramMapImpl.h Add fb303 stubs in common/ to support building in the opensource repo 2017-03-17 17:08:05 -07:00
ExportedStatMap.h Add fb303 stubs in common/ to support building in the opensource repo 2017-03-17 17:08:05 -07:00
ExportedStatMapImpl.h Add fb303 stubs in common/ to support building in the opensource repo 2017-03-17 17:08:05 -07:00
MonotonicCounter.h Use normalized names for interface port stats 2017-04-11 07:08:48 -07:00
ServiceData.cpp Add fb303 stubs in common/ to support building in the opensource repo 2017-03-17 17:08:05 -07:00
ServiceData.h Add fb303 stubs in common/ to support building in the opensource repo 2017-03-17 17:08:05 -07:00
ThreadCachedServiceData.h Change API between SwSwitch and HwSwitch to indicate HwSwitch might fail some 2017-06-02 13:38:22 -07:00