[openib-general] [PATCH 2/4] Modular routing engine (unicast only yet).

Eitan Zahavi eitan at mellanox.co.il
Tue Jun 13 23:32:30 PDT 2006


Hi Sasha,

OpenSM header files were used for generating documents using RoboDoc
which was slightly modified by Intel. I found it very useful when I was
learning the code.

I attach the robodoc sources and my scripts for generating the doc for
all headers in a dir.

EZ


Eitan Zahavi
Senior Engineering Director, Software Architect
Mellanox Technologies LTD
Tel:+972-4-9097208
Fax:+972-4-9593245
P.O. Box 586 Yokneam 20692 ISRAEL


> -----Original Message-----
> From: Sasha Khapyorsky [mailto:sashak at voltaire.com]
> Sent: Wednesday, June 14, 2006 2:21 AM
> To: Eitan Zahavi
> Cc: Hal Rosenstock; openib-general at openib.org; Greg Johnson; michael k
lang; Yael
> Kalka; Ofer Gigi
> Subject: Re: [PATCH 2/4] Modular routing engine (unicast only yet).
> 
> Hi Eitan,
> 
> On 14:55 Tue 13 Jun     , Eitan Zahavi wrote:
> >
> > As provided in my previous patch 1/4 comments
> > I think the callbacks should also have an entry for the MinHop stage
(maybe
> > this is the ucast_build_fwd_tables?) I have some algorithms in mind
that
> > will
> > skip that stage all-together.
> 
> We may add new callback when it will be useful.
> 
> > Also it might make sense for each routing engine to provide its own
"dump"
> > routine such that each could support difference file format if
needed.
> 
> Why we may want dump format per routing engine? Even if we are, you
may
> put it into routing engine specific code.
> 
> >
> > Rest of the comments are inline
> >
> > EZ
> >
> > Sasha Khapyorsky wrote:
> > >
> > >diff --git a/osm/include/opensm/osm_opensm.h
> > >b/osm/include/opensm/osm_opensm.h
> > >index 3235ad4..3e6e120 100644
> > >--- a/osm/include/opensm/osm_opensm.h
> > >+++ b/osm/include/opensm/osm_opensm.h
> > >@@ -92,6 +92,18 @@ BEGIN_C_DECLS
> > > *
> > > *********/
> > >
> > >+/*
> > >+ * routing engine structure - yet limited by ucast_fdb_assign and
> > >+ *      ucast_build_fwd_tables (multicast callbacks may be added
later)
> > >+ */
> > >+struct osm_routing_engine {
> > >+	const char *name;
> > >+	void *context;
> > >+	int (*ucast_build_fwd_tables)(void *context);
> > >+	int (*ucast_fdb_assign)(void *context);
> > >+	void (*delete)(void *context);
> > >+};
> > It would be nice if you added a standard header to this struct.
> > It is not clear to me what ucast_build_fwd_tables and
> > ucast_fdb_assign are mapping to.
> 
> Ok, will add.
> 
> BTW, seems OpenSM declarations were used for generation manuals or
other
> docs. Do you know are those
> 
>  /****h*
>  /****s*
>  /****f*
> 
> in use anymore? And with what is the tool?
> 
> > Please see the next section as an example for a struct header.
> > >+
> > > /****s* OpenSM: OpenSM/osm_opensm_t
> > > * NAME
> > > *	osm_opensm_t
> 
> > >@@ -1129,6 +1144,14 @@ osm_ucast_mgr_process(
> > >              i
> > >              );
> > >
> > >+    if (p_routing_eng->ucast_build_fwd_tables &&
> > >+
p_routing_eng->ucast_build_fwd_tables(p_routing_eng->context) ==
> > >0)
> > >+    {
> > >+      cl_qmap_apply_func( p_sw_guid_tbl,
> > >+                          __osm_ucast_mgr_set_table_cb, p_mgr );
> > >+    } /* fallback on the regular path in case of failures */
> > >+    else
> > >+    {
> > Please explain why this step is needed and why if the routing engine
> > function is
> > returning 0 you still invoke the standard
__osm_ucast_mgr_set_table_cb.
> 
> ->ucast_build_fwd_tables() creates fwd tables and
> __osm_ucast_mgr_set_table_cb() upload them on the switches. In case of
> ->ucast_build_fwd_tables() fatal failure (when return status is != 0),
> tables uploading will be skipped and flow will continue with default
> routing code.
> 
> Thanks for the comments.
> Sasha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: robodoc-3.2.3.tar.gz
Type: application/x-gzip
Size: 112042 bytes
Desc: robodoc-3.2.3.tar.gz
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20060614/f1b6cba6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: roboDocDir
Type: application/octet-stream
Size: 1322 bytes
Desc: roboDocDir
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20060614/f1b6cba6/attachment.obj>


More information about the general mailing list