sapling/common
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
..
fb303 codemod: format TARGETS with buildifier [3/5] (D5092623) 2017-06-01 16:51:16 -07:00
network/if Do not set default value for ifName 2017-04-21 22:49:35 -07:00
stats Change API between SwSwitch and HwSwitch to indicate HwSwitch might fail some 2017-06-02 13:38:22 -07:00
README.md Add fb303 stubs in common/ to support building in the opensource repo 2017-03-17 17:08:05 -07:00

This directory mostly contains stub implementations of Facebook libraries that are not fully open source yet. These stubs allow the FBOSS code to build while we are still working on fully open sourcing these libraries.

The code in common/stats is the main piece that is not fully open source yet. We are working to eventually make all of this code available in the facebook/folly repository.