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 (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://www.opensolaris.org/os/licensing. 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 * Copyright 2014 QLogic Corporation 22 * The contents of this file are subject to the terms of the 23 * QLogic End User License (the "License"). 24 * You may not use this file except in compliance with the License. 25 * 26 * You can obtain a copy of the License at 27 * http://www.qlogic.com/Resources/Documents/DriverDownloadHelp/ 28 * QLogic_End_User_Software_License.txt 29 * See the License for the specific language governing permissions 30 * and limitations under the License. 31 * 32 * 33 * Module Description: 34 * 35 * 36 * History: 37 * 28/06/11 ShayH Inception. 38 ******************************************************************************/ 39 #ifndef _LM_DCBX_MP_H 40 #define _LM_DCBX_MP_H 41 42 /******************************************************************************* 43 * Constants. 44 ******************************************************************************/ 45 #define MAX_NUM_OF_ETH_CONS_PER_COS (MAX_RSS_CHAINS) 46 #define ETH_MP_MAX_COS_SUPPORTED (3) 47 48 /******************************************************************************* 49 * Defines. 50 ******************************************************************************/ 51 52 #define MAX_ETH_TX_ONLY_CONS ((ETH_MP_MAX_COS_SUPPORTED - 1)*(MAX_NUM_OF_ETH_CONS_PER_COS)) 53 #define MAX_ETH_TX_ONLY_CHAINS ((ETH_MP_MAX_COS_SUPPORTED - 1)*(MAX_HW_CHAINS)) 54 55 56 typedef enum 57 { 58 lm_chain_type_cos_reg = 0, 59 lm_chain_type_cos_tx_only = 1, 60 lm_chain_type_not_cos = 2 61 }lm_chain_type_t; 62 63 /** 64 * @description 65 * Get COS number based on chain. 66 * If the chain doesn't belong to a specific COS (e.g. ISCSI L2 67 * chain) 68 * @param pdev 69 * @param chain 70 * 71 * @return u8_t 72 */ 73 u8_t 74 lm_mp_cos_from_chain(IN struct _lm_device_t *pdev, 75 IN const u32_t chain); 76 77 /** 78 * @description 79 * Get max cos chain used. 80 * @param pdev 81 * @param chain 82 * @param cos 83 * 84 * @return u32_t 85 */ 86 u8_t 87 lm_mp_max_cos_chain_used( 88 IN struct _lm_device_t *pdev); 89 90 #endif// _LM_DCBX_MP_H 91