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