Lines Matching +full:max +full:- +full:frame +full:- +full:size
2 SPDX-License-Identifier: BSD-3-Clause
4 Copyright (c) 2001-2020, Intel Corporation
42 * ixgbe_dcb_calculate_tc_credits - This calculates the ieee traffic class
49 * @max: max credits by traffic class
50 * @max_frame_size: maximum frame size
52 s32 ixgbe_dcb_calculate_tc_credits(u8 *bw, u16 *refill, u16 *max,
59 min_credit = ((max_frame_size / 2) + IXGBE_DCB_CREDIT_QUANTUM - 1) /
77 max[i] = bw[i] ? (bw[i]*IXGBE_DCB_MAX_CREDIT)/100 : min_credit;
84 * ixgbe_dcb_calculate_tc_credits_cee - Calculates traffic class credits
87 * @max_frame_size: Maximum frame size
115 min_credit = ((max_frame_size / 2) + IXGBE_DCB_CREDIT_QUANTUM - 1) /
120 p = &dcb_config->tc_config[i].path[direction];
121 bw_percent = dcb_config->bw_percentage[direction][p->bwg_id];
122 link_percentage = p->bwg_percent;
134 * larger than the max frame size so here we find the smallest
136 * greater than the max frame size.
142 p = &dcb_config->tc_config[i].path[direction];
143 bw_percent = dcb_config->bw_percentage[direction][p->bwg_id];
145 link_percentage = p->bwg_percent;
148 if (p->bwg_percent > 0 && link_percentage == 0)
152 p->link_percent = (u8)link_percentage;
162 p->data_credits_refill = (u16)credit_refill;
170 * enough to send out a jumbo frame in data plane arbitration.
184 && (hw->mac.type == ixgbe_mac_82598EB))
187 dcb_config->tc_config[i].desc_credits_max =
191 p->data_credits_max = (u16)credit_max;
199 * ixgbe_dcb_unpack_pfc_cee - Unpack dcb_config PFC info
207 * updated before calling this routine to use current up-to maps.
211 struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
227 struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
234 void ixgbe_dcb_unpack_max_cee(struct ixgbe_dcb_config *cfg, u16 *max)
236 struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
240 max[tc] = tc_config[tc].desc_credits_max;
246 struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
256 struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
265 struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
267 u8 tc = cfg->num_tcs.pg_tcs;
278 for (tc--; tc; tc--) {
296 * ixgbe_dcb_check_config_cee - Struct containing DCB settings.
324 p = &dcb_config->tc_config[j].path[i];
326 bw = p->bwg_percent;
327 bw_id = p->bwg_id;
333 if (p->tsa == ixgbe_dcb_tsa_strict) {
343 * should have non-zero bandwidth.
355 bw += dcb_config->bw_percentage[i][j];
391 * ixgbe_dcb_get_tc_stats - Returns status of each traffic class
402 switch (hw->mac.type) {
420 * ixgbe_dcb_get_pfc_stats - Returns CBFC status of each traffic class
431 switch (hw->mac.type) {
449 * ixgbe_dcb_config_rx_arbiter_cee - Config Rx arbiter
463 u16 max[IXGBE_DCB_MAX_TRAFFIC_CLASS] = { 0 };
466 ixgbe_dcb_unpack_max_cee(dcb_config, max);
471 switch (hw->mac.type) {
473 ret = ixgbe_dcb_config_rx_arbiter_82598(hw, refill, max, tsa);
480 ret = ixgbe_dcb_config_rx_arbiter_82599(hw, refill, max, bwgid,
490 * ixgbe_dcb_config_tx_desc_arbiter_cee - Config Tx Desc arbiter
503 u16 max[IXGBE_DCB_MAX_TRAFFIC_CLASS];
506 ixgbe_dcb_unpack_max_cee(dcb_config, max);
510 switch (hw->mac.type) {
512 ret = ixgbe_dcb_config_tx_desc_arbiter_82598(hw, refill, max,
520 ret = ixgbe_dcb_config_tx_desc_arbiter_82599(hw, refill, max,
530 * ixgbe_dcb_config_tx_data_arbiter_cee - Config Tx data arbiter
544 u16 max[IXGBE_DCB_MAX_TRAFFIC_CLASS];
547 ixgbe_dcb_unpack_max_cee(dcb_config, max);
552 switch (hw->mac.type) {
554 ret = ixgbe_dcb_config_tx_data_arbiter_82598(hw, refill, max,
562 ret = ixgbe_dcb_config_tx_data_arbiter_82599(hw, refill, max,
573 * ixgbe_dcb_config_pfc_cee - Config priority flow control
589 switch (hw->mac.type) {
607 * ixgbe_dcb_config_tc_stats - Config traffic class statistics
616 switch (hw->mac.type) {
634 * ixgbe_dcb_hw_config_cee - Config and enable DCB
649 u16 max[IXGBE_DCB_MAX_TRAFFIC_CLASS];
653 ixgbe_dcb_unpack_max_cee(dcb_config, max);
658 hw->mac.ops.setup_rxpba(hw, dcb_config->num_tcs.pg_tcs,
659 0, dcb_config->rx_pba_cfg);
661 switch (hw->mac.type) {
663 ret = ixgbe_dcb_hw_config_82598(hw, dcb_config->link_speed,
664 refill, max, bwgid, tsa);
672 ret = ixgbe_dcb_hw_config_82599(hw, dcb_config->link_speed,
673 refill, max, bwgid,
682 if (!ret && dcb_config->pfc_mode_enable) {
695 switch (hw->mac.type) {
712 s32 ixgbe_dcb_hw_config(struct ixgbe_hw *hw, u16 *refill, u16 *max,
715 switch (hw->mac.type) {
717 ixgbe_dcb_config_rx_arbiter_82598(hw, refill, max, tsa);
718 ixgbe_dcb_config_tx_desc_arbiter_82598(hw, refill, max, bwg_id,
720 ixgbe_dcb_config_tx_data_arbiter_82598(hw, refill, max, bwg_id,
728 ixgbe_dcb_config_rx_arbiter_82599(hw, refill, max, bwg_id,
730 ixgbe_dcb_config_tx_desc_arbiter_82599(hw, refill, max, bwg_id,
732 ixgbe_dcb_config_tx_data_arbiter_82599(hw, refill, max, bwg_id,