Blame ptl_am/psm_am_internal.h

Packit 961e70
/*
Packit 961e70
Packit 961e70
  This file is provided under a dual BSD/GPLv2 license.  When using or
Packit 961e70
  redistributing this file, you may do so under either license.
Packit 961e70
Packit 961e70
  GPL LICENSE SUMMARY
Packit 961e70
Packit 961e70
  Copyright(c) 2015 Intel Corporation.
Packit 961e70
Packit 961e70
  This program is free software; you can redistribute it and/or modify
Packit 961e70
  it under the terms of version 2 of the GNU General Public License as
Packit 961e70
  published by the Free Software Foundation.
Packit 961e70
Packit 961e70
  This program is distributed in the hope that it will be useful, but
Packit 961e70
  WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 961e70
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 961e70
  General Public License for more details.
Packit 961e70
Packit 961e70
  Contact Information:
Packit 961e70
  Intel Corporation, www.intel.com
Packit 961e70
Packit 961e70
  BSD LICENSE
Packit 961e70
Packit 961e70
  Copyright(c) 2015 Intel Corporation.
Packit 961e70
Packit 961e70
  Redistribution and use in source and binary forms, with or without
Packit 961e70
  modification, are permitted provided that the following conditions
Packit 961e70
  are met:
Packit 961e70
Packit 961e70
    * Redistributions of source code must retain the above copyright
Packit 961e70
      notice, this list of conditions and the following disclaimer.
Packit 961e70
    * Redistributions in binary form must reproduce the above copyright
Packit 961e70
      notice, this list of conditions and the following disclaimer in
Packit 961e70
      the documentation and/or other materials provided with the
Packit 961e70
      distribution.
Packit 961e70
    * Neither the name of Intel Corporation nor the names of its
Packit 961e70
      contributors may be used to endorse or promote products derived
Packit 961e70
      from this software without specific prior written permission.
Packit 961e70
Packit 961e70
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Packit 961e70
  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Packit 961e70
  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Packit 961e70
  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Packit 961e70
  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Packit 961e70
  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Packit 961e70
  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Packit 961e70
  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Packit 961e70
  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Packit 961e70
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Packit 961e70
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit 961e70
Packit 961e70
*/
Packit 961e70
Packit 961e70
/* Copyright (c) 2003-2015 Intel Corporation. All rights reserved. */
Packit 961e70
Packit 961e70
#ifndef PSMI_AM_H
Packit 961e70
#define PSMI_AM_H
Packit 961e70
Packit 961e70
#include "am_config.h"
Packit 961e70
#include "../psm_am_internal.h"
Packit 961e70
Packit 961e70
#define AMSH_DIRBLOCK_SIZE 128
Packit 961e70
Packit 961e70
typedef
Packit 961e70
struct am_epaddr {
Packit 961e70
	/*
Packit 961e70
	 * epaddr must be the first field to have the same address as this
Packit 961e70
	 * structure
Packit 961e70
	 */
Packit 961e70
	struct psm2_epaddr epaddr;
Packit 961e70
Packit 961e70
	uint16_t shmidx;
Packit 961e70
	uint16_t return_shmidx;
Packit 961e70
Packit Service 7ed5cc
	uint32_t cstate_outgoing:3;
Packit Service 7ed5cc
	uint32_t cstate_incoming:3;
Packit 961e70
	uint32_t pid:22;
Packit Service 7ed5cc
	/*
Packit Service 7ed5cc
	 * Device number of GPU used by given EP, only used when CUDA is
Packit Service 7ed5cc
	 * enabled. There is no gain from #ifdefing it out, since it does not
Packit Service 7ed5cc
	 * use any extra space.
Packit Service 7ed5cc
	 */
Packit Service 7ed5cc
	uint32_t gpuid:4;
Packit 961e70
} am_epaddr_t;
Packit 961e70
Packit 961e70
/* Up to NSHORT_ARGS are supported via am_pkt_short_t; the remaining
Packit 961e70
   arguments are passed using space in am_pkt_bulk_t.  One additional argument
Packit 961e70
   is added for passing the internal ptl_am handler index. */
