FreeBSD kernel IXGBE device code
ixgbe_dcb.c
Go to the documentation of this file.
1/******************************************************************************
2 SPDX-License-Identifier: BSD-3-Clause
3
4 Copyright (c) 2001-2020, Intel Corporation
5 All rights reserved.
6
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions are met:
9
10 1. Redistributions of source code must retain the above copyright notice,
11 this list of conditions and the following disclaimer.
12
13 2. Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in the
15 documentation and/or other materials provided with the distribution.
16
17 3. Neither the name of the Intel Corporation nor the names of its
18 contributors may be used to endorse or promote products derived from
19 this software without specific prior written permission.
20
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 POSSIBILITY OF SUCH DAMAGE.
32
33******************************************************************************/
34/*$FreeBSD$*/
35
36
37#include "ixgbe_type.h"
38#include "ixgbe_dcb.h"
39#include "ixgbe_dcb_82598.h"
40#include "ixgbe_dcb_82599.h"
41
55{
56 int min_percent = 100;
57 int min_credit, multiplier;
58 int i;
59
60 min_credit = ((max_frame_size / 2) + IXGBE_DCB_CREDIT_QUANTUM - 1) /
62
63 for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) {
64 if (bw[i] < min_percent && bw[i])
65 min_percent = bw[i];
66 }
67
68 multiplier = (min_credit / min_percent) + 1;
69
70 /* Find out the hw credits for each TC */
71 for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) {
72 int val = min(bw[i] * multiplier, IXGBE_DCB_MAX_CREDIT_REFILL);
73
74 if (val < min_credit)
75 val = min_credit;
76 refill[i] = (u16)val;
77
78 max[i] = bw[i] ? (bw[i]*IXGBE_DCB_MAX_CREDIT)/100 : min_credit;
79 }
80
81 return 0;
82}
83
96 struct ixgbe_dcb_config *dcb_config,
97 u32 max_frame_size, u8 direction)
98{
99 struct ixgbe_dcb_tc_path *p;
100 u32 min_multiplier = 0;
101 u16 min_percent = 100;
102 s32 ret_val = IXGBE_SUCCESS;
103 /* Initialization values default for Tx settings */
104 u32 min_credit = 0;
105 u32 credit_refill = 0;
106 u32 credit_max = 0;
107 u16 link_percentage = 0;
108 u8 bw_percent = 0;
109 u8 i;
110
111 if (dcb_config == NULL) {
112 ret_val = IXGBE_ERR_CONFIG;
113 goto out;
114 }
115
116 min_credit = ((max_frame_size / 2) + IXGBE_DCB_CREDIT_QUANTUM - 1) /
118
119 /* Find smallest link percentage */
120 for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) {
121 p = &dcb_config->tc_config[i].path[direction];
122 bw_percent = dcb_config->bw_percentage[direction][p->bwg_id];
123 link_percentage = p->bwg_percent;
124
125 link_percentage = (link_percentage * bw_percent) / 100;
126
127 if (link_percentage && link_percentage < min_percent)
128 min_percent = link_percentage;
129 }
130
131 /*
132 * The ratio between traffic classes will control the bandwidth
133 * percentages seen on the wire. To calculate this ratio we use
134 * a multiplier. It is required that the refill credits must be
135 * larger than the max frame size so here we find the smallest
136 * multiplier that will allow all bandwidth percentages to be
137 * greater than the max frame size.
138 */
139 min_multiplier = (min_credit / min_percent) + 1;
140
141 /* Find out the link percentage for each TC first */
142 for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) {
143 p = &dcb_config->tc_config[i].path[direction];
144 bw_percent = dcb_config->bw_percentage[direction][p->bwg_id];
145
146 link_percentage = p->bwg_percent;
147 /* Must be careful of integer division for very small nums */
148 link_percentage = (link_percentage * bw_percent) / 100;
149 if (p->bwg_percent > 0 && link_percentage == 0)
150 link_percentage = 1;
151
152 /* Save link_percentage for reference */
153 p->link_percent = (u8)link_percentage;
154
155 /* Calculate credit refill ratio using multiplier */
156 credit_refill = min(link_percentage * min_multiplier,
158
159 /* Refill at least minimum credit */
160 if (credit_refill < min_credit)
161 credit_refill = min_credit;
162
163 p->data_credits_refill = (u16)credit_refill;
164
165 /* Calculate maximum credit for the TC */
166 credit_max = (link_percentage * IXGBE_DCB_MAX_CREDIT) / 100;
167
168 /*
169 * Adjustment based on rule checking, if the percentage
170 * of a TC is too small, the maximum credit may not be
171 * enough to send out a jumbo frame in data plane arbitration.
172 */
173 if (credit_max < min_credit)
174 credit_max = min_credit;
175
176 if (direction == IXGBE_DCB_TX_CONFIG) {
177 /*
178 * Adjustment based on rule checking, if the
179 * percentage of a TC is too small, the maximum
180 * credit may not be enough to send out a TSO
181 * packet in descriptor plane arbitration.
182 */
183 if (credit_max && (credit_max <
185 && (hw->mac.type == ixgbe_mac_82598EB))
186 credit_max = IXGBE_DCB_MIN_TSO_CREDIT;
187
188 dcb_config->tc_config[i].desc_credits_max =
189 (u16)credit_max;
190 }
191
192 p->data_credits_max = (u16)credit_max;
193 }
194
195out:
196 return ret_val;
197}
198
210void ixgbe_dcb_unpack_pfc_cee(struct ixgbe_dcb_config *cfg, u8 *map, u8 *pfc_up)
211{
212 struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
213 int up;
214
215 /*
216 * If the TC for this user priority has PFC enabled then set the
217 * matching bit in 'pfc_up' to reflect that PFC is enabled.
218 */
219 for (*pfc_up = 0, up = 0; up < IXGBE_DCB_MAX_USER_PRIORITY; up++) {
220 if (tc_config[map[up]].pfc != ixgbe_dcb_pfc_disabled)
221 *pfc_up |= 1 << up;
222 }
223}
224
225void ixgbe_dcb_unpack_refill_cee(struct ixgbe_dcb_config *cfg, int direction,
226 u16 *refill)
227{
228 struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
229 int tc;
230
231 for (tc = 0; tc < IXGBE_DCB_MAX_TRAFFIC_CLASS; tc++)
232 refill[tc] = tc_config[tc].path[direction].data_credits_refill;
233}
234
236{
237 struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
238 int tc;
239
240 for (tc = 0; tc < IXGBE_DCB_MAX_TRAFFIC_CLASS; tc++)
241 max[tc] = tc_config[tc].desc_credits_max;
242}
243
244void ixgbe_dcb_unpack_bwgid_cee(struct ixgbe_dcb_config *cfg, int direction,
245 u8 *bwgid)
246{
247 struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
248 int tc;
249
250 for (tc = 0; tc < IXGBE_DCB_MAX_TRAFFIC_CLASS; tc++)
251 bwgid[tc] = tc_config[tc].path[direction].bwg_id;
252}
253
254void ixgbe_dcb_unpack_tsa_cee(struct ixgbe_dcb_config *cfg, int direction,
255 u8 *tsa)
256{
257 struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
258 int tc;
259
260 for (tc = 0; tc < IXGBE_DCB_MAX_TRAFFIC_CLASS; tc++)
261 tsa[tc] = tc_config[tc].path[direction].tsa;
262}
263
264u8 ixgbe_dcb_get_tc_from_up(struct ixgbe_dcb_config *cfg, int direction, u8 up)
265{
266 struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
267 u8 prio_mask = 1 << up;
268 u8 tc = cfg->num_tcs.pg_tcs;
269
270 /* If tc is 0 then DCB is likely not enabled or supported */
271 if (!tc)
272 goto out;
273
274 /*
275 * Test from maximum TC to 1 and report the first match we find. If
276 * we find no match we can assume that the TC is 0 since the TC must
277 * be set for all user priorities
278 */
279 for (tc--; tc; tc--) {
280 if (prio_mask & tc_config[tc].path[direction].up_to_tc_bitmap)
281 break;
282 }
283out:
284 return tc;
285}
286
287void ixgbe_dcb_unpack_map_cee(struct ixgbe_dcb_config *cfg, int direction,
288 u8 *map)
289{
290 u8 up;
291
292 for (up = 0; up < IXGBE_DCB_MAX_USER_PRIORITY; up++)
293 map[up] = ixgbe_dcb_get_tc_from_up(cfg, direction, up);
294}
295
311{
312 struct ixgbe_dcb_tc_path *p;
313 s32 ret_val = IXGBE_SUCCESS;
314 u8 i, j, bw = 0, bw_id;
315 u8 bw_sum[2][IXGBE_DCB_MAX_BW_GROUP];
316 bool link_strict[2][IXGBE_DCB_MAX_BW_GROUP];
317
318 memset(bw_sum, 0, sizeof(bw_sum));
319 memset(link_strict, 0, sizeof(link_strict));
320
321 /* First Tx, then Rx */
322 for (i = 0; i < 2; i++) {
323 /* Check each traffic class for rule violation */
324 for (j = 0; j < IXGBE_DCB_MAX_TRAFFIC_CLASS; j++) {
325 p = &dcb_config->tc_config[j].path[i];
326
327 bw = p->bwg_percent;
328 bw_id = p->bwg_id;
329
330 if (bw_id >= IXGBE_DCB_MAX_BW_GROUP) {
331 ret_val = IXGBE_ERR_CONFIG;
332 goto err_config;
333 }
334 if (p->tsa == ixgbe_dcb_tsa_strict) {
335 link_strict[i][bw_id] = true;
336 /* Link strict should have zero bandwidth */
337 if (bw) {
338 ret_val = IXGBE_ERR_CONFIG;
339 goto err_config;
340 }
341 } else if (!bw) {
342 /*
343 * Traffic classes without link strict
344 * should have non-zero bandwidth.
345 */
346 ret_val = IXGBE_ERR_CONFIG;
347 goto err_config;
348 }
349 bw_sum[i][bw_id] += bw;
350 }
351
352 bw = 0;
353
354 /* Check each bandwidth group for rule violation */
355 for (j = 0; j < IXGBE_DCB_MAX_BW_GROUP; j++) {
356 bw += dcb_config->bw_percentage[i][j];
357 /*
358 * Sum of bandwidth percentages of all traffic classes
359 * within a Bandwidth Group must total 100 except for
360 * link strict group (zero bandwidth).
361 */
362 if (link_strict[i][j]) {
363 if (bw_sum[i][j]) {
364 /*
365 * Link strict group should have zero
366 * bandwidth.
367 */
368 ret_val = IXGBE_ERR_CONFIG;
369 goto err_config;
370 }
371 } else if (bw_sum[i][j] != IXGBE_DCB_BW_PERCENT &&
372 bw_sum[i][j] != 0) {
373 ret_val = IXGBE_ERR_CONFIG;
374 goto err_config;
375 }
376 }
377
378 if (bw != IXGBE_DCB_BW_PERCENT) {
379 ret_val = IXGBE_ERR_CONFIG;
380 goto err_config;
381 }
382 }
383
384err_config:
385 DEBUGOUT2("DCB error code %d while checking %s settings.\n",
386 ret_val, (i == IXGBE_DCB_TX_CONFIG) ? "Tx" : "Rx");
387
388 return ret_val;
389}
390
400 u8 tc_count)
401{
403 switch (hw->mac.type) {
405 ret = ixgbe_dcb_get_tc_stats_82598(hw, stats, tc_count);
406 break;
408 case ixgbe_mac_X540:
409 case ixgbe_mac_X550:
412 ret = ixgbe_dcb_get_tc_stats_82599(hw, stats, tc_count);
413 break;
414 default:
415 break;
416 }
417 return ret;
418}
419
429 u8 tc_count)
430{
432 switch (hw->mac.type) {
434 ret = ixgbe_dcb_get_pfc_stats_82598(hw, stats, tc_count);
435 break;
437 case ixgbe_mac_X540:
438 case ixgbe_mac_X550:
441 ret = ixgbe_dcb_get_pfc_stats_82599(hw, stats, tc_count);
442 break;
443 default:
444 break;
445 }
446 return ret;
447}
448
457 struct ixgbe_dcb_config *dcb_config)
458{
461 u8 bwgid[IXGBE_DCB_MAX_TRAFFIC_CLASS] = { 0 };
462 u8 map[IXGBE_DCB_MAX_USER_PRIORITY] = { 0 };
463 u16 refill[IXGBE_DCB_MAX_TRAFFIC_CLASS] = { 0 };
464 u16 max[IXGBE_DCB_MAX_TRAFFIC_CLASS] = { 0 };
465
467 ixgbe_dcb_unpack_max_cee(dcb_config, max);
471
472 switch (hw->mac.type) {
474 ret = ixgbe_dcb_config_rx_arbiter_82598(hw, refill, max, tsa);
475 break;
477 case ixgbe_mac_X540:
478 case ixgbe_mac_X550:
481 ret = ixgbe_dcb_config_rx_arbiter_82599(hw, refill, max, bwgid,
482 tsa, map);
483 break;
484 default:
485 break;
486 }
487 return ret;
488}
489
498 struct ixgbe_dcb_config *dcb_config)
499{
505
507 ixgbe_dcb_unpack_max_cee(dcb_config, max);
510
511 switch (hw->mac.type) {
513 ret = ixgbe_dcb_config_tx_desc_arbiter_82598(hw, refill, max,
514 bwgid, tsa);
515 break;
517 case ixgbe_mac_X540:
518 case ixgbe_mac_X550:
521 ret = ixgbe_dcb_config_tx_desc_arbiter_82599(hw, refill, max,
522 bwgid, tsa);
523 break;
524 default:
525 break;
526 }
527 return ret;
528}
529
538 struct ixgbe_dcb_config *dcb_config)
539{
543 u8 map[IXGBE_DCB_MAX_USER_PRIORITY] = { 0 };
546
548 ixgbe_dcb_unpack_max_cee(dcb_config, max);
552
553 switch (hw->mac.type) {
555 ret = ixgbe_dcb_config_tx_data_arbiter_82598(hw, refill, max,
556 bwgid, tsa);
557 break;
559 case ixgbe_mac_X540:
560 case ixgbe_mac_X550:
563 ret = ixgbe_dcb_config_tx_data_arbiter_82599(hw, refill, max,
564 bwgid, tsa,
565 map);
566 break;
567 default:
568 break;
569 }
570 return ret;
571}
572
581 struct ixgbe_dcb_config *dcb_config)
582{
584 u8 pfc_en;
585 u8 map[IXGBE_DCB_MAX_USER_PRIORITY] = { 0 };
586
588 ixgbe_dcb_unpack_pfc_cee(dcb_config, map, &pfc_en);
589
590 switch (hw->mac.type) {
592 ret = ixgbe_dcb_config_pfc_82598(hw, pfc_en);
593 break;
595 case ixgbe_mac_X540:
596 case ixgbe_mac_X550:
599 ret = ixgbe_dcb_config_pfc_82599(hw, pfc_en, map);
600 break;
601 default:
602 break;
603 }
604 return ret;
605}
606
615{
617 switch (hw->mac.type) {
620 break;
622 case ixgbe_mac_X540:
623 case ixgbe_mac_X550:
626 ret = ixgbe_dcb_config_tc_stats_82599(hw, NULL);
627 break;
628 default:
629 break;
630 }
631 return ret;
632}
633
642 struct ixgbe_dcb_config *dcb_config)
643{
645 u8 pfc_en;
648 u8 map[IXGBE_DCB_MAX_USER_PRIORITY] = { 0 };
651
652 /* Unpack CEE standard containers */
654 ixgbe_dcb_unpack_max_cee(dcb_config, max);
658
659 hw->mac.ops.setup_rxpba(hw, dcb_config->num_tcs.pg_tcs,
660 0, dcb_config->rx_pba_cfg);
661
662 switch (hw->mac.type) {
664 ret = ixgbe_dcb_hw_config_82598(hw, dcb_config->link_speed,
665 refill, max, bwgid, tsa);
666 break;
668 case ixgbe_mac_X540:
669 case ixgbe_mac_X550:
672 ixgbe_dcb_config_82599(hw, dcb_config);
673 ret = ixgbe_dcb_hw_config_82599(hw, dcb_config->link_speed,
674 refill, max, bwgid,
675 tsa, map);
676
677 ixgbe_dcb_config_tc_stats_82599(hw, dcb_config);
678 break;
679 default:
680 break;
681 }
682
683 if (!ret && dcb_config->pfc_mode_enable) {
684 ixgbe_dcb_unpack_pfc_cee(dcb_config, map, &pfc_en);
685 ret = ixgbe_dcb_config_pfc(hw, pfc_en, map);
686 }
687
688 return ret;
689}
690
691/* Helper routines to abstract HW specifics from DCB netlink ops */
692s32 ixgbe_dcb_config_pfc(struct ixgbe_hw *hw, u8 pfc_en, u8 *map)
693{
694 int ret = IXGBE_ERR_PARAM;
695
696 switch (hw->mac.type) {
698 ret = ixgbe_dcb_config_pfc_82598(hw, pfc_en);
699 break;
701 case ixgbe_mac_X540:
702 case ixgbe_mac_X550:
705 ret = ixgbe_dcb_config_pfc_82599(hw, pfc_en, map);
706 break;
707 default:
708 break;
709 }
710 return ret;
711}
712
713s32 ixgbe_dcb_hw_config(struct ixgbe_hw *hw, u16 *refill, u16 *max,
714 u8 *bwg_id, u8 *tsa, u8 *map)
715{
716 switch (hw->mac.type) {
718 ixgbe_dcb_config_rx_arbiter_82598(hw, refill, max, tsa);
720 tsa);
722 tsa);
723 break;
725 case ixgbe_mac_X540:
726 case ixgbe_mac_X550:
730 tsa, map);
732 tsa);
734 tsa, map);
735 break;
736 default:
737 break;
738 }
739 return 0;
740}
#define max_frame_size
Definition: ixgbe.h:359
s32 ixgbe_dcb_hw_config_cee(struct ixgbe_hw *hw, struct ixgbe_dcb_config *dcb_config)
Definition: ixgbe_dcb.c:641
s32 ixgbe_dcb_config_pfc(struct ixgbe_hw *hw, u8 pfc_en, u8 *map)
Definition: ixgbe_dcb.c:692
s32 ixgbe_dcb_hw_config(struct ixgbe_hw *hw, u16 *refill, u16 *max, u8 *bwg_id, u8 *tsa, u8 *map)
Definition: ixgbe_dcb.c:713
void ixgbe_dcb_unpack_bwgid_cee(struct ixgbe_dcb_config *cfg, int direction, u8 *bwgid)
Definition: ixgbe_dcb.c:244
s32 ixgbe_dcb_get_pfc_stats(struct ixgbe_hw *hw, struct ixgbe_hw_stats *stats, u8 tc_count)
Definition: ixgbe_dcb.c:428
s32 ixgbe_dcb_config_pfc_cee(struct ixgbe_hw *hw, struct ixgbe_dcb_config *dcb_config)
Definition: ixgbe_dcb.c:580
u8 ixgbe_dcb_get_tc_from_up(struct ixgbe_dcb_config *cfg, int direction, u8 up)
Definition: ixgbe_dcb.c:264
s32 ixgbe_dcb_calculate_tc_credits_cee(struct ixgbe_hw *hw, struct ixgbe_dcb_config *dcb_config, u32 max_frame_size, u8 direction)
Definition: ixgbe_dcb.c:95
s32 ixgbe_dcb_check_config_cee(struct ixgbe_dcb_config *dcb_config)
Definition: ixgbe_dcb.c:310
s32 ixgbe_dcb_config_rx_arbiter_cee(struct ixgbe_hw *hw, struct ixgbe_dcb_config *dcb_config)
Definition: ixgbe_dcb.c:456
void ixgbe_dcb_unpack_pfc_cee(struct ixgbe_dcb_config *cfg, u8 *map, u8 *pfc_up)
Definition: ixgbe_dcb.c:210
void ixgbe_dcb_unpack_map_cee(struct ixgbe_dcb_config *cfg, int direction, u8 *map)
Definition: ixgbe_dcb.c:287
s32 ixgbe_dcb_config_tx_data_arbiter_cee(struct ixgbe_hw *hw, struct ixgbe_dcb_config *dcb_config)
Definition: ixgbe_dcb.c:537
void ixgbe_dcb_unpack_refill_cee(struct ixgbe_dcb_config *cfg, int direction, u16 *refill)
Definition: ixgbe_dcb.c:225
void ixgbe_dcb_unpack_tsa_cee(struct ixgbe_dcb_config *cfg, int direction, u8 *tsa)
Definition: ixgbe_dcb.c:254
s32 ixgbe_dcb_config_tc_stats(struct ixgbe_hw *hw)
Definition: ixgbe_dcb.c:614
s32 ixgbe_dcb_get_tc_stats(struct ixgbe_hw *hw, struct ixgbe_hw_stats *stats, u8 tc_count)
Definition: ixgbe_dcb.c:399
s32 ixgbe_dcb_config_tx_desc_arbiter_cee(struct ixgbe_hw *hw, struct ixgbe_dcb_config *dcb_config)
Definition: ixgbe_dcb.c:497
void ixgbe_dcb_unpack_max_cee(struct ixgbe_dcb_config *cfg, u16 *max)
Definition: ixgbe_dcb.c:235
s32 ixgbe_dcb_calculate_tc_credits(u8 *bw, u16 *refill, u16 *max, int max_frame_size)
Definition: ixgbe_dcb.c:53
#define IXGBE_DCB_MAX_USER_PRIORITY
Definition: ixgbe_dcb.h:53
#define IXGBE_DCB_CREDIT_QUANTUM
Definition: ixgbe_dcb.h:43
#define IXGBE_DCB_MAX_CREDIT
Definition: ixgbe_dcb.h:46
@ ixgbe_dcb_pfc_disabled
Definition: ixgbe_dcb.h:95
#define IXGBE_DCB_TX_CONFIG
Definition: ixgbe_dcb.h:57
@ ixgbe_dcb_tsa_strict
Definition: ixgbe_dcb.h:79
#define IXGBE_DCB_BW_PERCENT
Definition: ixgbe_dcb.h:55
#define IXGBE_DCB_MAX_BW_GROUP
Definition: ixgbe_dcb.h:54
#define IXGBE_DCB_MIN_TSO_CREDIT
Definition: ixgbe_dcb.h:49
#define IXGBE_DCB_MAX_CREDIT_REFILL
Definition: ixgbe_dcb.h:44
s32 ixgbe_dcb_config_rx_arbiter_82598(struct ixgbe_hw *hw, u16 *refill, u16 *max, u8 *tsa)
s32 ixgbe_dcb_get_pfc_stats_82598(struct ixgbe_hw *hw, struct ixgbe_hw_stats *stats, u8 tc_count)
s32 ixgbe_dcb_config_tc_stats_82598(struct ixgbe_hw *hw)
s32 ixgbe_dcb_hw_config_82598(struct ixgbe_hw *hw, int link_speed, u16 *refill, u16 *max, u8 *bwg_id, u8 *tsa)
s32 ixgbe_dcb_config_pfc_82598(struct ixgbe_hw *hw, u8 pfc_en)
s32 ixgbe_dcb_config_tx_desc_arbiter_82598(struct ixgbe_hw *hw, u16 *refill, u16 *max, u8 *bwg_id, u8 *tsa)
s32 ixgbe_dcb_config_tx_data_arbiter_82598(struct ixgbe_hw *hw, u16 *refill, u16 *max, u8 *bwg_id, u8 *tsa)
s32 ixgbe_dcb_get_tc_stats_82598(struct ixgbe_hw *hw, struct ixgbe_hw_stats *stats, u8 tc_count)
s32 ixgbe_dcb_config_tx_desc_arbiter_82599(struct ixgbe_hw *hw, u16 *refill, u16 *max, u8 *bwg_id, u8 *tsa)
s32 ixgbe_dcb_config_tc_stats_82599(struct ixgbe_hw *hw, struct ixgbe_dcb_config *dcb_config)
s32 ixgbe_dcb_config_82599(struct ixgbe_hw *hw, struct ixgbe_dcb_config *dcb_config)
s32 ixgbe_dcb_hw_config_82599(struct ixgbe_hw *hw, int link_speed, u16 *refill, u16 *max, u8 *bwg_id, u8 *tsa, u8 *map)
s32 ixgbe_dcb_get_tc_stats_82599(struct ixgbe_hw *hw, struct ixgbe_hw_stats *stats, u8 tc_count)
s32 ixgbe_dcb_get_pfc_stats_82599(struct ixgbe_hw *hw, struct ixgbe_hw_stats *stats, u8 tc_count)
s32 ixgbe_dcb_config_tx_data_arbiter_82599(struct ixgbe_hw *hw, u16 *refill, u16 *max, u8 *bwg_id, u8 *tsa, u8 *map)
s32 ixgbe_dcb_config_rx_arbiter_82599(struct ixgbe_hw *hw, u16 *refill, u16 *max, u8 *bwg_id, u8 *tsa, u8 *map)
s32 ixgbe_dcb_config_pfc_82599(struct ixgbe_hw *hw, u8 pfc_en, u8 *map)
#define DEBUGOUT2(S, A, B)
Definition: ixgbe_osdep.h:106
uint8_t u8
Definition: ixgbe_osdep.h:143
uint16_t u16
Definition: ixgbe_osdep.h:145
int32_t s32
Definition: ixgbe_osdep.h:148
uint32_t u32
Definition: ixgbe_osdep.h:147
@ ixgbe_mac_X550
Definition: ixgbe_type.h:3679
@ ixgbe_mac_82598EB
Definition: ixgbe_type.h:3674
@ ixgbe_mac_X540
Definition: ixgbe_type.h:3677
@ ixgbe_mac_X550EM_a
Definition: ixgbe_type.h:3681
@ ixgbe_mac_X550EM_x
Definition: ixgbe_type.h:3680
@ ixgbe_mac_82599EB
Definition: ixgbe_type.h:3675
#define IXGBE_DCB_MAX_TRAFFIC_CLASS
Definition: ixgbe_type.h:709
#define IXGBE_ERR_CONFIG
Definition: ixgbe_type.h:4238
#define IXGBE_SUCCESS
Definition: ixgbe_type.h:4234
#define IXGBE_NOT_IMPLEMENTED
Definition: ixgbe_type.h:4275
#define IXGBE_ERR_PARAM
Definition: ixgbe_type.h:4239
u8 bw_percentage[2][IXGBE_DCB_MAX_BW_GROUP]
Definition: ixgbe_dcb.h:126
struct ixgbe_dcb_tc_config tc_config[IXGBE_DCB_MAX_TRAFFIC_CLASS]
Definition: ixgbe_dcb.h:123
enum ixgbe_dcb_pba rx_pba_cfg
Definition: ixgbe_dcb.h:130
struct ixgbe_dcb_num_tcs num_tcs
Definition: ixgbe_dcb.h:125
bool pfc_mode_enable
Definition: ixgbe_dcb.h:127
struct ixgbe_dcb_tc_path path[2]
Definition: ixgbe_dcb.h:103
enum ixgbe_dcb_pfc pfc
Definition: ixgbe_dcb.h:104
u16 data_credits_refill
Definition: ixgbe_dcb.h:88
enum ixgbe_dcb_tsa tsa
Definition: ixgbe_dcb.h:91
struct ixgbe_mac_info mac
Definition: ixgbe_type.h:4207
enum ixgbe_mac_type type
Definition: ixgbe_type.h:4115
struct ixgbe_mac_operations ops
Definition: ixgbe_type.h:4114
void(* setup_rxpba)(struct ixgbe_hw *, int, u32, int)
Definition: ixgbe_type.h:3990