1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, v.1, (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://opensource.org/licenses/CDDL-1.0. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22 /* 23 * Copyright 2014-2017 Cavium, Inc. 24 * The contents of this file are subject to the terms of the Common Development 25 * and Distribution License, v.1, (the "License"). 26 27 * You may not use this file except in compliance with the License. 28 29 * You can obtain a copy of the License at available 30 * at http://opensource.org/licenses/CDDL-1.0 31 32 * See the License for the specific language governing permissions and 33 * limitations under the License. 34 */ 35 36 #ifndef __ECORE_DCBX_H__ 37 #define __ECORE_DCBX_H__ 38 39 #include "ecore.h" 40 #include "ecore_mcp.h" 41 #include "mcp_public.h" 42 #include "reg_addr.h" 43 #include "ecore_hw.h" 44 #include "ecore_hsi_common.h" 45 #include "ecore_dcbx_api.h" 46 47 struct ecore_dcbx_info { 48 struct lldp_status_params_s lldp_remote[LLDP_MAX_LLDP_AGENTS]; 49 struct lldp_config_params_s lldp_local[LLDP_MAX_LLDP_AGENTS]; 50 struct dcbx_local_params local_admin; 51 struct ecore_dcbx_results results; 52 struct dcb_dscp_map dscp_map; 53 bool dscp_nig_update; 54 struct dcbx_mib operational; 55 struct dcbx_mib remote; 56 struct ecore_dcbx_set set; 57 struct ecore_dcbx_get get; 58 u8 dcbx_cap; 59 u16 iwarp_port; 60 }; 61 62 struct ecore_dcbx_mib_meta_data { 63 struct lldp_config_params_s *lldp_local; 64 struct lldp_status_params_s *lldp_remote; 65 struct dcbx_local_params *local_admin; 66 struct dcb_dscp_map *dscp_map; 67 struct dcbx_mib *mib; 68 osal_size_t size; 69 u32 addr; 70 }; 71 72 /* ECORE local interface routines */ 73 enum _ecore_status_t 74 ecore_dcbx_mib_update_event(struct ecore_hwfn *, struct ecore_ptt *, 75 enum ecore_mib_read_type); 76 77 enum _ecore_status_t ecore_dcbx_read_lldp_params(struct ecore_hwfn *, 78 struct ecore_ptt *); 79 enum _ecore_status_t ecore_dcbx_info_alloc(struct ecore_hwfn *p_hwfn); 80 void ecore_dcbx_info_free(struct ecore_hwfn *); 81 void ecore_dcbx_set_pf_update_params(struct ecore_dcbx_results *p_src, 82 struct pf_update_ramrod_data *p_dest); 83 84 #endif /* __ECORE_DCBX_H__ */ 85