Packit 961e70
#define NSHORT_ARGS 6
Packit 961e70
#define NBULK_ARGS  (PSMI_AM_MAX_ARGS - NSHORT_ARGS + 1)
Packit 961e70
Packit 961e70
typedef
Packit 961e70
struct amsh_am_token {
Packit 961e70
	struct psmi_am_token tok;
Packit 961e70
Packit 961e70
	ptl_t *ptl;	  /**> What PTL was it received on */
Packit 961e70
	psm2_mq_t mq;	  /**> What matched queue is this for ? */
Packit 961e70
	uint16_t shmidx;  /**> what shmidx sent this */
Packit 961e70
} amsh_am_token_t;
Packit 961e70
Packit 961e70
typedef void (*psmi_handler_fn_t) (void *token, psm2_amarg_t *args, int nargs,
Packit 961e70
				   void *src, size_t len);
Packit 961e70
Packit 961e70
typedef struct psmi_handlertab {
Packit 961e70
	psmi_handler_fn_t fn;
Packit 961e70
} psmi_handlertab_t;
Packit 961e70
Packit 961e70
#define PSMI_AM_CONN_REQ    1
Packit 961e70
#define PSMI_AM_CONN_REP    2
Packit 961e70
#define PSMI_AM_DISC_REQ    3
Packit 961e70
#define PSMI_AM_DISC_REP    4
Packit 961e70
Packit 961e70
#define PSMI_KASSIST_OFF       0x0
Packit 961e70
#define PSMI_KASSIST_CMA_GET   0x1
Packit 961e70
#define PSMI_KASSIST_CMA_PUT   0x2
Packit 961e70
Packit 961e70
#define PSMI_KASSIST_CMA       0x3
Packit 961e70
#define PSMI_KASSIST_GET       0x1
Packit 961e70
#define PSMI_KASSIST_PUT       0x2
Packit 961e70
#define PSMI_KASSIST_MASK      0x3
Packit 961e70
Packit 961e70
int psmi_epaddr_pid(psm2_epaddr_t epaddr);
Packit 961e70
Packit 961e70
/*
Packit 961e70
 * Eventually, we will allow users to register handlers as "don't reply", which
Packit 961e70
 * may save on some of the buffering requirements
Packit 961e70
 */
Packit 961e70
#define PSMI_HANDLER_NEEDS_REPLY(handler)    1
Packit 961e70
#define PSMI_VALIDATE_REPLY(handler)    assert(PSMI_HANDLER_NEEDS_REPLY(handler))
Packit 961e70
Packit 961e70
int psmi_amsh_poll(ptl_t *ptl, int replyonly);
Packit 961e70
Packit 961e70
/* Shared memory AM, forward decls */
Packit 961e70
int
Packit 961e70
psmi_amsh_short_request(ptl_t *ptl, psm2_epaddr_t epaddr,
Packit 961e70
			psm2_handler_t handler, psm2_amarg_t *args, int nargs,
Packit 961e70
			const void *src, size_t len, int flags);
Packit 961e70
Packit 961e70
void
Packit 961e70
psmi_amsh_short_reply(amsh_am_token_t *tok,
Packit 961e70
		      psm2_handler_t handler, psm2_amarg_t *args, int nargs,
Packit 961e70
		      const void *src, size_t len, int flags);
Packit 961e70
Packit 961e70
int
Packit 961e70
psmi_amsh_long_request(ptl_t *ptl, psm2_epaddr_t epaddr,
Packit 961e70
		       psm2_handler_t handler, psm2_amarg_t *args, int nargs,
Packit 961e70
		       const void *src, size_t len, void *dest, int flags);
Packit 961e70
Packit 961e70
void
Packit 961e70
psmi_amsh_long_reply(amsh_am_token_t *tok,
Packit 961e70
		     psm2_handler_t handler, psm2_amarg_t *args, int nargs,
Packit 961e70
		     const void *src, size_t len, void *dest, int flags);
Packit 961e70
Packit 961e70
void psmi_am_mq_handler(void *toki, psm2_amarg_t *args, int narg, void *buf,
Packit 961e70
			size_t len);
Packit 961e70
Packit 961e70
void psmi_am_mq_handler(void *toki, psm2_amarg_t *args, int narg, void *buf,
Packit 961e70
			size_t len);
