FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
b
d
e
f
g
i
l
m
n
o
p
r
s
t
v
w
Functions
d
f
g
l
m
n
o
p
t
v
Variables
Typedefs
Enumerations
Enumerator
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
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
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
c
e
g
h
k
m
n
o
r
s
Related Functions
c
d
e
h
i
m
o
p
r
s
v
Source
Files
Symbols
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
bihash_all_vector.c
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015 Cisco and/or its affiliates.
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at:
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
16
#include <
vppinfra/mem.h
>
17
18
/* Vector of all bihashes */
19
__clib_export
void
**
clib_all_bihashes
;
20
static
clib_mem_heap_t
*
clib_all_bihash_heap
;
21
22
__clib_export
clib_mem_heap_t
*
23
clib_all_bihash_set_heap
(
void
)
24
{
25
if
(
PREDICT_FALSE
(
clib_all_bihash_heap
== 0))
26
clib_all_bihash_heap
=
clib_mem_get_heap
();
27
28
return
clib_mem_set_heap
(
clib_all_bihash_heap
);
29
}
30
31
/*
32
* Leave it to Beaver to change the size of a bihash
33
* by making a clone in a stack local and then copying it...
34
*/
35
__clib_export
void
36
clib_bihash_copied
(
void
*
dst
,
void
*
src
)
37
{
38
int
i
;
39
40
for
(
i
= 0;
i
<
vec_len
(
clib_all_bihashes
);
i
++)
41
{
42
if
(
clib_all_bihashes
[
i
] ==
src
)
43
{
44
clib_all_bihashes
[
i
] =
dst
;
45
return
;
46
}
47
}
48
clib_warning
(
"Couldn't find bihash copy source %llx!"
,
src
);
49
}
50
51
52
/*
53
* fd.io coding-style-patch-verification: ON
54
*
55
* Local Variables:
56
* eval: (c-set-style "gnu")
57
* End:
58
*/
clib_mem_get_heap
static clib_mem_heap_t * clib_mem_get_heap(void)
Definition:
mem.h:362
clib_all_bihash_heap
static clib_mem_heap_t * clib_all_bihash_heap
Definition:
bihash_all_vector.c:20
clib_all_bihash_set_heap
__clib_export clib_mem_heap_t * clib_all_bihash_set_heap(void)
Definition:
bihash_all_vector.c:23
vec_len
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
Definition:
vec_bootstrap.h:142
clib_all_bihashes
__clib_export void ** clib_all_bihashes
Definition:
bihash_all_vector.c:19
PREDICT_FALSE
#define PREDICT_FALSE(x)
Definition:
clib.h:124
clib_bihash_copied
__clib_export void clib_bihash_copied(void *dst, void *src)
Definition:
bihash_all_vector.c:36
src
vl_api_address_t src
Definition:
gre.api:54
dst
vl_api_ip4_address_t dst
Definition:
pnat.api:41
i
int i
Definition:
flowhash_template.h:376
clib_warning
#define clib_warning(format, args...)
Definition:
error.h:59
mem.h
clib_mem_set_heap
static clib_mem_heap_t * clib_mem_set_heap(clib_mem_heap_t *heap)
Definition:
mem.h:368
clib_mem_heap_t
Definition:
mem.h:107
src
vppinfra
bihash_all_vector.c
Generated on Sat Jan 8 2022 10:37:10 for FD.io VPP by
1.8.17