Project

General

Profile

CsMgmt » History » Version 5

Junxiao Shi, 01/09/2018 08:26 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 3 Junxiao Shi
                 NHits
61 1 Junxiao Shi
                 NMisses
62 2 Junxiao Shi
63 1 Junxiao Shi
    (TLVs have nonNegativeInteger as value)
64
65 5 Junxiao Shi
Note to future protocol designers: in CsInfo element, fields that reflect configuration shall be placed before fields that reflect runtime counters.
66 1 Junxiao Shi
67 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.
68
69 1 Junxiao Shi
## CS Enumeration
70
71
A subset of CS entries can be queried into a [[StatusDataset|Status Dataset]] under `ndn:/localhost/nfd/cs/query`.
72
73
(to be defined in #4317)
74 2 Junxiao Shi
75
76
## TLV-TYPE assignments
77
78
Type                                        | Assigned number   | Assigned number (hex)
79 1 Junxiao Shi
------------------------------------------- | ----------------- | ---------------------
80
CsInfo                                      | 128               | 0x80
81 5 Junxiao Shi
Capacity                                    | 131               | 0x83
82
Flags                                       | 108               | 0x6c
83 2 Junxiao Shi
NHits                                       | 129               | 0x81
84
NMisses                                     | 130               | 0x82