if (!vsi_ctx)
goto exit_sched_rm_vsi_cfg;
- for (i = 0; i < ICE_MAX_TRAFFIC_CLASS; i++) {
+ ice_for_each_traffic_class(i) {
struct ice_sched_node *vsi_node, *tc_node;
u8 j = 0;
LIST_ADD(&agg_info->list_entry, &hw->agg_list);
}
/* Create aggregator node(s) for requested TC(s) */
- for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
+ ice_for_each_traffic_class(tc) {
if (!ice_is_tc_ena(*tc_bitmap, tc)) {
/* Delete aggregator cfg TC if it exists previously */
status = ice_rm_agg_cfg_tc(pi, agg_info, tc, false);
LIST_ADD(&agg_vsi_info->list_entry, &agg_info->agg_vsi_list);
}
/* Move VSI node to new aggregator node for requested TC(s) */
- for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
+ ice_for_each_traffic_class(tc) {
if (!ice_is_tc_ena(*tc_bitmap, tc))
continue;
goto exit_ice_rm_agg_cfg;
}
- for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
+ ice_for_each_traffic_class(tc) {
status = ice_rm_agg_cfg_tc(pi, agg_info, tc, true);
if (status)
goto exit_ice_rm_agg_cfg;
ice_acquire_lock(&pi->sched_lock);
/* Return success if no nodes are present across TC */
- for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
+ ice_for_each_traffic_class(tc) {
struct ice_sched_node *tc_node, *vsi_node;
if (!ice_is_tc_ena(ena_tcmap, tc))
}
/* Return success if no nodes are present across TC */
- for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
+ ice_for_each_traffic_class(tc) {
struct ice_sched_node *tc_node, *agg_node;
if (!ice_is_tc_ena(ena_tcmap, tc))
if (!vsi_ctx)
return ICE_ERR_PARAM;
- for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
+ ice_for_each_traffic_class(tc) {
struct ice_sched_node *node;
node = vsi_ctx->sched.ag_node[tc];
return ICE_ERR_PARAM;
/* Return success if no nodes are present across TC */
- for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
+ ice_for_each_traffic_class(tc) {
struct ice_sched_node *tc_node, *vsi_node;
enum ice_rl_type rl_type = ICE_SHARED_BW;
enum ice_status status;
if (status)
goto exit_set_vsi_bw_shared_lmt;
/* Return success if no nodes are present across TC */
- for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
+ ice_for_each_traffic_class(tc) {
struct ice_sched_node *tc_node, *vsi_node;
enum ice_rl_type rl_type = ICE_SHARED_BW;
if (!agg_id_present)
return ICE_ERR_PARAM;
/* Return success if no nodes are present across TC */
- for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
+ ice_for_each_traffic_class(tc) {
struct ice_sched_node *tc_node, *agg_node;
enum ice_rl_type rl_type = ICE_SHARED_BW;
}
/* Return success if no nodes are present across TC */
- for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
+ ice_for_each_traffic_class(tc) {
enum ice_rl_type rl_type = ICE_SHARED_BW;
struct ice_sched_node *tc_node, *agg_node;
if (!agg_info)
return ICE_ERR_PARAM;
- for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
+ ice_for_each_traffic_class(tc) {
if (!ice_is_any_bit_set(agg_info->bw_t_info[tc].bw_t_bitmap,
ICE_BW_TYPE_CNT))
continue;
u8 tc;
/* Some TC(s) may be missing after reset, adjust for replay */
- for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++)
+ ice_for_each_traffic_class(tc)
if (ice_is_tc_ena(*tc_bitmap, tc) &&
(ice_sched_get_tc_node(pi, tc)))
ice_set_bit(tc, ena_tc_bitmap);
u8 tc;
ice_acquire_lock(&pi->sched_lock);
- for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
+ ice_for_each_traffic_class(tc) {
struct ice_sched_node *tc_node;
tc_node = ice_sched_get_tc_node(hw->port_info, tc);
vsi_ctx = ice_get_vsi_ctx(pi->hw, vsi_handle);
if (!vsi_ctx)
return ICE_ERR_PARAM;
- for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
+ ice_for_each_traffic_class(tc) {
if (!ice_is_tc_ena(*tc_bitmap, tc))
continue;
tc_node = ice_sched_get_tc_node(pi, tc);