xref: /dpdk/drivers/net/octeontx/base/octeontx_pkivf.h (revision b95c3413fa42558df3ecd8192bc551b9564e35ea)
1*b95c3413SJerin Jacob /*
2*b95c3413SJerin Jacob  *   BSD LICENSE
3*b95c3413SJerin Jacob  *
4*b95c3413SJerin Jacob  *   Copyright (C) Cavium Inc. 2017. All rights reserved.
5*b95c3413SJerin Jacob  *
6*b95c3413SJerin Jacob  *   Redistribution and use in source and binary forms, with or without
7*b95c3413SJerin Jacob  *   modification, are permitted provided that the following conditions
8*b95c3413SJerin Jacob  *   are met:
9*b95c3413SJerin Jacob  *
10*b95c3413SJerin Jacob  *     * Redistributions of source code must retain the above copyright
11*b95c3413SJerin Jacob  *       notice, this list of conditions and the following disclaimer.
12*b95c3413SJerin Jacob  *     * Redistributions in binary form must reproduce the above copyright
13*b95c3413SJerin Jacob  *       notice, this list of conditions and the following disclaimer in
14*b95c3413SJerin Jacob  *       the documentation and/or other materials provided with the
15*b95c3413SJerin Jacob  *       distribution.
16*b95c3413SJerin Jacob  *     * Neither the name of Cavium networks nor the names of its
17*b95c3413SJerin Jacob  *       contributors may be used to endorse or promote products derived
18*b95c3413SJerin Jacob  *       from this software without specific prior written permission.
19*b95c3413SJerin Jacob  *
20*b95c3413SJerin Jacob  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21*b95c3413SJerin Jacob  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22*b95c3413SJerin Jacob  *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23*b95c3413SJerin Jacob  *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24*b95c3413SJerin Jacob  *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25*b95c3413SJerin Jacob  *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26*b95c3413SJerin Jacob  *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27*b95c3413SJerin Jacob  *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28*b95c3413SJerin Jacob  *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29*b95c3413SJerin Jacob  *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30*b95c3413SJerin Jacob  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31*b95c3413SJerin Jacob  */
32*b95c3413SJerin Jacob 
33*b95c3413SJerin Jacob #ifndef	__OCTEONTX_PKI_H__
34*b95c3413SJerin Jacob #define	__OCTEONTX_PKI_H__
35*b95c3413SJerin Jacob 
36*b95c3413SJerin Jacob #include <stdint.h>
37*b95c3413SJerin Jacob 
38*b95c3413SJerin Jacob #include <rte_pmd_octeontx_ssovf.h>
39*b95c3413SJerin Jacob 
40*b95c3413SJerin Jacob #define OCTEONTX_PKI_COPROC                     5
41*b95c3413SJerin Jacob 
42*b95c3413SJerin Jacob /* PKI messages */
43*b95c3413SJerin Jacob 
44*b95c3413SJerin Jacob #define MBOX_PKI_PORT_OPEN			1
45*b95c3413SJerin Jacob #define MBOX_PKI_PORT_START			2
46*b95c3413SJerin Jacob #define MBOX_PKI_PORT_STOP			3
47*b95c3413SJerin Jacob #define MBOX_PKI_PORT_CLOSE			4
48*b95c3413SJerin Jacob 
49*b95c3413SJerin Jacob /* Interface types: */
50*b95c3413SJerin Jacob enum {
51*b95c3413SJerin Jacob 	OCTTX_PORT_TYPE_NET, /* Network interface ports */
52*b95c3413SJerin Jacob 	OCTTX_PORT_TYPE_INT, /* CPU internal interface ports */
53*b95c3413SJerin Jacob 	OCTTX_PORT_TYPE_PCI, /* DPI/PCIe interface ports */
54*b95c3413SJerin Jacob 	OCTTX_PORT_TYPE_MAX
55*b95c3413SJerin Jacob };
56*b95c3413SJerin Jacob 
57*b95c3413SJerin Jacob /* pki port config */
58*b95c3413SJerin Jacob typedef struct mbox_pki_port_type {
59*b95c3413SJerin Jacob 	uint8_t port_type;
60*b95c3413SJerin Jacob } mbox_pki_port_t;
61*b95c3413SJerin Jacob 
62*b95c3413SJerin Jacob int octeontx_pki_port_open(int port);
63*b95c3413SJerin Jacob int octeontx_pki_port_close(int port);
64*b95c3413SJerin Jacob int octeontx_pki_port_start(int port);
65*b95c3413SJerin Jacob int octeontx_pki_port_stop(int port);
66*b95c3413SJerin Jacob 
67*b95c3413SJerin Jacob #endif /* __OCTEONTX_PKI_H__ */
68