[ofa-general] Re: [PATCH] opensm/osm_mcast_mgr.c: In mcast_mgr_set_tbl, only return OSM_SIGNAL_DONE_PENDING if osm_req_set successful

Sasha Khapyorsky sashak at voltaire.com
Wed Jun 17 10:03:12 PDT 2009


On 10:17 Wed 17 Jun     , Hal Rosenstock wrote:
> 
> Signed-off-by: Hal Rosenstock <hal.rosenstock at gmail.com>
> ---
> diff --git a/opensm/opensm/osm_mcast_mgr.c b/opensm/opensm/osm_mcast_mgr.c
> index de0a8a5..44292db 100644
> --- a/opensm/opensm/osm_mcast_mgr.c
> +++ b/opensm/opensm/osm_mcast_mgr.c
> @@ -3,6 +3,7 @@
>   * Copyright (c) 2002-2006 Mellanox Technologies LTD. All rights reserved.
>   * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
>   * Copyright (c) 2008 Xsigo Systems Inc.  All rights reserved.
> + * Copyright (c) 2009 HNR Consulting Inc. All rights reserved.
>   *
>   * This software is available to you under a choice of one of two
>   * licenses.  You may choose to be licensed under the terms of the GNU
> @@ -371,14 +372,14 @@ static osm_signal_t mcast_mgr_set_tbl(osm_sm_t * sm, IN osm_switch_t * p_sw)
>  				     cl_hton32(block_id_ho), CL_DISP_MSGID_NONE,
>  				     &mad_context);
>  
> -		if (status != IB_SUCCESS) {
> +		if (status == IB_SUCCESS)
> +			signal = OSM_SIGNAL_DONE_PENDING;
> +		else {
>  			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A02: "
>  				"Sending multicast fwd. tbl. block failed (%s)\n",
>  				ib_get_err_str(status));
>  		}
>  
> -		signal = OSM_SIGNAL_DONE_PENDING;
> -

The "signal" value doesn't matter anymore. Actually I think it would be
nice to rework all "managers" to return integer 0, -1 values as
success/failure status.

Sasha



More information about the general mailing list