Project

General

Profile

Feature #1941

Updated by Junxiao Shi over 9 years ago

Currently, FIB updates are generated by `RibManager` class. This is semantically incorrect, because `RibManager`'s responsibility is to accept RIB register/unregister commands, while FIB updates can result from not only RIB register/unregister commands, but also Route expiration. 

 This Task is to implement the [proposed design](http://www.lists.cs.ucla.edu/mailman/private/nfd-dev/2014-June/000217.html): send FIB updates from a separate `FibUpdater` module, and trigger FIB updates from a `RibUpdateBatch`. 
 This design has been [approved and clarified](http://www.lists.cs.ucla.edu/mailman/private/nfd-dev/2014-June/000224.html). 

 ## Design 

 RibManager updates the RIB only; it does not directly update the FIB. 

 **RIB updates are batched**. A batch of RIB updates is packaged into a RibUpdateBatch object. All RIB updates in the same RibUpdateBatch object must refer to the same face.   
 When RibManager receives one or more RIB updates, it generates a RibUpdateBatch, and passes it to Rib::beginApplyUpdate() to begin the RIB 
 update procedure.   
 When one or more Route expires, the RIB itself generates a RibUpdateBatch, and begin the RIB update procedure.   
 Note: before #1698, RibUpdateBatch may contain only one RIB update. 

 The **RIB update procedure has admission control**: if a previous RibUpdateBatch is in progress, the new batch will be put in a queue until 
 the previous batch is complete.   
 To apply a batch of RIB updates, the current collection of RIB entries and the RibUpdateBatch are passed to FibUpdater component to compute the optimal set of FIB updates, and the FibUpdater component shall send these FIB updates. 

   
 **If any FIB update fails**,   
 (a) in case of a non-recoverable error (eg. signing key of RIB Daemon is not trusted, more than 10 timeouts for trusted), the same command), the RIB Daemon shall crash;   
 (b) in case of a non-existent face error of error, the same face, the RibUpdateBatch is abandoned;   
 (c) in case of a non-existent face error of a different face, the FIB update is skipped;   
 (d) in other cases (eg. timeout), cases, the FIB update is retried. 

   
 If the RibUpdateBatch is abandoned, the RIB is unchanged; otherwise, after all FIB updates are successful, the RIB entries are updated. 

 For a prefix registration request from application, the RibManager should pass a callback to `Rib::beginApplyUpdate`, Rib::beginApplyUpdate, which is called after all FIB updates are successful and the RIB is updated. The called function can respond to the prefix registration request(s) that generate this RibUpdateBatch. request.   
 For routing updates, the RibManager can respond with "100 continue" or similar code right away without waiting for FIB updates to complete. 

Back