xref: /dpdk/drivers/net/qede/base/ecore_sp_api.h (revision d80e42cce4c7017ed8c99dabb8ae444a492acc1c)
1 /*
2  * Copyright (c) 2016 - 2018 Cavium Inc.
3  * All rights reserved.
4  * www.cavium.com
5  *
6  * See LICENSE.qede_pmd for copyright and licensing details.
7  */
8 
9 #ifndef __ECORE_SP_API_H__
10 #define __ECORE_SP_API_H__
11 
12 #include "ecore_status.h"
13 
14 enum spq_mode {
15 	ECORE_SPQ_MODE_BLOCK, /* Client will poll a designated mem. address */
16 	ECORE_SPQ_MODE_CB,  /* Client supplies a callback */
17 	ECORE_SPQ_MODE_EBLOCK,  /* ECORE should block until completion */
18 };
19 
20 struct ecore_hwfn;
21 union event_ring_data;
22 struct eth_slow_path_rx_cqe;
23 
24 struct ecore_spq_comp_cb {
25 	void	(*function)(struct ecore_hwfn *,
26 			 void *,
27 			 union event_ring_data *,
28 			 u8 fw_return_code);
29 	void	*cookie;
30 };
31 
32 
33 /**
34  * @brief ecore_eth_cqe_completion - handles the completion of a
35  *        ramrod on the cqe ring
36  *
37  * @param p_hwfn
38  * @param cqe
39  *
40  * @return enum _ecore_status_t
41  */
42 enum _ecore_status_t ecore_eth_cqe_completion(struct ecore_hwfn *p_hwfn,
43 					      struct eth_slow_path_rx_cqe *cqe);
44 /**
45  * @brief ecore_sp_pf_update_tunn_cfg - PF Function Tunnel configuration
46  *					update  Ramrod
47  *
48  * This ramrod is sent to update a tunneling configuration
49  * for a physical function (PF).
50  *
51  * @param p_hwfn
52  * @param p_ptt
53  * @param p_tunn - pf update tunneling parameters
54  * @param comp_mode - completion mode
55  * @param p_comp_data - callback function
56  *
57  * @return enum _ecore_status_t
58  */
59 
60 enum _ecore_status_t
61 ecore_sp_pf_update_tunn_cfg(struct ecore_hwfn *p_hwfn,
62 			    struct ecore_ptt *p_ptt,
63 			    struct ecore_tunnel_info *p_tunn,
64 			    enum spq_mode comp_mode,
65 			    struct ecore_spq_comp_cb *p_comp_data);
66 #endif
67