crypto/mlx5: add maximum segments configuration
[dpdk.git] / examples / ipsec-secgw / ipsec_worker.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (C) 2020 Marvell International Ltd.
3  */
4 #ifndef _IPSEC_WORKER_H_
5 #define _IPSEC_WORKER_H_
6
7 #include "ipsec.h"
8
9 enum pkt_type {
10         PKT_TYPE_PLAIN_IPV4 = 1,
11         PKT_TYPE_IPSEC_IPV4,
12         PKT_TYPE_PLAIN_IPV6,
13         PKT_TYPE_IPSEC_IPV6,
14         PKT_TYPE_INVALID
15 };
16
17 enum {
18         PKT_DROPPED = 0,
19         PKT_FORWARDED,
20         PKT_POSTED      /* for lookaside case */
21 };
22
23 struct route_table {
24         struct rt_ctx *rt4_ctx;
25         struct rt_ctx *rt6_ctx;
26 };
27
28 /*
29  * Conf required by event mode worker with tx internal port
30  */
31 struct lcore_conf_ev_tx_int_port_wrkr {
32         struct ipsec_ctx inbound;
33         struct ipsec_ctx outbound;
34         struct route_table rt;
35 } __rte_cache_aligned;
36
37 void ipsec_poll_mode_worker(void);
38
39 int ipsec_launch_one_lcore(void *args);
40
41 #endif /* _IPSEC_WORKER_H_ */