Packit 961e70
void psmi_am_mq_handler_data(void *toki, psm2_amarg_t *args, int narg,
Packit 961e70
			     void *buf, size_t len);
Packit 961e70
void psmi_am_mq_handler_complete(void *toki, psm2_amarg_t *args, int narg,
Packit 961e70
				 void *buf, size_t len);
Packit 961e70
void psmi_am_mq_handler_rtsmatch(void *toki, psm2_amarg_t *args, int narg,
Packit 961e70
				 void *buf, size_t len);
Packit 961e70
void psmi_am_mq_handler_rtsdone(void *toki, psm2_amarg_t *args, int narg,
Packit 961e70
				void *buf, size_t len);
Packit 961e70
void psmi_am_handler(void *toki, psm2_amarg_t *args, int narg, void *buf,
Packit 961e70
		     size_t len);
Packit 961e70
Packit 961e70
/* AM over shared memory (forward decls) */
Packit 961e70
psm2_error_t
Packit 961e70
psmi_amsh_am_get_parameters(psm2_ep_t ep, struct psm2_am_parameters *parameters);
Packit 961e70
Packit 961e70
psm2_error_t
Packit 961e70
psmi_amsh_am_short_request(psm2_epaddr_t epaddr,
Packit 961e70
			   psm2_handler_t handler, psm2_amarg_t *args, int nargs,
Packit 961e70
			   void *src, size_t len, int flags,
Packit 961e70
			   psm2_am_completion_fn_t completion_fn,
Packit 961e70
			   void *completion_ctxt);
Packit 961e70
Packit 961e70
psm2_error_t
Packit 961e70
psmi_amsh_am_short_reply(psm2_am_token_t tok,
Packit 961e70
			 psm2_handler_t handler, psm2_amarg_t *args, int nargs,
Packit 961e70
			 void *src, size_t len, int flags,
Packit 961e70
			 psm2_am_completion_fn_t completion_fn,
Packit 961e70
			 void *completion_ctxt);
Packit 961e70
Packit 961e70
#define amsh_conn_handler_hidx	 1
Packit 961e70
#define mq_handler_hidx          2
Packit 961e70
#define mq_handler_data_hidx     3
Packit 961e70
#define mq_handler_rtsmatch_hidx 4
Packit 961e70
#define mq_handler_rtsdone_hidx  5
Packit 961e70
#define am_handler_hidx          6
Packit 961e70
Packit 961e70
#define AMREQUEST_SHORT 0
Packit 961e70
#define AMREQUEST_LONG  1
Packit 961e70
#define AMREPLY_SHORT   2
Packit 961e70
#define AMREPLY_LONG    3
Packit 961e70
#define AM_IS_REPLY(x)     ((x)&0x2)
Packit 961e70
#define AM_IS_REQUEST(x)   (!AM_IS_REPLY(x))
Packit 961e70
#define AM_IS_LONG(x)      ((x)&0x1)
Packit 961e70
#define AM_IS_SHORT(x)     (!AM_IS_LONG(x))
Packit 961e70
Packit 961e70
#define AM_FLAG_SRC_ASYNC   0x1
Packit 961e70
#define AM_FLAG_SRC_TEMP    0x2
Packit 961e70
Packit 961e70
/*
Packit 961e70
 * Request Fifo.
Packit 961e70
 */
Packit 961e70
typedef
Packit 961e70
struct am_reqq {
Packit 961e70
	struct am_reqq *next;
Packit 961e70
Packit 961e70
	ptl_t *ptl;
Packit 961e70
	psm2_epaddr_t epaddr;
Packit 961e70
	int amtype;
Packit 961e70
	psm2_handler_t handler;
Packit 961e70
	psm2_amarg_t args[8];
Packit 961e70
	int nargs;
Packit 961e70
	uint32_t len;
Packit 961e70
	void *src;
Packit 961e70
	void *dest;
Packit 961e70
	int amflags;
Packit 961e70
	int flags;
Packit 961e70
} am_reqq_t;
Packit 961e70
Packit 961e70
struct am_reqq_fifo_t {
Packit 961e70
	am_reqq_t *first;
Packit 961e70
	am_reqq_t **lastp;
Packit 961e70
};
Packit 961e70
Packit 961e70
psm2_error_t psmi_am_reqq_drain(ptl_t *ptl);
Packit 961e70
void psmi_am_reqq_add(int amtype, ptl_t *ptl, psm2_epaddr_t epaddr,
Packit 961e70
		      psm2_handler_t handler, psm2_amarg_t *args, int nargs,
Packit 961e70
		      void *src, size_t len, void *dest, int flags);
