Re: [ntdev] Handling high speed data received in PC's RAM

You realize that UDP is a protocol implemented on top of IP which is implemented on top of Ethernet in your specific scenario. UDP can and has been implemented on top of other media with different characteristics.

Ethernet adapters do not handle UDP data in any way directly unless they implement offload engines. Ethernet adapters handle Ethernet frames from the network and indicate them to the host or receive payload from the host and send it out over the wire.

Each network protocol implements protocol specific semantics on its upper edge, and sends / receives a series of (possibly fragmented) packets on its lower edge. UDP is generally a simple pass through, but remember that UDP packets can be fragmented into multiple IP packets depending on the MTU as well.

To your specific question, the use (or not) of memory copies is entirely under the control of the PROTOCOL driver. In Windows, the choice is heavily influenced by APPLICATION behaviour and the IO model used by the application will have a direct impact on how / when memory copies occur. To support the best performance Ethernet adapters should implement offload engines and indicate this support to the OS. These interfaces allow you to hardware accelerate certain common operations (i.e. checksum validation) and in effect move a portion of the network stack from the OS into your device.

Sent from Surface Pro

From: Zvi Vered
Sent: ‎Saturday‎, ‎August‎ ‎01‎, ‎2015 ‎2‎:‎43‎ ‎AM
To: Windows System Software Devs Interest List

Hello,

Can you please explain how Ethernet card handles UDP incoming messages ?

If a message is sent to the card and the user does not call to ‘receive’,
where the data waits ?

Is there a buffer handled by the kernel that holds the data till user calls
receive ?

If the source keeps sending and the PC does not call ‘receive’ what happens
when there is no place in the buffer ?

Why I’m asking ?

We start developing an FPGA which gets data from A2D and has to write it to
PC’s RAM.
The input speed is ~10Gb/sec.

I prefer data will be copied to a pre allocated RAM in PC and not copied
twice: to a buffer handled by kernel and from there to virtual application
space.

Best regards,
Z.V


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer