net/bnxt: add initial TruFlow core session close
[dpdk.git] / drivers / net / bnxt / tf_core / tf_msg.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2019-2020 Broadcom
3  * All rights reserved.
4  */
5
6 #ifndef _TF_MSG_H_
7 #define _TF_MSG_H_
8
9 #include "tf_rm.h"
10
11 struct tf;
12
13 /**
14  * Sends session open request to Firmware
15  *
16  * [in] session
17  *   Pointer to session handle
18  *
19  * [in] ctrl_chan_name
20  *   PCI name of the control channel
21  *
22  * [in/out] fw_session_id
23  *   Pointer to the fw_session_id that is allocated on firmware side
24  *
25  * Returns:
26  *
27  */
28 int tf_msg_session_open(struct tf *tfp,
29                         char *ctrl_chan_name,
30                         uint8_t *fw_session_id);
31
32 /**
33  * Sends session close request to Firmware
34  *
35  * [in] session
36  *   Pointer to session handle
37  *
38  * [in] fw_session_id
39  *   Pointer to the fw_session_id that is assigned to the session at
40  *   time of session open
41  *
42  * Returns:
43  *
44  */
45 int tf_msg_session_attach(struct tf *tfp,
46                           char *ctrl_channel_name,
47                           uint8_t tf_fw_session_id);
48
49 /**
50  * Sends session close request to Firmware
51  *
52  * [in] session
53  *   Pointer to session handle
54  *
55  * Returns:
56  *
57  */
58 int tf_msg_session_close(struct tf *tfp);
59
60 /**
61  * Sends session query config request to TF Firmware
62  */
63 int tf_msg_session_qcfg(struct tf *tfp);
64
65 /**
66  * Sends session HW resource query capability request to TF Firmware
67  */
68 int tf_msg_session_hw_resc_qcaps(struct tf *tfp,
69                                  enum tf_dir dir,
70                                  struct tf_rm_hw_query *hw_query);
71
72 /**
73  * Sends session HW resource allocation request to TF Firmware
74  */
75 int tf_msg_session_hw_resc_alloc(struct tf *tfp,
76                                  enum tf_dir dir,
77                                  struct tf_rm_hw_alloc *hw_alloc,
78                                  struct tf_rm_entry *hw_entry);
79
80 /**
81  * Sends session HW resource free request to TF Firmware
82  */
83 int tf_msg_session_hw_resc_free(struct tf *tfp,
84                                 enum tf_dir dir,
85                                 struct tf_rm_entry *hw_entry);
86 #endif  /* _TF_MSG_H_ */