Packit 961e70
Packit 961e70
/*
Packit 961e70
 * Shared memory Active Messages, implementation derived from
Packit 961e70
 * Lumetta, Mainwaring, Culler.  Multi-Protocol Active Messages on a Cluster of
Packit 961e70
 * SMP's. Supercomputing 1997.
Packit 961e70
 *
Packit 961e70
 * We support multiple endpoints in shared memory, but we only support one
Packit 961e70
 * shared memory context with up to AMSH_MAX_LOCAL_PROCS local endpoints. Some
Packit 961e70
 * structures are endpoint specific (as denoted * with amsh_ep_) and others are
Packit 961e70
 * specific to the single shared memory context * (amsh_ global variables).
Packit 961e70
 *
Packit 961e70
 * Each endpoint maintains a shared request block and a shared reply block.
Packit 961e70
 * Each block is composed of queues for small, medium and large messages.
Packit 961e70
 */
Packit 961e70
Packit 961e70
#define QFREE      0
Packit 961e70
#define QUSED      1
Packit 961e70
#define QREADY     2
Packit 961e70
#define QREADYMED  3
Packit 961e70
#define QREADYLONG 4
Packit 961e70
Packit 961e70
#define QISEMPTY(flag) (flag < QREADY)
Packit 961e70
#if defined(__x86_64__) || defined(__i386__)
Packit 961e70
#  define _QMARK_FLAG_FENCE()  asm volatile("" : : : "memory")	/* compilerfence */
Packit 961e70
#else
Packit 961e70
#  error No _QMARK_FLAG_FENCE() defined for this platform
Packit 961e70
#endif
Packit 961e70
Packit 961e70
#define _QMARK_FLAG(pkt_ptr, _flag)		\
Packit 961e70
	do {					\
Packit 961e70
		_QMARK_FLAG_FENCE();		\
Packit 961e70
		(pkt_ptr)->flag = (_flag);	\
Packit 961e70
	} while (0)
Packit 961e70
Packit 961e70
#define QMARKFREE(pkt_ptr)  _QMARK_FLAG(pkt_ptr, QFREE)
Packit 961e70
#define QMARKREADY(pkt_ptr) _QMARK_FLAG(pkt_ptr, QREADY)
Packit 961e70
#define QMARKUSED(pkt_ptr)  _QMARK_FLAG(pkt_ptr, QUSED)
Packit 961e70
Packit 961e70
#define AMFMT_SYSTEM       1
Packit 961e70
#define AMFMT_SHORT_INLINE 2
Packit 961e70
#define AMFMT_SHORT        3
Packit 961e70
#define AMFMT_LONG         4
Packit 961e70
#define AMFMT_LONG_END     5
Packit 961e70
Packit 961e70
#define AMSH_CMASK_NONE    0
Packit 961e70
#define AMSH_CMASK_PREREQ  1
Packit 961e70
#define AMSH_CMASK_POSTREQ 2
Packit 961e70
#define AMSH_CMASK_DONE    3
Packit 961e70
Packit 961e70
#define AMSH_CSTATE_OUTGOING_NONE 		1
Packit 961e70
#define AMSH_CSTATE_OUTGOING_REPLIED 		2
Packit 961e70
#define AMSH_CSTATE_OUTGOING_ESTABLISHED 	3
Packit 961e70
#define AMSH_CSTATE_OUTGOING_DISC_REPLIED 	4
Packit 961e70
#define AMSH_CSTATE_OUTGOING_DISC_REQUESTED 	5
Packit 961e70
Packit 961e70
#define AMSH_CSTATE_INCOMING_NONE 		1
Packit 961e70
#define AMSH_CSTATE_INCOMING_DISC_REQUESTED 	4
Packit 961e70
#define AMSH_CSTATE_INCOMING_ESTABLISHED 	5
Packit 961e70
Packit 961e70
#define AMSH_PID_UNKNOWN			0
Packit 961e70
Packit 961e70
/**********************************
Packit 961e70
 * Shared memory packet formats
Packit 961e70
 **********************************/
