Myricom logo

Macros
Open flags for process-sharing, port aggregation and packet duplication

Macros

#define SNF_F_PSHARED   0x1
 
#define SNF_F_AGGREGATE_PORTMASK   0x2
 
#define SNF_F_RX_DUPLICATE   0x300
 

Detailed Description

These options are passed to the flags parameter in snf_open to enable various receive mechanisms.

Macro Definition Documentation

#define SNF_F_AGGREGATE_PORTMASK   0x2

Device can be opened for port aggregation (or merging). When this flag is passed, the portnum parameter in snf_open is interpreted as a bitmask where each set bit position represents a port number. The Sniffer library will then attempt to open every portnum with its bit set in order to merge the incoming data to the user from multiple ports. Subsequent calls to snf_ring_open return a ring handle that internally opens a ring on all underlying ports.

#define SNF_F_PSHARED   0x1

Device can be process-sharable. This allows multiple independent processes to share rings on the capturing device. This option can be used to design a custom capture solution but is also used in libpcap when multiple rings are requested. In this scenario, each libpcap device sees a fraction of the traffic if multiple rings are used unless the SNF_F_RX_DUPLICATE option is used, in which case each libpcap device sees the same incoming packets.

#define SNF_F_RX_DUPLICATE   0x300

Device can duplicate packets to multiple rings as opposed to applying RSS in order to split incoming packets across rings. Users should be aware that with N rings opened, N times the link bandwidth is necessary to process incoming packets without drops. The duplication happens in the host rather than the NIC, so while only up to 10Gbits of traffic crosses the PCIe, N times that bandwidth is necessary on the host.

When duplication is enabled, RSS options are ignored since every packet is delivered to every ring.

Myricom banner
Thu Jan 7 2021 14:20:25 - SNF 5.3.2.11.54430