suricata
runmode-af-xdp.c File Reference
#include "suricata-common.h"
#include "tm-threads.h"
#include "conf.h"
#include "runmodes.h"
#include "runmode-af-xdp.h"
#include "output.h"
#include "log-httplog.h"
#include "detect-engine-mpm.h"
#include "alert-fastlog.h"
#include "alert-debuglog.h"
#include "flow-bypass.h"
#include "util-conf.h"
#include "util-debug.h"
#include "util-time.h"
#include "util-cpu.h"
#include "util-affinity.h"
#include "util-device.h"
#include "util-runmodes.h"
#include "util-ioctl.h"
#include "util-ebpf.h"
#include "util-byte.h"
#include "source-af-xdp.h"
Include dependency graph for runmode-af-xdp.c:

Go to the source code of this file.

#define PCAP_DONT_INCLUDE_PCAP_BPF_H   1
 
#define SC_PCAP_DONT_INCLUDE_PCAP_H   1
 
const char * RunModeAFXDPGetDefaultMode (void)
 
void RunModeIdsAFXDPRegister (void)
 
int RunModeIdsAFXDPSingle (void)
 Single thread version of the AF_XDP processing. More...
 
int RunModeIdsAFXDPWorkers (void)
 Workers version of the AF_XDP processing. More...
 

Detailed Description

Author
Richard McConnell richa.nosp@m.rd_m.nosp@m.cconn.nosp@m.ell@.nosp@m.rapid.nosp@m.7.co.nosp@m.m

AF_XDP socket runmode

Definition in file runmode-af-xdp.c.

Macro Definition Documentation

◆ PCAP_DONT_INCLUDE_PCAP_BPF_H

#define PCAP_DONT_INCLUDE_PCAP_BPF_H   1

Definition at line 33 of file runmode-af-xdp.c.

◆ SC_PCAP_DONT_INCLUDE_PCAP_H

#define SC_PCAP_DONT_INCLUDE_PCAP_H   1

Definition at line 34 of file runmode-af-xdp.c.

Function Documentation

◆ RunModeAFXDPGetDefaultMode()

const char* RunModeAFXDPGetDefaultMode ( void  )

Definition at line 67 of file runmode-af-xdp.c.

◆ RunModeIdsAFXDPRegister()

void RunModeIdsAFXDPRegister ( void  )

Definition at line 72 of file runmode-af-xdp.c.

References RUNMODE_AFXDP_DEV, RunModeIdsAFXDPSingle(), RunModeIdsAFXDPWorkers(), and RunModeRegisterNewRunMode().

Here is the call graph for this function:

◆ RunModeIdsAFXDPSingle()

int RunModeIdsAFXDPSingle ( void  )

Single thread version of the AF_XDP processing.

Definition at line 325 of file runmode-af-xdp.c.

References AFXDPQueueProtectionInit(), ConfGet(), FatalError, RunModeSetLiveCaptureSingle(), SCEnter, SCLogDebug, SCReturnInt, thread_name_single, TimeModeSetLive(), and TM_ECODE_OK.

Referenced by RunModeIdsAFXDPRegister().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RunModeIdsAFXDPWorkers()

int RunModeIdsAFXDPWorkers ( void  )

Workers version of the AF_XDP processing.

Start N threads with each thread doing all the work.

Definition at line 359 of file runmode-af-xdp.c.

References AFXDPQueueProtectionInit(), ConfGet(), FatalError, RunModeSetLiveCaptureWorkers(), SCEnter, SCLogDebug, SCReturnInt, thread_name_workers, TimeModeSetLive(), and TM_ECODE_OK.

Referenced by RunModeIdsAFXDPRegister().

Here is the call graph for this function:
Here is the caller graph for this function: