xref: /dpdk/drivers/common/cnxk/roc_dpi_priv.h (revision b6e39569)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2021 Marvell.
3  */
4 
5 #ifndef _ROC_DPI_PRIV_H_
6 #define _ROC_DPI_PRIV_H_
7 
8 #define DPI_MAX_VFS 8
9 
10 /* DPI PF DBDF information macros */
11 #define DPI_PF_DBDF_DEVICE   0
12 #define DPI_PF_DBDF_FUNCTION 0
13 
14 #define DPI_QUEUE_OPEN	0x1
15 #define DPI_QUEUE_CLOSE 0x2
16 #define DPI_REG_DUMP	0x3
17 #define DPI_GET_REG_CFG 0x4
18 
19 #define DPI_CMD_QUEUE_SIZE 4096
20 #define DPI_CMD_QUEUE_BUFS 1024
21 
22 typedef union dpi_mbox_msg_t {
23 	uint64_t u[2];
24 	struct dpi_mbox_message_s {
25 		/* VF ID to configure */
26 		uint64_t vfid : 4;
27 		/* Command code */
28 		uint64_t cmd : 4;
29 		/* Command buffer size in 8-byte words */
30 		uint64_t csize : 14;
31 		/* aura of the command buffer */
32 		uint64_t aura : 20;
33 		/* SSO PF function */
34 		uint64_t sso_pf_func : 16;
35 		/* NPA PF function */
36 		uint64_t npa_pf_func : 16;
37 	} s;
38 } dpi_mbox_msg_t;
39 
40 #endif
41