[openib-general] Re: [PATCH] OpenSM/osm+pkey.c: no need to check pkey tables when the two ports are the same

Eitan Zahavi eitan at mellanox.co.il
Sat Mar 11 22:51:31 PST 2006


Sure, you can commit.

Hal Rosenstock wrote:
> OpenSM/osm_pkey.c: In osm_physp_share_pkey, no need to check pkey tables
> when the two ports are the same
> 
> Signed-off-by: Hal Rosenstock <halr at voltaire.com>
> 
> Index: opensm/osm_pkey.c
> ===================================================================
> --- opensm/osm_pkey.c	(revision 5741)
> +++ opensm/osm_pkey.c	(working copy)
> @@ -210,6 +210,10 @@ osm_physp_share_pkey(
>  
>    OSM_LOG_ENTER( p_log, osm_physp_share_pkey );
>  
> +  /* If two ports are same, no need to check */
> +  if (p_physp_1 == p_physp_2)
> +    return (TRUE);
> +
>    pkey_tbl1 = osm_physp_get_pkey_tbl(p_physp_1);
>    pkey_tbl2 = osm_physp_get_pkey_tbl(p_physp_2);
>    
> @@ -237,7 +241,6 @@ osm_physp_share_pkey(
>  
>      if (__osm_match_pkey(pkey1, pkey2))
>      {
> -
>        osm_log( p_log, OSM_LOG_DEBUG,
>                 "osm_physp_share_pkey: "
>                 "Matched pkeys: 0x%04x 0x%04x\n",
> 
> 




More information about the general mailing list