Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

vipopennic.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <sys/time.h>
#include <unistd.h>
#include "vipl_priv.h"

Go to the source code of this file.

Functions

VIP_ENTRY_POINT VIP_RETURN VipOpenNic (const VIP_CHAR *DeviceName, VIP_NIC_HANDLE *NicHandle)

Variables

const char * _gm_version


Detailed Description

The VI-GM function VipOpenNic implementation.

Definition in file vipopennic.c.


Function Documentation

VIP_ENTRY_POINT VIP_RETURN VipOpenNic const VIP_CHAR DeviceName,
VIP_NIC_HANDLE NicHandle
 

VipOpenNic() associates a process with a VI NIC, and provides a NIC handle to the VI Consumer. The NIC handle is used in subsequent functions in order to specify a particular NIC. A process is allowed to open the same VI NIC multiple times. Each time a process calls VipOpenNic() with the same device name, a different NIC handle is returned that references the same NIC.

A VI-GM device name is composed of the string "VINIC" followed by the Myrinet board number ("VINIC0", "VINIC1", etc.). It is possible to reference the first Myrinet NIC by the device name "VINIC". Each process uses a GM port to access the NIC. Multiple threads of the same process share a unique GM port. The GM ports are dynamically allocated, and an error is returned if no GM ports are available.

A connection manager is in charge of receiving connection requests from the VI-GM processes. The need for such a connection manager is necessitated by the incompatibility between the notion of GM ports and the notion of VI-GM NIC. If the connection manager is not running on the reserved GM port, an error is returned.

Return values:
VIP_SUCCESS Operation completed successfully.
VIP_ERROR_RESOURCE An error was detected due to insufficient resources.
VIP_INVALID_PARAMETER One of the parameters was invalid.
Parameters:
DeviceName (IN) Symbolic name of the device (VI Provider instance) associated with the NIC.
NicHandle (OUT) NIC Handle returned. The handle is used with the other functions to specify a particular instance of a VI NIC.
See also:
VipCloseNic VIP_NIC
Author:
Patrick Geoffray
Version:
1.0

Definition at line 71 of file vipopennic.c.

References _gm_version, VIP_GM::alive_alarm, VIP_GM::alive_buffer, VIP_GM::blocking_plumber_cancelled, VIP_GM::blocking_plumber_tokens, VIP_GM::conn_mgr_gm_id, VIP_NIC::error_callback, VIP_NIC::error_callback_context, VIP_GM::gm_board_id, VIP_GM::gm_id, VIP_GM::gm_port, VIP_GM::gm_port_id, VIP_GM::head_waiting_conn_ptr, VIP_NIC::index, VIP_NIC::lock, VIP_GM::lock, VIP_GM::mac_address, VIP_NIC::magic, VIP_GM::magic, VIP_GM::max_recv_tokens, VIP_GM::max_send_tokens, VIP_GM::memory_registered, VIP_PACKET_ALIVE::net_srv_magic, VIP_GM::notify_lookaside, VIP_NIC::ns_initialized, VIP_GM::periodic_plumber_cancelled, VIP_GM::plumber_blocking, VIP_GM::plumber_periodic, VIP_NIC::ptag_last_id, VIP_GM::recv_buffers, VIP_GM::recv_lock, VIP_GM::recv_tokens, VIP_GM::ref_count, VIP_GM::regmem_avl_lookaside, VIP_GM::regmem_avl_tree, VIP_GM::send_buf_free_cnt, VIP_GM::send_buffers, VIP_GM::send_buffers_free, VIP_GM::send_fifo_head, VIP_GM::send_fifo_queued, VIP_GM::send_fifo_tail, VIP_GM::send_tokens, VIP_GM::tail_waiting_conn_ptr, VI_GM_CTRL_GM_SIZE, VI_GM_EAGER_LENGTH, VI_GM_INITIAL_AVL, VI_GM_INITIAL_NOTIFY, VI_GM_MAX_CONN, VI_GM_MAX_CQ, VI_GM_MAX_NIC_HANDLES, VI_GM_MAX_NICS, VI_GM_MAX_PORTS, VI_GM_MAX_PTAGS, VI_GM_MAX_REGISTER_REGIONS, VI_GM_MAX_VI, VI_GM_NUMBER_SEND_BUF, VI_GM_PORT_CONN_MANAGER, vip_alive_alarm_callback(), VIP_ASSERT, VIP_AVL_TREE_DESTROY, VIP_AVL_TREE_INIT, VIP_CONN_MAGIC, VIP_NIC::vip_conn_set, VIP_CQ_MAGIC, VIP_NIC::vip_cq_set, VIP_DEBUG, VIP_DEBUG_GM, VIP_DEBUG_LABEL, vip_default_error_callback(), vip_destroy_cq_handle_set(), vip_destroy_mem_handle_set(), vip_destroy_ptag_handle_set(), vip_destroy_vi_handle_set(), VIP_ERROR_RESOURCE, VIP_FALSE, vip_gettimeofday(), vip_glob_gm_ptrs, vip_glob_lock, vip_glob_nic_lookaside, VIP_NIC::vip_gm_ptr, VIP_HTON_UINT32, vip_init_handle_set(), VIP_INVALID_PARAMETER, VIP_NIC::vip_mem_handle_free, VIP_NIC::vip_mem_handle_ptrs, VIP_MEM_MAGIC, VIP_NIC::vip_mem_set, VIP_MUTEX_DESTROY, VIP_MUTEX_INIT, VIP_MUTEX_LOCK, VIP_MUTEX_UNLOCK, VIP_NIC_MAGIC, VIP_HANDLE_SET::vip_nic_ptr, VIP_GM::vip_nic_ptrs, vip_plumber_blocking(), vip_plumber_periodic(), VIP_PTAG_MAGIC, VIP_NIC::vip_ptag_set, VIP_SEMAPHORE_DESTROY, VIP_SEMAPHORE_INIT, VIP_SEMAPHORE_POST, VIP_GM::vip_send_req_lookaside, VIP_SUCCESS, VIP_THREAD_CREATE, VIP_THREAD_JOIN, VIP_TRUE, VIP_NIC::vip_vi_index_free, VIP_VI_MAGIC, VIP_NIC::vip_vi_ptrs, and VIP_NIC::vip_vi_set.


Variable Documentation

const char* _gm_version
 

The GM internal version string, used to check the GM release number.

Referenced by VipOpenNic().

VI-GM-1.3 by Myricom © 1997-2006. Documentation generated on 20 May 2006 by doxygen 1.4.4.