FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
crypto_sw_scheduler.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2020 Intel 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 <
vnet/crypto/crypto.h
>
17
18
#ifndef __crypto_sw_scheduler_h__
19
#define __crypto_sw_scheduler_h__
20
21
#define CRYPTO_SW_SCHEDULER_QUEUE_SIZE 64
22
#define CRYPTO_SW_SCHEDULER_QUEUE_MASK (CRYPTO_SW_SCHEDULER_QUEUE_SIZE - 1)
23
24
typedef
struct
25
{
26
CLIB_CACHE_LINE_ALIGN_MARK
(cacheline0);
27
u32
head
;
28
u32
tail
;
29
vnet_crypto_async_frame_t
*jobs[0];
30
}
crypto_sw_scheduler_queue_t
;
31
32
typedef
struct
33
{
34
CLIB_CACHE_LINE_ALIGN_MARK
(cacheline0);
35
crypto_sw_scheduler_queue_t
*queues[
VNET_CRYPTO_ASYNC_OP_N_IDS
];
36
vnet_crypto_op_t
*
crypto_ops
;
37
vnet_crypto_op_t
*
integ_ops
;
38
vnet_crypto_op_t
*
chained_crypto_ops
;
39
vnet_crypto_op_t
*
chained_integ_ops
;
40
vnet_crypto_op_chunk_t
*
chunks
;
41
u8
self_crypto_enabled
;
42
}
crypto_sw_scheduler_per_thread_data_t
;
43
44
typedef
struct
45
{
46
u32
crypto_engine_index
;
47
crypto_sw_scheduler_per_thread_data_t
*
per_thread_data
;
48
vnet_crypto_key_t
*
keys
;
49
}
crypto_sw_scheduler_main_t
;
50
51
extern
crypto_sw_scheduler_main_t
crypto_sw_scheduler_main
;
52
53
extern
int
crypto_sw_scheduler_set_worker_crypto
(
u32
worker_idx,
u8
enabled);
54
55
extern
clib_error_t
*
crypto_sw_scheduler_api_init
(
vlib_main_t
*
vm
);
56
57
#endif // __crypto_native_h__
58
59
/*
60
* fd.io coding-style-patch-verification: ON
61
*
62
* Local Variables:
63
* eval: (c-set-style "gnu")
64
* End:
65
*/
crypto_sw_scheduler_per_thread_data_t::chunks
vnet_crypto_op_chunk_t * chunks
Definition:
crypto_sw_scheduler.h:40
crypto_sw_scheduler_main_t::crypto_engine_index
u32 crypto_engine_index
Definition:
crypto_sw_scheduler.h:46
crypto_sw_scheduler_main_t::per_thread_data
crypto_sw_scheduler_per_thread_data_t * per_thread_data
Definition:
crypto_sw_scheduler.h:47
crypto.h
VNET_CRYPTO_ASYNC_OP_N_IDS
@ VNET_CRYPTO_ASYNC_OP_N_IDS
Definition:
crypto.h:195
CLIB_CACHE_LINE_ALIGN_MARK
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
Definition:
cache.h:60
crypto_sw_scheduler_per_thread_data_t::crypto_ops
vnet_crypto_op_t * crypto_ops
Definition:
crypto_sw_scheduler.h:36
crypto_sw_scheduler_main_t
Definition:
crypto_sw_scheduler.h:44
vnet_crypto_async_frame_t
Definition:
crypto.h:358
crypto_sw_scheduler_queue_t::head
u32 head
Definition:
crypto_sw_scheduler.h:27
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition:
nat44_ei.c:3047
crypto_sw_scheduler_api_init
clib_error_t * crypto_sw_scheduler_api_init(vlib_main_t *vm)
Definition:
api.c:63
crypto_sw_scheduler_main
crypto_sw_scheduler_main_t crypto_sw_scheduler_main
Definition:
main.c:634
vnet_crypto_op_t
Definition:
crypto.h:255
crypto_sw_scheduler_queue_t
Definition:
crypto_sw_scheduler.h:24
crypto_sw_scheduler_per_thread_data_t::chained_crypto_ops
vnet_crypto_op_t * chained_crypto_ops
Definition:
crypto_sw_scheduler.h:38
crypto_sw_scheduler_per_thread_data_t::integ_ops
vnet_crypto_op_t * integ_ops
Definition:
crypto_sw_scheduler.h:37
vnet_crypto_op_chunk_t
Definition:
crypto.h:248
crypto_sw_scheduler_per_thread_data_t
Definition:
crypto_sw_scheduler.h:32
vnet_crypto_key_t
Definition:
crypto.h:198
u32
unsigned int u32
Definition:
types.h:88
crypto_sw_scheduler_per_thread_data_t::self_crypto_enabled
u8 self_crypto_enabled
Definition:
crypto_sw_scheduler.h:41
vlib_main_t
Definition:
main.h:102
u8
unsigned char u8
Definition:
types.h:56
clib_error_t
Definition:
clib_error.h:21
crypto_sw_scheduler_set_worker_crypto
int crypto_sw_scheduler_set_worker_crypto(u32 worker_idx, u8 enabled)
Definition:
main.c:23
crypto_sw_scheduler_queue_t::tail
u32 tail
Definition:
crypto_sw_scheduler.h:28
crypto_sw_scheduler_main_t::keys
vnet_crypto_key_t * keys
Definition:
crypto_sw_scheduler.h:48
crypto_sw_scheduler_per_thread_data_t::chained_integ_ops
vnet_crypto_op_t * chained_integ_ops
Definition:
crypto_sw_scheduler.h:39
src
plugins
crypto_sw_scheduler
crypto_sw_scheduler.h
Generated on Sat Jan 8 2022 10:03:43 for FD.io VPP by
1.8.17