Blame IbAccess/Common/Inc/cm_params.h

Packit 857059
/* BEGIN_ICS_COPYRIGHT4 ****************************************
Packit 857059
Packit 857059
Copyright (c) 2015, Intel Corporation
Packit 857059
Packit 857059
Redistribution and use in source and binary forms, with or without
Packit 857059
modification, are permitted provided that the following conditions are met:
Packit 857059
Packit 857059
    * Redistributions of source code must retain the above copyright notice,
Packit 857059
      this list of conditions and the following disclaimer.
Packit 857059
    * Redistributions in binary form must reproduce the above copyright
Packit 857059
      notice, this list of conditions and the following disclaimer in the
Packit 857059
     documentation and/or other materials provided with the distribution.
Packit 857059
    * Neither the name of Intel Corporation nor the names of its contributors
Packit 857059
      may be used to endorse or promote products derived from this software
Packit 857059
      without specific prior written permission.
Packit 857059
Packit 857059
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Packit 857059
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit 857059
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Packit 857059
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
Packit 857059
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit 857059
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Packit 857059
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Packit 857059
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Packit 857059
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Packit 857059
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit 857059
Packit 857059
** END_ICS_COPYRIGHT4   ****************************************/
Packit 857059
Packit 857059
/* [ICS VERSION STRING: unknown] */
Packit 857059
Packit 857059
/* Suppress duplicate loading of this file */
Packit 857059
#ifndef _IBA_IB_CM_PARAMS_H_
Packit 857059
#define _IBA_IB_CM_PARAMS_H_
Packit 857059
Packit 857059
Packit 857059
#if defined (__cplusplus)
Packit 857059
extern "C" {
Packit 857059
#endif
Packit 857059
Packit 857059
#include "datatypes.h"
Packit 857059
Packit 857059
/* default values for CM tunable parameters */
Packit 857059
#define CM_MAX_NDGRM					30000	/* This should be >= # of QP */
Packit 857059
#define CM_MAX_CONNECTIONS				2048	/* CEP limit in CmWait */
Packit 857059
#define CM_REQ_RETRY					8		/* REQ and SIDR_REQ */
Packit 857059
#define CM_REP_RETRY					8		/* REP */
Packit 857059
	/* controls over growth of Cm Dgrm Pool */
Packit 857059
#define CM_DGRM_INITIAL					2048 /* initial size */
Packit 857059
#define CM_DGRM_LOW_WATER				100 /* low water point */
Packit 857059
#define CM_DGRM_INCREMENT				500	/* amount to grow by */
Packit 857059
Packit 857059
/* Default Max backlog for a passive endpoint before we start */
Packit 857059
/* discarding incoming connection requests or mark the passive */
Packit 857059
/* endpoint as dead (adjustable per CEP via CmModifyCEP) */
Packit 857059
#define CM_MAX_BACKLOG					1024
Packit 857059
Packit 857059
/* Initial average turnaround time */
Packit 857059
#define CM_TURNAROUND_TIME_MS			60		/* 60 ms */
Packit 857059
Packit 857059
/* Default Min turnaround time setting (bounds avg and CmModifyCEP setting) */
Packit 857059
#define CM_MIN_TURNAROUND_TIME_MS		40		/* 40 ms */
Packit 857059
Packit 857059
/* Default Max turnaround time setting (bounds avg and CmModifyCEP setting) */
Packit 857059
#define CM_MAX_TURNAROUND_TIME_MS		4000	/* 4 seconds */
Packit 857059
Packit 857059
/* Default SIDR req timeout */
Packit 857059
#define SIDR_REQ_TIMEOUT_MS				8		/* 8 ms */
Packit 857059
Packit 857059
/* if 1, allow QP to be reused in TimeWait state */
Packit 857059
#define CM_REUSE_QP						0
Packit 857059
Packit 857059
/* if 1, don't check PKey and GID validity */
Packit 857059
#define CM_DISABLE_VALIDATION			0
Packit 857059
Packit 857059
typedef struct _CM_PARAMS {
Packit 857059
	uint32		MaxDgrms;
Packit 857059
	uint32		PreallocDgrms;
Packit 857059
	uint32		MinFreeDgrms;
Packit 857059
	uint32		DgrmIncrement;
Packit 857059
	uint32		MaxConns;
Packit 857059
	uint32		MaxReqRetry;
Packit 857059
	uint32		MaxRepRetry;
Packit 857059
	uint32		MaxBackLog;
Packit 857059
	uint32		SidrReqTimeoutMs;	/* CPU processing part of timeout */
Packit 857059
	uint32		TurnaroundTimeMs;
Packit 857059
	uint32		MinTurnaroundTimeMs;
Packit 857059
	uint32		MaxTurnaroundTimeMs;
Packit 857059
	uint32		ReuseQP;
Packit 857059
	uint32		DisableValidation;
Packit 857059
} CM_PARAMS;
Packit 857059
Packit 857059
extern CM_PARAMS	gCmParams;
Packit 857059
Packit 857059
#if defined (__cplusplus)
Packit 857059
};
Packit 857059
#endif
Packit 857059
Packit 857059
#endif  /* _IBA_IB_CM_PARAMS_H_ */