Project

General

Profile

CsMgmt » History » Revision 5

Revision 3 (Junxiao Shi, 12/07/2017 10:03 AM) → Revision 5/20 (Junxiao Shi, 01/09/2018 08:26 AM)

 
 # Content Store Management 

 **Content Store Management** is a module of [[Management|NFD Management protocol]]. 
 It provides commands and datasets about the Content Store and its usage in forwarding. 

 Content Store Management commands and datasets are available under namespace `ndn:/localhost/nfd/cs`. 

 ## Control Commands 

 [[ControlCommand]] **management-module**: `cs` 

 ### Update config 

 **command-verb**: `config` 

 This command updates CS configuration. 
 To discover the current configuration, either retrieve the CS Information Dataset, or send an empty `config` command. 

 ControlParameters fields: 

 * Capacity (optional) 
 * Flags (optional) 
 * Mask (optional) 

 Capacity indicates the maximum number of CS entries. 
 If this field is omitted, the capacity is left unchanged. 

 Flags is an inclusive OR of CS enablement flags. 
 1=CS\_ENABLE\_ADMIT, enables the CS to admit new Data. 
 2=CS\_ENABLE\_SERVE, enables the CS to satisfy Interests using cached Data. 
 The initial value of the CS is CS\_ENABLE\_ADMIT | CS\_ENABLE\_SERVE. 
 If this field is omitted, the enablement settings are left unchanged. 

 Mask field indicates what flags are being updated. 
 The default is 0xFFFFFFFF, updating all flags. 

 If all fields are omitted, the command has no effect but is still considered successful. 

 If the command succeeds, \<Body> (to be defined in ControlResponse block contains updated ControlParameters reflecting current configuration: #4050) 

 * Capacity (required) 
 * Flags (required) 

 Note to future protocol designers: when the CS is extended to have multiple storage tiers (such as RAM and SSD), ControlParameter shall have an optional Name field to indicate the storage tier being configured. 

 ### Erase entry 

 **command-verb**: `erase` 

 (to be defined in #4318) 

 ## CS Information Dataset 

 CS config and runtime performance are published as a [[StatusDataset|Status Dataset]] at `ndn:/localhost/nfd/cs/info`. 

     CsInfo ::= CS-INFO-TYPE TLV-LENGTH 
                  Capacity 
                  Flags 
                  NHits 
                  NMisses 

     (TLVs have nonNegativeInteger as value) 

 Note (additional fields to future protocol designers: in CsInfo element, fields that reflect configuration shall be placed before fields that reflect runtime counters. 

 Note to future protocol designers: when the CS is extended to have multiple storage tiers (such as RAM and SSD), each storage tier shall have separate counters, multiple CsInfo elements appear defined in the dataset and each has a Name field as the first child to indicate the storage tier. #4050) 

 ## CS Enumeration 

 A subset of CS entries can be queried into a [[StatusDataset|Status Dataset]] under `ndn:/localhost/nfd/cs/query`. 

 (to be defined in #4317) 


 ## TLV-TYPE assignments 

 Type                                          | Assigned number     | Assigned number (hex) 
 ------------------------------------------- | ----------------- | --------------------- 
 CsInfo                                        | 128                 | 0x80 
 Capacity                                      | 131                 | 0x83 
 Flags                                         | 108                 | 0x6c 
 NHits                                         | 129                 | 0x81 
 NMisses                                       | 130                 | 0x82