Fast IP What is it and what is

  • Slides: 8
Download presentation
Fast IP What is it and what is it good for? How do you

Fast IP What is it and what is it good for? How do you set it up?

Fast IP – What is it? • Fast IP is an extension to the

Fast IP – What is it? • Fast IP is an extension to the Ethernet driver, and allows applications to bypass heavy load by low level work, provided that both the request and reply packets are UDP packets • All processing done by Fast IP is performed within the Ethernet receive ISR, avoiding the stack and the sockets interface • The processing time required by Fast IP to receive a request and send back a reply with a NETARM processor and with 32 -bit SDRAM yielded average response times of under 230 microseconds.

Fast IP vs. Sockets Fast IP Network OR Request Ethernet Driver Possible Copy Response

Fast IP vs. Sockets Fast IP Network OR Request Ethernet Driver Possible Copy Response Network User Callback (Autoreply) Ethernet Driver Sockets Network Request Response Ethernet Driver Socket Layer Thread Sw, Copy User Callback

Fast IP – What is it good for? • Applications can use the Fast

Fast IP – What is it good for? • Applications can use the Fast IP API to have the Ethernet driver identify request packets and do one of the following: • Send back a “canned” response • Call an application processing routine from the ISR to immediately process the packet and send back a reply

Fast IP API • Applications that use NET+Fast IP must call fip_register. Port. Processing.

Fast IP API • Applications that use NET+Fast IP must call fip_register. Port. Processing. Rtn() or fip_register. Port. Auto. Reply() to register IP port numbers with the ISR. • Applications can associate a unique processing routine with each port, or have several ports share the same routine. Applications use the function fip_deregister. Port() to discontinue processing.

Fast IP Examples • Two NET+Fast IP examples are provided in the NET+Works board

Fast IP Examples • Two NET+Fast IP examples are provided in the NET+Works board support package (bsp) apps directory as follows: • The first example demonstrates using the Fast IP routines fip_register. Port. Auto. Reply and fip_register. Port. Processing. Rtn. • The second example contains test code to evaluate the non-fast IP UDP stack

Sample Fast IP callback Example #include <fast_ip. h> int test_app_fn (fip_request. Structure *Fip. Request)

Sample Fast IP callback Example #include <fast_ip. h> int test_app_fn (fip_request. Structure *Fip. Request) { /* transmit 400 bytes of UDP data */ if (Fip. Request->request. Port == 4001) { Fip. Request->reply. Data = (unsigned char *)&reply. Packet; Fip. Request->reply. Length = 400; Fip. Request->reply. Must. Be. Copied = 0; return FIP_SEND_REPLY; } Return value 0 if successful, otherwise it returns -1

Fast IP Summary • UDP Only • Bypasses stack – IP processing done in

Fast IP Summary • UDP Only • Bypasses stack – IP processing done in driver • Automatic response or user callback