summaryrefslogtreecommitdiffstats
path: root/src/plugins/flowprobe
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/flowprobe')
-rw-r--r--src/plugins/flowprobe/node.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/flowprobe/node.c b/src/plugins/flowprobe/node.c
index 6a539db9bbf..80bfa9b584f 100644
--- a/src/plugins/flowprobe/node.c
+++ b/src/plugins/flowprobe/node.c
@@ -17,6 +17,7 @@
#include <vlib/vlib.h>
#include <vnet/vnet.h>
#include <vnet/pg/pg.h>
+#include <vppinfra/crc32.h>
#include <vppinfra/error.h>
#include <flowprobe/flowprobe.h>
#include <vnet/ip/ip6_packet.h>
@@ -258,10 +259,16 @@ static inline u32
flowprobe_hash (flowprobe_key_t * k)
{
flowprobe_main_t *fm = &flowprobe_main;
- int i;
u32 h = 0;
- for (i = 0; i < sizeof (k->as_u32) / sizeof (u32); i++)
- h = crc_u32 (k->as_u32[i], h);
+
+#ifdef clib_crc32c_uses_intrinsics
+ h = clib_crc32c ((u8 *) k->as_u32, FLOWPROBE_KEY_IN_U32);
+#else
+ u64 tmp =
+ k->as_u32[0] ^ k->as_u32[1] ^ k->as_u32[2] ^ k->as_u32[3] ^ k->as_u32[4];
+ h = clib_xxhash (tmp);
+#endif
+
return h >> (32 - fm->ht_log2len);
}
'/csit/commit/tests/vpp/perf/crypto/10ge2p1x710-ethip4ipsec4tnlsw-1atnl-ip4base-int-aes128gcm-reconf.robot?h=oper-rls2306-230612&id=38ba3408ef77161b61cd4be702d0c6e8fc36f8e5'>commitdiffstats
path: root/tests/vpp/perf/crypto/10ge2p1x710-ethip4ipsec4tnlsw-1atnl-ip4base-int-aes128gcm-reconf.robot
blob: e1718a0d75c0c84966cf80c507b72e7e087f5b24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158