a07a9208a725b76be89cc30ea8d786d72be48ad5
[dpdk.git] / examples / ipsec-secgw / ipsec-secgw.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (C) 2020 Marvell International Ltd.
3  */
4 #ifndef _IPSEC_SECGW_H_
5 #define _IPSEC_SECGW_H_
6
7 #include <stdbool.h>
8
9 #define NB_SOCKETS 4
10
11 /* Port mask to identify the unprotected ports */
12 extern uint32_t unprotected_port_mask;
13
14 /* Index of SA in single mode */
15 extern uint32_t single_sa_idx;
16
17 extern volatile bool force_quit;
18
19 static inline uint8_t
20 is_unprotected_port(uint16_t port_id)
21 {
22         return unprotected_port_mask & (1 << port_id);
23 }
24
25 #endif /* _IPSEC_SECGW_H_ */