Host Buffer Allowance

Reference Documentation

product_line_custom
Napatech SmartNIC
category
Reference Information

Since applications can share a stream ID, one application can suppress another by blocking a host buffer either because it has everything pending or because it has everything currently in its processing pipe. Napatech Software Suite has a host buffer allowance level (defined in percent) to avoid this issue, and the host buffer allowance level can be configured via NT_NetRxOpen(). The host buffer allowance will ensure that packets are dropped if the amount of data buffering in the host buffer exceed a specified level.

The host buffer allowance is enabled via the NT_NetRxOpen() function.

The host buffer allowance level can be individually set on every stream that an application opens via NT_NetRxOpen(). The host buffer allowance level given via NT_NetRxOpen() is an integer percentage - valid numbers for host buffer allowance are integers between 1 and 100. As explained above, the host buffer allowance is useful in data sharing scenarios where mutiple applications share the same (RX) stream. In data sharing scenarios, the host buffer allowance level specified by an application could be seen as an "interest level" - a balance between how interested the application is in the data from the stream - held up against how fast the application expects to be able to process the data from the stream.

The host buffer allowance level is a measure for how many unprocessed host buffer segments an application is allowed to have pending. If a stream is assigned one 16 Mb host buffer - a host buffer allowance level of 50 will allow the application to have unprocessed 8 segments (of 1 Mb each) pending.

As long as an application is able to keep up with the pace of the stream the application will receive all data from that stream - no matter what host buffer allowance level it has set up. Only in the event where an application cannot keep up with the pace - and the number of queued host buffer segments exceeds the host buffer allowance level - then the driver will stop delivering more data to that application until the application has processed its pending backlog below the host buffer allowance level.

An application with host buffer allowance set to 100 will always get all data from a stream - no matter how slow the application is - unless the adapter SDRAM fills up.

Choose host buffer sizes and a host buffer allowance level that will give at least 16 remaining host buffer segments to ensure optimal performance.