Project

General

Profile

CsMgmt » History » Version 8

Junxiao Shi, 01/21/2018 04:47 PM

1 5 Junxiao Shi
2 1 Junxiao Shi
# Content Store Management
3
4
**Content Store Management** is a module of [[Management|NFD Management protocol]].
5
It provides commands and datasets about the Content Store and its usage in forwarding.
6
7
Content Store Management commands and datasets are available under namespace `ndn:/localhost/nfd/cs`.
8
9
## Control Commands
10
11 2 Junxiao Shi
[[ControlCommand]] **management-module**: `cs`
12 1 Junxiao Shi
13
### Update config
14
15
**command-verb**: `config`
16
17 5 Junxiao Shi
This command updates CS configuration.
18
To discover the current configuration, either retrieve the CS Information Dataset, or send an empty `config` command.
19 1 Junxiao Shi
20 5 Junxiao Shi
ControlParameters fields:
21
22 8 Junxiao Shi
* Capacity (optional): maximum number of CS entries.
23
* Flags (optional): CS enablement flags (see below).
24
* **Mask** (optional): must be specified if Flags is present, or omitted if Flags is omitted.
25 5 Junxiao Shi
26
Flags is an inclusive OR of CS enablement flags.
27
1=CS\_ENABLE\_ADMIT, enables the CS to admit new Data.
28
2=CS\_ENABLE\_SERVE, enables the CS to satisfy Interests using cached Data.
29
The initial value of the CS is CS\_ENABLE\_ADMIT | CS\_ENABLE\_SERVE.
30
31
If all fields are omitted, the command has no effect but is still considered successful.
32
33
If the command succeeds, \<Body> in ControlResponse block contains updated ControlParameters reflecting current configuration:
34
35
* Capacity (required)
36
* Flags (required)
37
38
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.
39
40 1 Junxiao Shi
### Erase entry
41
42
**command-verb**: `erase`
43
44
(to be defined in #4318)
45
46
## CS Information Dataset
47
48
CS config and runtime performance are published as a [[StatusDataset|Status Dataset]] at `ndn:/localhost/nfd/cs/info`.
49 3 Junxiao Shi
50 1 Junxiao Shi
    CsInfo ::= CS-INFO-TYPE TLV-LENGTH
51 5 Junxiao Shi
                 Capacity
52
                 Flags
53 7 Junxiao Shi
                 NCsEntries
54 3 Junxiao Shi
                 NHits
55 1 Junxiao Shi
                 NMisses
56 2 Junxiao Shi
57 1 Junxiao Shi
    (TLVs have nonNegativeInteger as value)
58
59 5 Junxiao Shi
Note to future protocol designers: in CsInfo element, fields that reflect configuration shall be placed before fields that reflect runtime counters.
60 1 Junxiao Shi
61 5 Junxiao Shi
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 in the dataset and each has a Name field as the first child to indicate the storage tier.
62
63 1 Junxiao Shi
## CS Enumeration
64
65
A subset of CS entries can be queried into a [[StatusDataset|Status Dataset]] under `ndn:/localhost/nfd/cs/query`.
66
67 6 Yanbiao Li
    CsQuery ::= CS-QUERY-TYPE TLV-LENGTH
68
                    Name
69
                    PacketSize
70
                    FreshnessPeriod
71 1 Junxiao Shi
72 6 Yanbiao Li
    (TLVs have nonNegativeInteger as value)
73 2 Junxiao Shi
74
## TLV-TYPE assignments
75
76
Type                                        | Assigned number   | Assigned number (hex)
77 1 Junxiao Shi
------------------------------------------- | ----------------- | ---------------------
78
CsInfo                                      | 128               | 0x80
79 5 Junxiao Shi
Capacity                                    | 131               | 0x83
80
Flags                                       | 108               | 0x6c
81 7 Junxiao Shi
NCsEntries                                  | 135               | 0x87
82 2 Junxiao Shi
NHits                                       | 129               | 0x81
83
NMisses                                     | 130               | 0x82