[ofa-general] Re: [PATCH] opensm/osm_inform.c report IB traps to plugin

Sasha Khapyorsky sashak at voltaire.com
Sat Dec 13 05:50:51 PST 2008


On 11:31 Tue 09 Dec     , Eli Dorfman wrote:
> Sasha Khapyorsky wrote:
> > Hi Eli,
> > 
> > On 11:41 Mon 08 Dec     , Eli Dorfman wrote:
> >> report IB traps to plugin
> >>
> >> Signed-off-by: Eli Dorfman <elid at voltaire.com>
> >> ---
> >>  opensm/opensm/osm_inform.c |    4 +++-
> >>  1 files changed, 3 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/opensm/opensm/osm_inform.c b/opensm/opensm/osm_inform.c
> >> index f3c8ed7..bb16e3a 100644
> >> --- a/opensm/opensm/osm_inform.c
> >> +++ b/opensm/opensm/osm_inform.c
> >> @@ -565,7 +565,8 @@ osm_report_notice(IN osm_log_t * const p_log,
> >>  	}
> >>  
> >>  	/* an official Event information log */
> >> -	if (ib_notice_is_generic(p_ntc))
> >> +	if (ib_notice_is_generic(p_ntc)) {
> >> +		osm_opensm_report_event(p_subn->p_osm, OSM_EVENT_ID_TRAP, p_ntc);
> >>  		OSM_LOG(p_log, OSM_LOG_INFO,
> >>  			"Reporting Generic Notice type:%u num:%u (%s)"
> >>  			" from LID:%u GID:%s\n",
> >> @@ -575,6 +576,7 @@ osm_report_notice(IN osm_log_t * const p_log,
> >>  			cl_ntoh16(p_ntc->issuer_lid),
> >>  			inet_ntop(AF_INET6, p_ntc->issuer_gid.raw, gid_str,
> >>  				sizeof gid_str));
> >> +	}
> > 
> > Did you mean to have it osm_report_notice()? Actually it is where OpenSM
> > sends notices, not where OpenSM gets traps. Trap receiver processor is
> > located in osm_trap_rcv.c.
> 
> Yes that's what i meant. 
> When OpenSM receives traps it calls osm_report_notice(). 
> It is also call for OpenSM initiated traps (e.g. GID IN/OUT and MC CREATE/DELETE).

Ok. I see your point. Then why it should be limited by generic notice
types? Also wouldn't it be better to call plugin report callback after
notice was actually processed (eg. at end of this function)?

Sasha



More information about the general mailing list