Packit 961e70
typedef
Packit 961e70
struct am_pkt_short {
Packit 961e70
	uint32_t flag;	      /**> Packet state */
Packit 961e70
	union {
Packit 961e70
		uint32_t bulkidx; /**> index in bulk packet queue */
Packit 961e70
		uint32_t length;  /**> length when no bulkidx used */
Packit 961e70
	};
Packit 961e70
	uint16_t shmidx;      /**> index in shared segment */
Packit 961e70
	uint16_t type;
Packit 961e70
	uint16_t nargs;
Packit 961e70
	uint16_t handleridx;
Packit 961e70
Packit 961e70
	psm2_amarg_t args[NSHORT_ARGS];	/* AM arguments */
Packit 961e70
Packit 961e70
	/* We eventually will expose up to 8 arguments, but this isn't implemented
Packit 961e70
	 * For now.  >6 args will probably require a medium instead of a short */
Packit 961e70
} __attribute__ ((aligned(64)))
Packit 961e70
am_pkt_short_t;
Packit 961e70
PSMI_STRICT_SIZE_DECL(am_pkt_short_t, 64);
Packit 961e70
Packit 961e70
typedef struct am_pkt_bulk {
Packit 961e70
	uint32_t flag;
Packit 961e70
	uint32_t idx;
Packit 961e70
	uintptr_t dest;		/* Destination pointer in "longs" */
Packit 961e70
	uint32_t dest_off;	/* Destination pointer offset */
Packit 961e70
	uint32_t len;		/* Destination length within offset */
Packit 961e70
	psm2_amarg_t args[NBULK_ARGS];	/* Additional "spillover" for >6 args */
Packit 961e70
	uint8_t payload[0];
Packit 961e70
} am_pkt_bulk_t;
Packit 961e70
/* No strict size decl, used for mediums and longs */
Packit 961e70
Packit 961e70
/****************************************************
Packit 961e70
 * Shared memory header and block control structures
Packit 961e70
 ***************************************************/
Packit 961e70
Packit 961e70
/* Each pkt queue has the same header format, although the queue
Packit 961e70
 * consumers don't use the 'head' index in the same manner. */
Packit 961e70
typedef struct am_ctl_qhdr {
Packit 961e70
	uint32_t head;		/* Touched only by 1 consumer */
Packit 961e70
	uint8_t _pad0[64 - 4];
Packit 961e70
Packit 961e70
	pthread_spinlock_t lock;
Packit 961e70
	uint32_t tail;		/* XXX candidate for fetch-and-incr */
Packit 961e70
	uint32_t elem_cnt;
Packit 961e70
	uint32_t elem_sz;
Packit 961e70
	uint8_t _pad1[64 - 3 * 4 - sizeof(pthread_spinlock_t)];
Packit 961e70
} am_ctl_qhdr_t;
Packit 961e70
PSMI_STRICT_SIZE_DECL(am_ctl_qhdr_t, 128);
Packit 961e70
Packit 961e70
/* Each process has a reply qhdr and a request qhdr */
Packit 961e70
typedef struct am_ctl_blockhdr {
Packit 961e70
	volatile am_ctl_qhdr_t shortq;
Packit 961e70
	volatile am_ctl_qhdr_t longbulkq;
Packit 961e70
} am_ctl_blockhdr_t;
Packit 961e70
PSMI_STRICT_SIZE_DECL(am_ctl_blockhdr_t, 128 * 2);
Packit 961e70
Packit 961e70
/* We cache the "shorts" because that's what we poll on in the critical path.
Packit 961e70
 * We take care to always update these pointers whenever the segment is remapped.
Packit 961e70
 */
Packit 961e70
typedef struct am_ctl_qshort_cache {
Packit 961e70
	volatile am_pkt_short_t *base;
Packit 961e70
	volatile am_pkt_short_t *head;
Packit 961e70
	volatile am_pkt_short_t *end;
Packit 961e70
} am_ctl_qshort_cache_t;
Packit 961e70
Packit 961e70
/******************************************
Packit 961e70
 * Shared segment local directory (global)
Packit 961e70
 ******************************************
Packit 961e70
 *
Packit 961e70
 * Each process keeps a directory for where request and reply structures are
Packit 961e70
 * located at its peers.  This directory must be re-initialized every time the
Packit 961e70
 * shared segment moves in the VM, and the segment moves every time we remap()
Packit 961e70
 * for additional memory.
Packit 961e70
 */
