On Tue, 13 Apr 2010 13:38:26 -0700
Ira Weiny <wei...@llnl.gov> wrote:

> This changes the logic.  "num_smps_outstanding" is NOT the number on the 
> wire, but it appears you have made it so.  This is the number which will 
> cause process_smp_queue to continue being called.
> 
> If you are going to do this I think you need to change process_mads as well 
> as process_one_recv.  We discussed process_one_recv in the error case.
> 
> What were you trying to fix?

Ok, I think I see.  We should move cl_qmap_insert to after a successful 
umad_send and putting total_smps here is ok.  But num_smps_outstanding should 
be put back I think.

Ira

> 
> Ira
> 
> On Tue, 13 Apr 2010 19:38:36 +0300
> Sasha Khapyorsky <sas...@voltaire.com> wrote:
> 
> > 
> > send_smp() failure blocks whole discovery execution (it never returns).
> > Fix this by updating all outstanding SMPs related counters only after
> > successful MAD sending.
> > 
> > Signed-off-by: Sasha Khapyorsky <sas...@voltaire.com>
> > ---
> >  infiniband-diags/libibnetdisc/src/query_smp.c |    8 ++++----
> >  1 files changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/infiniband-diags/libibnetdisc/src/query_smp.c 
> > b/infiniband-diags/libibnetdisc/src/query_smp.c
> > index b4322bc..08e3ef7 100644
> > --- a/infiniband-diags/libibnetdisc/src/query_smp.c
> > +++ b/infiniband-diags/libibnetdisc/src/query_smp.c
> > @@ -96,10 +96,12 @@ static int process_smp_queue(smp_engine_t * engine)
> >             if (!smp)
> >                     return 0;
> >  
> > -           cl_qmap_insert(&engine->smps_on_wire, (uint32_t) smp->rpc.trid,
> > -                          (cl_map_item_t *) smp);
> >             if ((rc = send_smp(smp, engine->ibmad_port)) != 0)
> >                     return rc;
> > +           engine->num_smps_outstanding++;
> > +           cl_qmap_insert(&engine->smps_on_wire, (uint32_t) smp->rpc.trid,
> > +                          (cl_map_item_t *) smp);
> > +           engine->total_smps++;
> >     }
> >     return 0;
> >  }
> > @@ -133,8 +135,6 @@ int issue_smp(smp_engine_t * engine, ib_portid_t * 
> > portid,
> >     portid->sl = 0;
> >     portid->qp = 0;
> >  
> > -   engine->total_smps++;
> > -   engine->num_smps_outstanding++;
> >     queue_smp(engine, smp);
> >     return process_smp_queue(engine);
> >  }
> > -- 
> > 1.7.0.4
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> > the body of a message to majord...@vger.kernel.org
> > More majordomo info at  http://*vger.kernel.org/majordomo-info.html
> > 
> 
> 
> -- 
> Ira Weiny
> Math Programmer/Computer Scientist
> Lawrence Livermore National Lab
> 925-423-8008
> wei...@llnl.gov


-- 
Ira Weiny
Math Programmer/Computer Scientist
Lawrence Livermore National Lab
925-423-8008
wei...@llnl.gov
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to