diff options
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_dcb.h')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_dcb.h | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/drivers/net/ixgbe/ixgbe_dcb.h b/drivers/net/ixgbe/ixgbe_dcb.h index 5caafd4afbc3..944838fc7b59 100644 --- a/drivers/net/ixgbe/ixgbe_dcb.h +++ b/drivers/net/ixgbe/ixgbe_dcb.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2010 Intel Corporation. | 4 | Copyright(c) 1999 - 2011 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -139,7 +139,6 @@ struct ixgbe_dcb_config { | |||
139 | struct tc_configuration tc_config[MAX_TRAFFIC_CLASS]; | 139 | struct tc_configuration tc_config[MAX_TRAFFIC_CLASS]; |
140 | u8 bw_percentage[2][MAX_BW_GROUP]; /* One each for Tx/Rx */ | 140 | u8 bw_percentage[2][MAX_BW_GROUP]; /* One each for Tx/Rx */ |
141 | bool pfc_mode_enable; | 141 | bool pfc_mode_enable; |
142 | bool round_robin_enable; | ||
143 | 142 | ||
144 | enum dcb_rx_pba_cfg rx_pba_cfg; | 143 | enum dcb_rx_pba_cfg rx_pba_cfg; |
145 | 144 | ||
@@ -148,35 +147,26 @@ struct ixgbe_dcb_config { | |||
148 | }; | 147 | }; |
149 | 148 | ||
150 | /* DCB driver APIs */ | 149 | /* DCB driver APIs */ |
151 | 150 | void ixgbe_dcb_unpack_pfc(struct ixgbe_dcb_config *cfg, u8 *pfc_en); | |
152 | /* DCB rule checking function.*/ | 151 | void ixgbe_dcb_unpack_refill(struct ixgbe_dcb_config *, int, u16 *); |
153 | s32 ixgbe_dcb_check_config(struct ixgbe_dcb_config *config); | 152 | void ixgbe_dcb_unpack_max(struct ixgbe_dcb_config *, u16 *); |
153 | void ixgbe_dcb_unpack_bwgid(struct ixgbe_dcb_config *, int, u8 *); | ||
154 | void ixgbe_dcb_unpack_prio(struct ixgbe_dcb_config *, int, u8 *); | ||
154 | 155 | ||
155 | /* DCB credits calculation */ | 156 | /* DCB credits calculation */ |
156 | s32 ixgbe_dcb_calculate_tc_credits(struct ixgbe_dcb_config *, u8); | 157 | s32 ixgbe_ieee_credits(__u8 *bw, __u16 *refill, __u16 *max, int max_frame); |
157 | 158 | s32 ixgbe_dcb_calculate_tc_credits(struct ixgbe_hw *, | |
158 | /* DCB PFC functions */ | 159 | struct ixgbe_dcb_config *, int, u8); |
159 | s32 ixgbe_dcb_config_pfc(struct ixgbe_hw *, struct ixgbe_dcb_config *g); | ||
160 | s32 ixgbe_dcb_get_pfc_stats(struct ixgbe_hw *, struct ixgbe_hw_stats *, u8); | ||
161 | |||
162 | /* DCB traffic class stats */ | ||
163 | s32 ixgbe_dcb_config_tc_stats(struct ixgbe_hw *); | ||
164 | s32 ixgbe_dcb_get_tc_stats(struct ixgbe_hw *, struct ixgbe_hw_stats *, u8); | ||
165 | |||
166 | /* DCB config arbiters */ | ||
167 | s32 ixgbe_dcb_config_tx_desc_arbiter(struct ixgbe_hw *, | ||
168 | struct ixgbe_dcb_config *); | ||
169 | s32 ixgbe_dcb_config_tx_data_arbiter(struct ixgbe_hw *, | ||
170 | struct ixgbe_dcb_config *); | ||
171 | s32 ixgbe_dcb_config_rx_arbiter(struct ixgbe_hw *, struct ixgbe_dcb_config *); | ||
172 | 160 | ||
173 | /* DCB hw initialization */ | 161 | /* DCB hw initialization */ |
162 | s32 ixgbe_dcb_hw_ets_config(struct ixgbe_hw *hw, u16 *refill, u16 *max, | ||
163 | u8 *bwg_id, u8 *prio_type, u8 *tc_prio); | ||
164 | s32 ixgbe_dcb_hw_pfc_config(struct ixgbe_hw *hw, u8 pfc_en); | ||
174 | s32 ixgbe_dcb_hw_config(struct ixgbe_hw *, struct ixgbe_dcb_config *); | 165 | s32 ixgbe_dcb_hw_config(struct ixgbe_hw *, struct ixgbe_dcb_config *); |
175 | 166 | ||
176 | /* DCB definitions for credit calculation */ | 167 | /* DCB definitions for credit calculation */ |
168 | #define DCB_CREDIT_QUANTUM 64 /* DCB Quantum */ | ||
177 | #define MAX_CREDIT_REFILL 511 /* 0x1FF * 64B = 32704B */ | 169 | #define MAX_CREDIT_REFILL 511 /* 0x1FF * 64B = 32704B */ |
178 | #define MINIMUM_CREDIT_REFILL 5 /* 5*64B = 320B */ | ||
179 | #define MINIMUM_CREDIT_FOR_JUMBO 145 /* 145= UpperBound((9*1024+54)/64B) for 9KB jumbo frame */ | ||
180 | #define DCB_MAX_TSO_SIZE (32*1024) /* MAX TSO packet size supported in DCB mode */ | 170 | #define DCB_MAX_TSO_SIZE (32*1024) /* MAX TSO packet size supported in DCB mode */ |
181 | #define MINIMUM_CREDIT_FOR_TSO (DCB_MAX_TSO_SIZE/64 + 1) /* 513 for 32KB TSO packet */ | 171 | #define MINIMUM_CREDIT_FOR_TSO (DCB_MAX_TSO_SIZE/64 + 1) /* 513 for 32KB TSO packet */ |
182 | #define MAX_CREDIT 4095 /* Maximum credit supported: 256KB * 1204 / 64B */ | 172 | #define MAX_CREDIT 4095 /* Maximum credit supported: 256KB * 1204 / 64B */ |