Packit 961e70
struct amsh_qdirectory {
Packit 961e70
	am_ctl_blockhdr_t *qreqH;
Packit 961e70
	am_pkt_short_t *qreqFifoShort;
Packit 961e70
	am_pkt_bulk_t *qreqFifoLong;
Packit 961e70
Packit 961e70
	am_ctl_blockhdr_t *qrepH;
Packit 961e70
	am_pkt_short_t *qrepFifoShort;
Packit 961e70
	am_pkt_bulk_t *qrepFifoLong;
Packit 961e70
} __attribute__ ((aligned(64)));
Packit 961e70
Packit 961e70
/******************************************
Packit 961e70
 * Shared fifo element counts and sizes
Packit 961e70
 ******************************************
Packit 961e70
 * These values are context-wide, they can only be set early on and can't be *
Packit 961e70
 * modified at runtime.  All endpoints are expected to use the same values.
Packit 961e70
 */
Packit 961e70
typedef
Packit 961e70
struct amsh_qinfo {
Packit 961e70
	int qreqFifoShort;
Packit 961e70
	int qreqFifoLong;
Packit 961e70
Packit 961e70
	int qrepFifoShort;
Packit 961e70
	int qrepFifoLong;
Packit 961e70
} amsh_qinfo_t;
Packit 961e70
Packit 961e70
/******************************************
Packit 961e70
 * Per-endpoint structures (ep-local)
Packit 961e70
 ******************************************
Packit 961e70
 * Each endpoint keeps its own information as to where it resides in the
Packit 961e70
 * directory, and maintains its own cached copies of where the short header
Packit 961e70
 * resides in shared memory.
Packit 961e70
 *
Packit 961e70
 * This structure is carefully arranged to optimize cache locality and
Packit 961e70
 * performance.  Do not modify without careful and thorough analysis.
Packit 961e70
 */
Packit 961e70
struct am_ctl_nodeinfo {
Packit 961e70
	uint16_t psm_verno;
Packit 961e70
	volatile uint16_t is_init;
Packit 961e70
	volatile pid_t pid;
Packit 961e70
	psm2_epid_t epid;
Packit 961e70
	psm2_epaddr_t epaddr;
Packit 961e70
	uintptr_t amsh_shmbase;
Packit 961e70
	amsh_qinfo_t amsh_qsizes;
Packit 961e70
	uint32_t amsh_features;
Packit 961e70
	struct amsh_qdirectory qdir;
Packit 961e70
} __attribute__((aligned(64)));
Packit 961e70
Packit 961e70
struct ptl_am {
Packit 961e70
	psm2_ep_t ep;
Packit 961e70
	psm2_epid_t epid;
Packit 961e70
	psm2_epaddr_t epaddr;
Packit 961e70
	ptl_ctl_t *ctl;
Packit 961e70
Packit 961e70
	int connect_phase;
Packit 961e70
	int connect_outgoing;
Packit 961e70
	int connect_incoming;
Packit 961e70
Packit 961e70
	int zero_polls;
Packit 961e70
	int amsh_only_polls;
Packit 961e70
	int max_ep_idx, am_ep_size;
Packit 961e70
	int psmi_kassist_mode;
Packit 961e70
	char *amsh_keyname;
Packit 961e70
Packit 961e70
	/* These three items carefully picked to fit in one cache line. */
Packit 961e70
	am_ctl_qshort_cache_t reqH;
Packit 961e70
	am_ctl_qshort_cache_t repH;
Packit 961e70
	struct am_reqq_fifo_t psmi_am_reqq_fifo;
Packit 961e70
Packit 961e70
	am_pkt_short_t amsh_empty_shortpkt;
Packit 961e70
Packit 961e70
	struct am_ctl_nodeinfo *self_nodeinfo;
Packit 961e70
	struct am_ctl_nodeinfo *am_ep;
Packit 961e70
} __attribute__((aligned(64)));
Packit 961e70
Packit 961e70
#endif