Hi Sasha, On Mon, 27 Jul 2009 18:20:36 +0300 Sasha Khapyorsky <[email protected]> wrote:
> On 13:38 Mon 27 Jul , sebastien dugue wrote: > > > > This is useful for testing applications that send those kind of MADS. > > How this is useful in such test? Because I discovered that when using libibumad, it hangs in umad_recv() for those MADs when the client is OpenSM regardless of the timeout I set. > I see that this just drops every sort > of such MADs without letting chance to client to process it. No? Right, not so good, forget it. I guess I'll have to find out why OpenSM silently drops those MADs and why I get stuck in umad_recv(). Thanks, Sebastien. > > Sasha > > > > > > Signed-off-by: Sebastien Dugue <[email protected]> > > --- > > ibsim/sim_mad.c | 19 +++++++++++++++++++ > > 1 files changed, 19 insertions(+), 0 deletions(-) > > > > diff --git a/ibsim/sim_mad.c b/ibsim/sim_mad.c > > index 61d4866..b79a5e7 100644 > > --- a/ibsim/sim_mad.c > > +++ b/ibsim/sim_mad.c > > @@ -1170,6 +1170,25 @@ int process_packet(Client * cl, void *p, int size, > > Client ** dcl) > > if ((response = decode_sim_MAD(cl, r, &rpc, &path, data)) < 0) > > return -1; > > > > + /* Drop vendor MADs */ > > + if (((rpc.mgtclass >= IB_VENDOR_RANGE1_START_CLASS) && > > + (rpc.mgtclass <= IB_VENDOR_RANGE1_END_CLASS)) || > > + ((rpc.mgtclass >= IB_VENDOR_RANGE2_START_CLASS) && > > + (rpc.mgtclass <= IB_VENDOR_RANGE2_END_CLASS))) { > > + IBWARN("ignoring vendor MAD: class 0x%x, attr 0x%x", > > + rpc.mgtclass, rpc.attr.id); > > + goto _dropped; > > + } > > + > > + /* Drop vendor specific SM MADs */ > > + if (((rpc.mgtclass == IB_SMI_CLASS) || > > + (rpc.mgtclass == IB_SMI_DIRECT_CLASS)) && > > + (rpc.attr.id >= 0xff00)) { > > + IBWARN("ignoring vendor specific SM MAD: attr 0x%x", > > + rpc.attr.id); > > + goto _dropped; > > + } > > + > > if (rpc.method == 0x7) { > > IBWARN("lid %u got trap repress - dropping", ntohs(r->dlid)); > > *dcl = 0; > > -- > > 1.6.3.1 > > > _______________________________________________ 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
