NDN-DPDK
High-Speed Named Data Networking Forwarder
Main Page
Related Pages
Data Structures
Data Structures
Data Structure Index
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Functions
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
Functions
_
b
c
d
e
f
h
i
l
m
n
p
r
s
t
u
Variables
_
b
c
d
e
f
g
i
l
m
p
r
s
t
v
w
Typedefs
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
Enumerations
Enumerator
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
Macros
a
b
c
d
f
h
i
l
m
n
p
r
s
t
u
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
csrc
pcct
cs-arc.h
Go to the documentation of this file.
1
#ifndef NDNDPDK_PCCT_CS_ARC_H
2
#define NDNDPDK_PCCT_CS_ARC_H
3
6
#include "
cs-list.h
"
7
8
#define CsArc_MoveDir(src, dst) (((uint16_t)(src) << 16) | ((uint16_t)(dst) << 0))
9
10
#define CsArc_MoveDirC(src, dst) CsArc_MoveDir(CslDirect##src, CslDirect##dst)
11
12
extern
const
ptrdiff_t
CsArc_ListOffsets_
[];
13
18
__attribute__((nonnull, returns_nonnull))
static
__rte_always_inline
CsList
*
19
CsArc_GetList(
CsArc
* arc,
CsListID
l) {
20
return
RTE_PTR_ADD(arc,
CsArc_ListOffsets_
[l]);
21
}
22
28
__attribute__((nonnull))
void
29
CsArc_Init
(
CsArc
* arc, uint32_t c, uint32_t capB2);
30
32
__attribute__((nonnull))
static
__rte_always_inline uint32_t
33
CsArc_GetCapacity(
const
CsArc
* arc) {
34
return
CsArc_c
(arc);
35
}
36
38
static
__rte_always_inline uint32_t
39
CsArc_CountEntries(
const
CsArc
* arc) {
40
return
arc->
T1
.
count
+ arc->
T2
.
count
;
41
}
42
48
__attribute__((nonnull))
void
49
CsArc_Add
(
CsArc
* arc,
CsEntry
* entry);
50
52
__attribute__((nonnull))
void
53
CsArc_Remove
(
CsArc
* arc,
CsEntry
* entry);
54
55
#endif
// NDNDPDK_PCCT_CS_ARC_H
CsArc_Remove
void CsArc_Remove(CsArc *arc, CsEntry *entry)
Remove an entry.
Definition:
cs-arc.c:178
CsArc_Add
void CsArc_Add(CsArc *arc, CsEntry *entry)
Add or refresh an entry.
Definition:
cs-arc.c:146
CsArc_ListOffsets_
const ptrdiff_t CsArc_ListOffsets_[]
Definition:
cs-arc.c:7
CsArc_Init
void CsArc_Init(CsArc *arc, uint32_t c, uint32_t capB2)
Initialize ARC.
Definition:
cs-arc.c:60
CsListID
CsListID
Definition:
cs-enum.h:18
cs-list.h
CsArc_c
#define CsArc_c(arc)
Access c as uint32.
Definition:
cs-struct.h:44
CsArc
Lists for Adaptive Replacement Cache (ARC).
Definition:
cs-struct.h:30
CsArc::T1
CsList T1
stored entries that appeared once
Definition:
cs-struct.h:33
CsArc::T2
CsList T2
stored entries that appeared more than once
Definition:
cs-struct.h:35
CsEntry
A CS entry.
Definition:
cs-entry.h:22
CsList
A doubly linked list within CS.
Definition:
cs-struct.h:18
CsList::count
uint32_t count
number of entries
Definition:
cs-struct.h:21
Generated by
1.9.1