Blame IbAccess/README

Packit 857059
IbAccess Infiniband transport stack and agents
Packit 857059
Packit 857059
Makefile design:
Packit 857059
IbAccess can be built for multiple OS types.  A large percentage of the code
Packit 857059
is designed to be portable.  However there are OS specific portions.
Packit 857059
Packit 857059
Primary directory layout is as follows:
Packit 857059
Packit 857059
Common - portable code for kernel mode and where the same user mode functions
Packit 857059
UserCommon - portable code for user mode only
Packit 857059
X - kernel code for OS X (Linux, Win2K, etc)
Packit 857059
UserX - user mode code for OS X (Linux, Win2K, etc) when applicable
Packit 857059
Packit 857059
READMEs in the X and UserX trees document the major functionality in each
Packit 857059
	directory
Packit 857059
Packit 857059
The makefiles are implemented strictly in the X and UserX directory trees.
Packit 857059
In those directories each Makefile follows the standard
Packit 857059
"module level" makefile style as generated by buildMakefile -c Common/...
Packit 857059
For example in Linux/Ibt/Cm use:
Packit 857059
	buildMakefile -c Common/Ibt/Cm
Packit 857059
Packit 857059
The -c option causes the following additions to a basic Makefile
Packit 857059
Packit 857059
COMMON_SRCDIR - is defined as the path to a peer Common directory (-c option)
Packit 857059
	for example: $(MOD_DIR)/Common/Ibt/Sma
Packit 857059
	This is used in Makerules.module to guide VPATH and MOD_INCLUDE_DIRS
Packit 857059
	to allow the given X/UserX Makefile to compile code in COMMON_SRCDIR
Packit 857059
CFILES - files which are to be compiled from the local directory (directory
Packit 857059
	Makefile appears in) as well as files to be compiled from COMMON_SRCDIR
Packit 857059
	due to VPATH in Makerules.module, simple filenames must be listed for each.
Packit 857059
INCLUDE_TARGETS - files which are to be public includes from the local
Packit 857059
	directory and the COMMON_SRCDIR.  Here the files in the COMMON_SRCDIR
Packit 857059
	must be listed as full paths (eg. $(COMMON_SRCDIR)/header.h).
Packit 857059
Packit 857059
The Makefiles for Each OS can decide which common files need to be compiled
Packit 857059
and exported.
Packit 857059
In some cases a given OS may only need a subset of the common capabilities
Packit 857059
(especially from the OsAbstraction/Public component).
Packit 857059
Those which are disabled are moved below the "Add more x files here" line
Packit 857059
and are commented out (note that due to \ missing on "Add more ..." line
Packit 857059
there is no problem with leaving a backslash at the end of these commented
Packit 857059
out lines.)
Packit 857059
Packit 857059
To Add a VPD Interface:
Packit 857059
edit vpd_export.h, and update VPD_INTERFACE_VERSION_LATEST in enum (add a new
Packit 857059
enum value).
Packit 857059
update vca to use the interface
Packit 857059
update Verbs Drivers to:
Packit 857059
	- report new interface version in VcaRegisterVpd3 (always use explicit not LATEST)
Packit 857059
	- implement new interface
Packit 857059
	- update va_verbs value returned
Packit 857059
No need to rename VcaRegisterVpd nor VPD_KM_INTERFACE
Packit 857059
Packit 857059
To add a UVP Interface:
Packit 857059
edit uvp_export.h and update UVP_INTERFACE_VERSION_LATEST in enum (add a new enum value)
Packit 857059
update uvca to use the interface
Packit 857059
update UVP Verbs drivers to:
Packit 857059
	- return new interface version in GetVersion (always use explicit not LATEST)
Packit 857059
	- implement new interface
Packit 857059
	- update Interface function table value returned
Packit 857059
No need to rename UVP_INTERFACE
Packit 857059
Packit 857059
To add a Verbs interface:
Packit 857059
- implement function in vca (iba_*) and export it (use an existing
Packit 857059
	function such as iba_post_send as an example of what is needed
Packit 857059
- update vpi_export.h to export the function (no need to add to deprecated
Packit 857059
	VPI_KM_INTERFACE)
Packit 857059
- implement function in uvca (iba_*) (see an existing function)
Packit 857059
- update uvca_export.h to export the function (no need to add to deprecated
Packit 857059
	VPI_UM_INTERFACE)
Packit 857059
- update IBT_VERSION to next number
Packit 857059
- as needed add to UVP and/or VPD interface (see above)
Packit 857059
Packit 857059
For windows declare IBA_API in UserWindows/../datatypes_osd.h as follows:
Packit 857059
#ifdef _IBA_API_EXPORTS_
Packit 857059
#undef IBA_API
Packit 857059
#define IBA_API __declspec(dllexport)
Packit 857059
#else
Packit 857059
#undef IBA_API
Packit 857059
#define IBA_API __declspec(dllimport)
Packit 857059
#endif // _IBA_API_EXPORTS_