Stan Smith Intel SSG/DPD March, 2015 Kernel OpenFabrics Interface Server End point setup.

Slides:



Advertisements
Similar presentations
Socket Programming 101 Vivek Ramachandran.
Advertisements

Introduction to Sockets Jan Why do we need sockets? Provides an abstraction for interprocess communication.
Socket Programming CS3320 Fall 2010.
Computer Net Lab/Praktikum Datenverarbeitung 2 1 Overview Sockets Sockets in C Sockets in Delphi.
Sockets: Network IPC Internet Socket UNIX Domain Socket.
Lecture 2b Sockets Erick Pranata © Sekolah Tinggi Teknik Surabaya 1.
KOFI Stan Smith Intel SSG/DPD January, 2015 Kernel OpenFabrics Interface.
Programming with TCP – I
Today’s topic: Basic TCP API –Socket –Bind –Listen –Connect –Accept –Read –Write –Close.
Today’s topic Issues about sending structures with TCP. Server design alternatives: concurrent server and multiplexed server. I/O multiplexing.
Networks: TCP/IP Socket Calls1 Elementary TCP Sockets Chapter 4 UNIX Network Programming Vol. 1, Second Ed. Stevens.
Elementary TCP Sockets Chapter 4 UNIX Network Programming Vol. 1, Second Ed. Stevens.
Generic Transport Service Primitives Listen –notify Transport layer a call is expected Connect –establish Transport layer connection Send (or Write) Receive.
Socket Programming.
Design, implementation and evaluation issues of local area network devices 期末 DEMO Elementary SCTP Socket Functions & Client/Server Example 陳旻槿.
Server Architecture Models Operating Systems Hebrew University Spring 2004.
CS 311 – Lecture 18 Outline IPC via Sockets – Server side socket() bind() accept() listen() – Client side connect() Lecture 181CS Operating Systems.
Introduction to Socket Programming April What is a socket? An interface between application and network –The application creates a socket –The socket.
Introduction to Project 1 Web Client and Server Jan 2006.
Sockets COS 518: Advanced Computer Systems Michael Freedman Fall
1 Tutorial on Socket Programming Computer Networks - CSC 458 Department of Computer Science Yukun Zhu (Slides are mainly from Monia Ghobadi, and Amin Tootoonchian,
Stan Smith Intel SSG/DPD June, 2015 Kernel Fabric Interface KFI Framework.
Stan Smith Intel SSG/DPD February, 2015 Kernel OpenFabrics Interface kOFI Framework.
Sockets CIS 370 Fall 2009, UMassD. Introduction  Sockets provide a simple programming interface which is consistent for processes on the same machine.
Basic Socket Programming TCP/IP overview. TCP interface Reference: –UNIX Network Programming, by Richard Stevens. –UNIX man page.
Elementary UDP Sockets© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer.
ECE 4110 – Internetwork Programming Client-Server Model.
Fall 2000Datacom 11 Socket Programming Review Examples: Client and Server-Diagnostics UDP versus TCP Echo.
Assignment 3 A Client/Server Application: Chatroom.
Network Programming Tutorial #9 CPSC 261. A socket is one end of a virtual communication channel Provides network connectivity to any other socket anywhere.
Socket Programming. Introduction Sockets are a protocol independent method of creating a connection between processes. Sockets can be either – Connection.
CS345 Operating Systems Φροντιστήριο Άσκησης 2. Inter-process communication Exchange data among processes Methods –Signal –Pipe –Sockets.
1 Client API Goals: evolvable, easy to use Design decision: –event-driven, non-blocking programming model –Data items are immutable Main data structure:
OpenFabrics 2.0 Sean Hefty Intel Corporation. Claims Verbs is a poor semantic match for industry standard APIs (MPI, PGAS,...) –Want to minimize software.
Server Sockets: A server socket listens on a given port Many different clients may be connecting to that port Ideally, you would like a separate file descriptor.
OFI SW - Progress Sean Hefty - Intel Corporation.
---- IT Acumens. COM IT Acumens. COMIT Acumens. COM.
Review: How to create a TCP end point? What is the right format for sin_port and sin_addr in the sockaddr_in data structure? How many different ways we.
Chapter 2 Applications and Layered Architectures Sockets.
The Socket Interface Chapter 22. Introduction This chapter reviews one example of an Application Program Interface (API) which is the interface between.
Remote Shell CS230 Project #4 Assigned : Due date :
Stan Smith Intel SSG/DPD February, 2015 Kernel OpenFabrics Interface Initialization.
Socket Programming Lab 1 1CS Computer Networks.
OFI SW Sean Hefty - Intel Corporation. Target Software 2 Verbs 1.x + extensions 2.0 RDMA CM 1.x + extensions 2.0 Fabric Interfaces.
S OCKET P ROGRAMMING IN C Professor: Dr. Shu-Ching Chen TA: HsinYu Ha.
Introduction to Sockets
S OCKET P ROGRAMMING IN C Professor: Dr. Shu-Ching Chen TA: Hsin-Yu Ha.
CMPT 471 Networking II Network Programming © Janice Regan,
Socket Programming. Computer Science, FSU2 Interprocess Communication Within a single system – Pipes, FIFOs – Message Queues – Semaphores, Shared Memory.
1 Spring Semester 2008, Dept. of Computer Science, Technion Internet Networking recitation #7 Socket Programming.
1 TCP Sockets Programming Creating a passive mode (server) socket.Creating a passive mode (server) socket. Establishing an application-level connection.Establishing.
Stan Smith Intel SSG/DPD June, 2015 Kernel Fabric Interface Kfabric Framework.
Lecture 3 TCP and UDP Sockets CPE 401 / 601 Computer Network Systems slides are modified from Dave Hollinger.
@Yuan Xue CS 283Computer Networks Spring 2013 Instructor: Yuan Xue.
1 Socket Interface. 2 Client-Server Architecture The client is the one who speaks first Typical client-server situations  Client and server on the same.
Socket Programming(1/2). Outline  1. Introduction to Network Programming  2. Network Architecture – Client/Server Model  3. TCP Socket Programming.
1 Socket Interface. 2 Basic Sockets API Review Socket Library TCPUDP IP EthernetPPP ARP DHCP, Mail, WWW, TELNET, FTP... Network cardCom Layer 4 / Transport.
Sockets API Developing Applications using the Sockets API.
Assignment 3 A Client/Server Application: Chatroom
CSCE 313 Network Socket MP8 DUE: FRI MAY 5, 2017
Elementary UDP Sockets
Fabric Interfaces Architecture – v4
Socket Programming in C
Tutorial on Socket Programming
Socket Programming in C
TCP Sockets Programming
Chapter 2 Application Layer
Socket Programming(1/2)
Internet Networking recitation #8
Outline Communications in Distributed Systems Socket Programming
Presentation transcript:

Stan Smith Intel SSG/DPD March, 2015 Kernel OpenFabrics Interface Server End point setup

Steps The Big Picture –Initialization –Server connection setup –Client connection setup –Connection finalization –Data transfer –Shutdown Current State –Completed: fi_getinfo(), fi_fabric(), fi_domain() Server connection setup : –fi_passive_ep()*pep – create a passive endpoint. –fi_eq_open()*event queue – where connection requests appear. –fi_pep_bind()bind EQ to passive end-point. –fi_listen(pep)post a listen for the passive endpoint. –fi_eq_sread(eq)blocking wait for connection request(s). 2

fi_passive_ep() Create a passive endpoint. Passive endpoints belong to a fabric domain and are used to listen for incoming connection requests. struct fid_pep*pep; int fi_passive_ep( struct fid_fabric *fabric, struct fi_info *info, struct fid_pep **pep, void *context ); Arguments: *fabric – fabric instance. *info – application selected fi_info record. **pep (out) passive endpoint pointer. *context – domain event context. Return: rc == 0 defines success. 3

fi_eq_open() Create an event queue used in waiting for and accepting connection requests. int fi_eq_open(struct fid_fabric *fabric, struct fi_eq_attr *attr, struct fid_eq **eq, void *context) Arguments: *fabric – opened fabric instance *attr – EQ attributes **eq – output event queue ptr. *context – application supplied value, returned in EQ events. Return: 0 == success. 4

struct fi_eq_attr struct fi_eq_attr { size_tsize;# min EQ depth uint64_tflags;# operational flags: FI_WRITE, can write to EQ enum fi_wait_obj wait_obj;# wait object type: FI_WAIT_NONE async FI_WAIT_UNSPEC(blocking) FI_WAIT_SET, use existing wait_set. intsignaling_vector;# core where CQ interrupts are directed. struct fid_wait*wait_set;# existing wait_set pointer; # requires FI_WAIT_SET } 5

fi_pep_bind() Associate a passive endpoint with an event queue int fi_pep_bind(struct fid_pep *pep, struct fid *fid, uint64_t flags) Arguments: *pep – existing passive endpoint *fid – EQ->fid to bind to the passive endpoint. flags – operational flags. Return 0 == success 6

fi_eq_sread() Blocking read of one event from event queue. int fi_eq_sread(struct fid_eq *eq, uint32_t *event, void *buffer, size_t len, int timeout, uint64_t flags) Arguments: *eq – opened Event Queue *event – reported event ID. *buffer – event format defined via fi_info->ep_attr.protocol len – sizeof( eq event ). timeout – default units (milliseconds) or flags defines units. flags – operational flags: FI_PEEK – read without consuming the event. FI_TIME_US – micro-seconds FI_TIME_MS – milli-seconds Return : number of bytes written to buffer; at most 1 event. 7

Infiniband Server RC example 8 struct fi_fid_pep*pep; struct fi_eq_attreq_attr = {10, 0, FI_WAIT_UNSPEC, 0, NULL }; struct fi_fid_eq*eq; uint32_tevent_id; struct fi_eq_cm_entryevent;// format derived from fi_info. ep_attr->protocol = // FI_PROTO_RDMA_CM_IB_RC; ret = fi_passive_ep(fabric, provider, &pep, 0xCafeBabe ); ret = fi_eq_open(fabric, &attr, &eq, 0); ret = fi_pep_bind( pep->fid, eq->fid, 0); ret = fi_listen(pep) ret = fi_eq_sread(eq, &event_id, (void*)&event, sizeof(event), 20000, FI_TIME_MS); // blocked waiting for a client connection.