Project

General

Profile

CsMgmt » History » Version 7

Junxiao Shi, 01/21/2018 10:21 AM

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
* Capacity (optional)
23
* Flags (optional)
24
* Mask (optional)
25
26
Capacity indicates the maximum number of CS entries.
27
If this field is omitted, the capacity is left unchanged.
28
29
Flags is an inclusive OR of CS enablement flags.
30
1=CS\_ENABLE\_ADMIT, enables the CS to admit new Data.
31
2=CS\_ENABLE\_SERVE, enables the CS to satisfy Interests using cached Data.
32
The initial value of the CS is CS\_ENABLE\_ADMIT | CS\_ENABLE\_SERVE.
33
If this field is omitted, the enablement settings are left unchanged.
34
35
Mask field indicates what flags are being updated.
36
The default is 0xFFFFFFFF, updating all flags.
37
38
If all fields are omitted, the command has no effect but is still considered successful.
39
40
If the command succeeds, \<Body> in ControlResponse block contains updated ControlParameters reflecting current configuration:
41
42
* Capacity (required)
43
* Flags (required)
44
45
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.
46
47 1 Junxiao Shi
### Erase entry
48
49
**command-verb**: `erase`
50
51
(to be defined in #4318)
52
53
## CS Information Dataset
54
55
CS config and runtime performance are published as a [[StatusDataset|Status Dataset]] at `ndn:/localhost/nfd/cs/info`.
56 3 Junxiao Shi
57 1 Junxiao Shi
    CsInfo ::= CS-INFO-TYPE TLV-LENGTH
58 5 Junxiao Shi
                 Capacity
59
                 Flags
60 7 Junxiao Shi
                 NCsEntries
61 3 Junxiao Shi
                 NHits
62 1 Junxiao Shi
                 NMisses
63 2 Junxiao Shi
64 1 Junxiao Shi
    (TLVs have nonNegativeInteger as value)
65
66 5 Junxiao Shi
Note to future protocol designers: in CsInfo element, fields that reflect configuration shall be placed before fields that reflect runtime counters.
67 1 Junxiao Shi
68 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.
69
70 1 Junxiao Shi
## CS Enumeration
71
72
A subset of CS entries can be queried into a [[StatusDataset|Status Dataset]] under `ndn:/localhost/nfd/cs/query`.
73
74 6 Yanbiao Li
    CsQuery ::= CS-QUERY-TYPE TLV-LENGTH
75
                    Name
76
                    PacketSize
77
                    FreshnessPeriod
78 1 Junxiao Shi
79 6 Yanbiao Li
    (TLVs have nonNegativeInteger as value)
80 2 Junxiao Shi
81
## TLV-TYPE assignments
82
83
Type                                        | Assigned number   | Assigned number (hex)
84 1 Junxiao Shi
------------------------------------------- | ----------------- | ---------------------
85
CsInfo                                      | 128               | 0x80
86 5 Junxiao Shi
Capacity                                    | 131               | 0x83
87
Flags                                       | 108               | 0x6c
88 7 Junxiao Shi
NCsEntries                                  | 135               | 0x87
89 2 Junxiao Shi
NHits                                       | 129               | 0x81
90
NMisses                                     | 130               | 0x82