Data Sharing

Software Architecture

Napatech SmartNIC
Overview Document


Data sharing makes it possible to have multiple applications open the same network stream.

When multiple applications open the same network stream they share the underlying host buffer, however, each application still has its own entity indicating where it is in the host buffer.

Data sharing makes it possible for multiple applications to work on overlapping data. For example, application 1 wants to get all IP frames and application 2 wants all TCP frames – meaning that all TCP frames go to both applications but all other IP frames only go to application 1. This is possible by using the packet-based interface. In Napatech Software Suite, both applications see all packets and application 2 must do some post-filtering to only get TCP frames.

Note: If multiple applications assign their own part of the data packets to the shared stream, it is the responsibility of the applications to do any post filtering needed to only get their own part of the data packets.
Note: This sharing solution has been chosen to make the desired post filtering visible.
Note: It is the slowest application that sets the pace – meaning that the host buffer is first released back to the accelerator when all applications have processed the data.

It is however possible to configure a host buffer allowance in the NT_NetRxOpen function (see DN-0449), which enables different applications to share host buffers in such a way that a slow application does not occupy all of the host buffers and thereby causes a faster application to lose packets. The NT_NetRxOpen function is defined in the stream_net.h file.

Data sharing and multi-CPU distribution

Using the NT_NetRxOpenMulti function (see DN-0449) it is possible to combine data sharing and multi-CPU distribution as described in DN-0740.