Description
The configuration file ntpcap.ini uses the INI file format.
The configuration file consists of a [Common] section and a section for each libpcap device. For each device section, a number of optional keys specify additional parameters.
Syntax
The syntax for defining one device is as shown below.
['[Common]'] {'Ntpl'<n> '=' '"'<NTPL command>'"'} '['<device name>']' {'RX'<n> '=' '"'<NTPL command>'"'} ['StreamId' '=' <ID>] ['HBAllowance' '=' <percentage>] ['TX' '=' <port No.>] ['TXNumaNode' '=' <node No.>] ['TXMinHostBuffer' '=' <minimum buffer size>] ['NTInterface' '=' 'Segment' | 'Packet'] ['WithCRC' '=' 'TRUE' | 'FALSE']
Semantics
The semantics of ntpcap.ini is described below.
Key | Description |
---|---|
[Common] |
A section which may hold NTPL commands for common use, for example NTPL macros and NTPL setup commands. If the [Common] section is present, then "Delete=All" is executed implicitly on entry. libpcap makes sure this is only executed once when multiple devices are opened. After all devices have been closed, opening any device will re-initiate the execution of the NTPL commands in the [Common] section. |
Ntpl<n> |
Optional. Must be specified in the [Common] section. <n> = 1..256, <n> must start at 1 and increment consecutively. The NTPL commands are loaded in this sequence. |
<device name> |
A user-defined libpcap device name. If the name clashes with an existing device name, this section of ntpcap.ini is ignored. Note: Streams that are already created on the SmartNIC, for instance by
using the ntpl tool, are automatically available for libpcap.
They are named nt3g<x>, where
<x> is the stream ID. To avoid naming clashes, do not
use these device names in ntpcap.ini.
|
Rx<n> |
Optional. NTPL commands for setting up this libpcap device. <n> = 1..256, <n> must start at 1 and increment consecutively. The NTPL commands are loaded in this sequence. A break in the sequence stops loading commands. If at least Rx1, and optionally more NTPL commands, assigns or refers to the same single stream ID (not a range), the libpcap device is assigned to this stream ID. Make sure to use the same stream ID in these NTPL commands; otherwise this section of ntpcap.ini is ignored, and the libpcap device is not created. If a stream with this stream ID has already been created on a SmartNIC, for instance by a previous section in ntpcap.ini or by using the ntpl tool, the NTPL commands are not loaded. Make sure to use a stream ID that is not already in use. If no NTPL command assigns or refers to a single stream ID, use the key StreamId to assign an existing stream, created for instance in a previous section of ntpcap.ini or by using the ntpl tool. |
StreamId |
Optional. Assigns the libpcap device to a stream ID. The stream must already have been created. If set, Rx<n> NTPL commands are not searched for a stream ID. Use the StreamId key if no NTPL commands assign or refer to a specific stream ID (see the load-balancing example in Examples of ntpcap.ini Files). Use the StreamId key to assign the libpcap device to a stream created in a previous section of ntpcap.ini or, for instance, by using the ntpl tool (see the host buffer allowance example in Examples of ntpcap.ini Files). |
HBAllowance |
Optional. Specifies the host buffer allowance in percent for this device. Range: 1..100. Default: 100. All applications opening this libpcap device will have the same host buffer allowance value. Create more devices assigned to the same stream ID if different host buffer allowance values are needed. See the host buffer allowance example in Examples of ntpcap.ini Files |
TX |
Optional. If specified, determines the port used to transmit on. Default: No TX port is assigned. |
TXNumaNode |
Optional. Specifies from which NUMA node pool of host buffers the TX buffer is taken. Only relevant if a TX port is specified. Default: 0. |
TXMinHostBuffer |
Optional. Specifies the minimum size in MB of the TX host buffer needed. |
NTInterface |
Optional. Selects between segment-based interface and packet-based interface. Default: Segment. Segment-based interface is faster and supports the PCAP descriptor (PacketDescriptor=PCAP in ntservice.ini). However, segment-based interface does not support merging of packets between SmartNICs. Packet-based interface supports merging of packets between SmartNICs, but does not support the PCAP descriptor. |
WithCRC |
Optional. Default: False. If
PacketDescriptor is set to NT in the
ntservice.ini file
as shown in the configuration example below, set WithCRC to
True to include FCS in a received frame. And set
WithCRC to False not to include FCS in a
received frame.
PacketDescriptor=NT TimestampFormat=NATIVE_UNIX (or TimestampFormat=UNIX_NS) Note: The
PacketPcapFcsInclude parameter in the
ntservice.ini file does not have any effect if
PacketDescriptor is set to
NT.
Note: The WithCRC value in
ntpcap.ini file does not have any effect if
PacketDescriptor in the
ntservice.ini file is set to PCAP. See
the configuration examples below.
The FCS field will be included in a
received frame with the following configuration in the
ntservice.ini file regardless of the
WithCRC value in the ntpcap.ini file.
PacketDescriptor=PCAP TimestampFormat=PCAP_NS (or TimestampFormat=PCAP) PacketPcapFcsInclude=TrueThe FCS field will not be included in a received frame with the following configuration in the ntservice.ini file regardless of the WithCRC value in the ntpcap.ini file. See DN-0449 for further information in detail about parameters in the ntservice.ini file. PacketDescriptor=PCAP TimestampFormat=PCAP_NS (or TimestampFormat=PCAP) PacketPcapFcsInclude=False |