Hi Yevgeny,

On 12:25 Thu 15 May     , Yevgeny Kliteynik wrote:
> 
> I think this patch was somehow lost in the pile of patches
> that you recently got. Anyhow, reposting it:

It wasn't lost, I just didn't process it yet (and there still be more
unreviewed patched on the list I need to care about).

My very first thought was to not do it because such debug prints hurt
performance a lot even when log level has lower value (it was measured
very well during Up/Down routing optimizations), so I pend it in order
to get some numbers first.

Another thing I don't like is that with higher debug levels OpenSM
generates ~1GB log file just during initial sweep. But this is more
general concern.

Sasha

> Adding log messages for matched criteria of the QoS policy rule.
> 
> Signed-off-by:  Yevgeny Kliteynik <[EMAIL PROTECTED]>
> ---
>  opensm/opensm/osm_qos_policy.c |   18 +++++++++++++++---
>  1 files changed, 15 insertions(+), 3 deletions(-)
> 
> diff --git a/opensm/opensm/osm_qos_policy.c b/opensm/opensm/osm_qos_policy.c
> index 6c81872..ebe3a7f 100644
> --- a/opensm/opensm/osm_qos_policy.c
> +++ b/opensm/opensm/osm_qos_policy.c
> @@ -598,10 +598,13 @@ static osm_qos_match_rule_t 
> *__qos_policy_get_match_rule_by_params(
>  {
>       osm_qos_match_rule_t *p_qos_match_rule = NULL;
>       cl_list_iterator_t list_iterator;
> +     osm_log_t * p_log = &p_qos_policy->p_subn->p_osm->log;
> 
>       if (!cl_list_count(&p_qos_policy->qos_match_rules))
>               return NULL;
> 
> +     OSM_LOG_ENTER(p_log);
> +
>       /* Go over all QoS match rules and find the one that matches the 
> request */
> 
>       list_iterator = cl_list_head(&p_qos_policy->qos_match_rules);
> @@ -624,6 +627,8 @@ static osm_qos_match_rule_t 
> *__qos_policy_get_match_rule_by_params(
>                               list_iterator = cl_list_next(list_iterator);
>                               continue;
>                       }
> +                     OSM_LOG(&p_qos_policy->p_subn->p_osm->log, 
> OSM_LOG_DEBUG,
> +                             "Source port matched.\n");
>               }
> 
>               /* If a match rule has Destination groups, PR request dest. has 
> to be in this list */
> @@ -637,6 +642,8 @@ static osm_qos_match_rule_t 
> *__qos_policy_get_match_rule_by_params(
>                               list_iterator = cl_list_next(list_iterator);
>                               continue;
>                       }
> +                     OSM_LOG(&p_qos_policy->p_subn->p_osm->log, 
> OSM_LOG_DEBUG,
> +                             "Destination port matched.\n");
>               }
> 
>               /* If a match rule has QoS classes, PR request HAS
> @@ -655,7 +662,8 @@ static osm_qos_match_rule_t 
> *__qos_policy_get_match_rule_by_params(
>                               list_iterator = cl_list_next(list_iterator);
>                               continue;
>                       }
> -
> +                     OSM_LOG(&p_qos_policy->p_subn->p_osm->log, 
> OSM_LOG_DEBUG,
> +                             "QoS Class matched.\n");
>               }
> 
>               /* If a match rule has Service IDs, PR request HAS
> @@ -675,7 +683,8 @@ static osm_qos_match_rule_t 
> *__qos_policy_get_match_rule_by_params(
>                               list_iterator = cl_list_next(list_iterator);
>                               continue;
>                       }
> -
> +                     OSM_LOG(&p_qos_policy->p_subn->p_osm->log, 
> OSM_LOG_DEBUG,
> +                             "Service ID matched.\n");
>               }
> 
>               /* If a match rule has PKeys, PR request HAS
> @@ -694,13 +703,16 @@ static osm_qos_match_rule_t 
> *__qos_policy_get_match_rule_by_params(
>                               list_iterator = cl_list_next(list_iterator);
>                               continue;
>                       }
> -
> +                     OSM_LOG(&p_qos_policy->p_subn->p_osm->log, 
> OSM_LOG_DEBUG,
> +                             "PKey matched.\n");
>               }
> 
>               /* if we got here, then this match-rule matched this PR request 
> */
>               break;
>       }
> 
> +     OSM_LOG_EXIT(p_log);
> +
>       if (list_iterator == cl_list_end(&p_qos_policy->qos_match_rules))
>               return NULL;
> 
> -- 
> 1.5.1.4
> 
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to