4 * Copyright (C) Cavium Inc. 2017. All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in
14 * the documentation and/or other materials provided with the
16 * * Neither the name of Cavium networks nor the names of its
17 * contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 #ifndef __OCTEONTX_PKI_VAR_H__
34 #define __OCTEONTX_PKI_VAR_H__
36 #include <rte_byteorder.h>
38 #define OCTTX_PACKET_WQE_SKIP 128
39 #define OCTTX_PACKET_FIRST_SKIP 240
40 #define OCTTX_PACKET_LATER_SKIP 128
43 typedef union octtx_wqe_s {
47 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
97 uint64_t addr; /* Byte addr of start-of-pkt */
161 uint64_t err_lev : 3;
162 uint64_t op_code : 8;
166 uint64_t addr; /* Byte addr of start-of-pkt */
182 } __rte_packed octtx_wqe_t;
184 enum occtx_pki_ltype_e {
185 OCCTX_PKI_LTYPE_NONE = 0,
186 OCCTX_PKI_LTYPE_ENET = 1,
187 OCCTX_PKI_LTYPE_VLAN = 2,
188 OCCTX_PKI_LTYPE_SNAP_PAYLD = 5,
189 OCCTX_PKI_LTYPE_ARP = 6,
190 OCCTX_PKI_LTYPE_RARP = 7,
191 OCCTX_PKI_LTYPE_IP4 = 8,
192 OCCTX_PKI_LTYPE_IP4_OPT = 9,
193 OCCTX_PKI_LTYPE_IP6 = 0xa,
194 OCCTX_PKI_LTYPE_IP6_OPT = 0xb,
195 OCCTX_PKI_LTYPE_IPSEC_ESP = 0xc,
196 OCCTX_PKI_LTYPE_IPFRAG = 0xd,
197 OCCTX_PKI_LTYPE_IPCOMP = 0xe,
198 OCCTX_PKI_LTYPE_TCP = 0x10,
199 OCCTX_PKI_LTYPE_UDP = 0x11,
200 OCCTX_PKI_LTYPE_SCTP = 0x12,
201 OCCTX_PKI_LTYPE_UDP_VXLAN = 0x13,
202 OCCTX_PKI_LTYPE_GRE = 0x14,
203 OCCTX_PKI_LTYPE_NVGRE = 0x15,
204 OCCTX_PKI_LTYPE_GTP = 0x16,
205 OCCTX_PKI_LTYPE_UDP_GENEVE = 0x17,
206 OCCTX_PKI_LTYPE_SW28 = 0x1c,
207 OCCTX_PKI_LTYPE_SW29 = 0x1d,
208 OCCTX_PKI_LTYPE_SW30 = 0x1e,
209 OCCTX_PKI_LTYPE_SW31 = 0x1f,
214 LC_NONE = OCCTX_PKI_LTYPE_NONE,
215 LC_IPV4 = OCCTX_PKI_LTYPE_IP4,
216 LC_IPV4_OPT = OCCTX_PKI_LTYPE_IP4_OPT,
217 LC_IPV6 = OCCTX_PKI_LTYPE_IP6,
218 LC_IPV6_OPT = OCCTX_PKI_LTYPE_IP6_OPT,
222 LE_NONE = OCCTX_PKI_LTYPE_NONE,
226 LF_NONE = OCCTX_PKI_LTYPE_NONE,
227 LF_IPSEC_ESP = OCCTX_PKI_LTYPE_IPSEC_ESP,
228 LF_IPFRAG = OCCTX_PKI_LTYPE_IPFRAG,
229 LF_IPCOMP = OCCTX_PKI_LTYPE_IPCOMP,
230 LF_TCP = OCCTX_PKI_LTYPE_TCP,
231 LF_UDP = OCCTX_PKI_LTYPE_UDP,
232 LF_GRE = OCCTX_PKI_LTYPE_GRE,
233 LF_UDP_GENEVE = OCCTX_PKI_LTYPE_UDP_GENEVE,
234 LF_UDP_VXLAN = OCCTX_PKI_LTYPE_UDP_VXLAN,
235 LF_NVGRE = OCCTX_PKI_LTYPE_NVGRE,
237 #endif /* __OCTEONTX_PKI_VAR_H__ */