Пример конфигурационного файла ipsm_dpdk.cfg

[PERFORMANCE]

threads = 1                 ;maximum: (cpu core num (maximum:254, including HyperThreading) - 2 - 2 * ports_num) -- processing (encrypt/decrypt/filter) threads number

;sendqueue_size = 64000     ;min: 1000 max: 100000 default: 64000 -- size of re-order fixing queue

;disable_sendqueue = no     ;yes/no, default: no -- disable re-order fixing queue

;tx_retries = 10            ;min: 0 max: 1000 default: 10 -- retries count for outgoing packets before drop

;tx_delay = 20              ;min: 0 max: 200 default: 20 -- delay in microseconds before another retry of sending packet burst

;rx_desc = 2048             ;min: 32 max: 4096 default: 2048 -- number of rx descriptors in network adapter configuration

;tx_desc = 2048             ;min: 32 max: 4096 default: 2048 -- number of tx descriptors in network adapter configuration

;no_max_freq = no           ;yes/no, default: no -- disable setting max possible frequency for our processor cores

;sendq_burst_threshold = 0  ;min: 100 max: 100000 default: 0 (disabled) -- make a delay, if sending N packets from sendqueue in a row

;sendq_burst_delay = 10     ;min: 1 max: 200 default: 10 -- delay in microseconds when sendq_burst_threshold activated

;pcap_mpool_size = 262143   ;min: 131071: max 4194303: default: 262143 -- number of buffers in memory pool, num = 2^q - 1

;rx_queue_len = 16          ;min: 1 max: 32 default: 16 -- size of thread queue (in bursts)

;rx_sleep = 5               ;min: 0 max: 10000 default: 5 -- pause in microseconds on rx thread if there are no packets incoming

;tx_sleep = 5               ;min: 0 max: 10000 default: 5 -- pause in microseconds on tx thread if there are no packets to send

;wrk_sleep = 5              ;min: 0 max: 10000 default: 5 -- pause in microseconds on wrk thread if there are no packets incoming

;cb_wait = 5                ;min: 0 max: 10000 default: 5 -- wait in microseconds on wrk thread if corresponding tx thread is busy

;single_local_thr = yes     ;yes/no, default: yes -- process all incoming local (dst is gate itself) IPv4 (not etherip) traffic in single thread (DP0)

;rx_cache_size = 64000      ;min: 2000: max 200000: default: 64000 -- size of rx thread packet cache

;cache_burst_size = 8       ;min: 1: max 32: default: 8 -- max size of single transfer from rx thread cache to wrk thread (in bursts). Must be less then rx_queue_len

 

[EAL]

coremask = 0x1              ;mask should cover all cpu cores, including HyperThreading

;channels = 1               ;min: 1 max: 4 default: 1    -- memory channels number

;cpuset = (0-2,4)@(0-1)     ;map threads to cpu cores: <threads[@cpus]>[<,threads[@cpus]>...]

;eal_log_level = 4          ;min: 1 max: 8 default: 4    -- log level of dpdk messages

;rx_pthresh = 8             ;min: 0 max: 255 default: 8  -- rx prefetch threshold register value

;rx_hthresh = 8             ;min: 0 max: 255 default: 8  -- rx host threshold register value

;rx_wthresh = 4             ;min: 0 max: 255 default: 4  -- rx write-back threshold register value

;tx_pthresh = 36            ;min: 0 max: 255 default: 36 -- tx prefetch threshold register value

;tx_hthresh = 0             ;min: 0 max: 255 default: 0  -- tx host threshold register value

;tx_wthresh = 0             ;min: 0 max: 255 default: 0  -- tx write-back threshold register value

 

[MISC]

;print_stats = no           ;yes/no, default: no -- print send/receive/drop statistics

;stats_file = /tmp/pkt_stats.txt    ;name of file for print_stats

;stats_file_size = 10       ;min: 1 max: 100 default: 10 -- max size of statistics file in megabytes. After rotate, previous instance saves as ".old"

;print_frames = no          ;yes/no, default: no -- print incoming/outgoing packets in hex

;frames_file = /tmp/frames.txt      ;name of file for print_frames

;frames_file_size = 50      ;min: 1 max: 200 default: 50 -- max size of packet hexdump file in megabytes. After roteate, previous instance saves as ".old"

;frames_time = no           ;yes/no, default: no -- print time for each packet in print_frames

;pf_max_bytes = 42          ;min: 14 max: 1400 default: 42 -- print only N firs bytes in print_frames

;natt_port = 4500           ;min: 1 max: 65535: default: 4500

;mssfix = 8000              ;min: 536 max: 9688 default: disabled  -- change MSS field in forwarded tcp syn packets if it greater than N

;mssfix_force = no          ;yes/no, default: no -- always change MSS field in forwarded tcp syn packets, even if it's lesser than mssfix value

 

[PORT0]

pci_id = 02:00.1

outer = yes                        ;yes/no, default: no -- consider port as looking to outer network

l3_ip = 192.168.5.2                ;ip address of corresponding vEthN

l3_mask = 24                       ;mask of corresponding vEthN

gw_ip = 192.168.5.1                ;default gateway ip-address

;next_hop_mac = 00:00:00:00:00:00  ;default destination mac-address for outgoing frames

pair_port = 1

mtu = 9710                         ;min: 68 max: 9710 default: 9710

;next_hop_mac_force = no           ;yes/no, default no -- always set next_hop_mac as destination mac address for outgoing L3-frames

;vlan_identifier = 0               min: 0 max: 4094 default: 0 -- 802.1Q VLAN identifier (VID)

;vlan_priority_code_point = 0      min: 0 max: 7 default: 0 -- Priority code point (PCP) which is referts to the 802.1p class of service

;allowed_ethertypes = none         ;ethertypes in hex (32 max, "," as divider) -- pass this ethertypes to/from corresponding vEth. IPv4(0x8000) and ARP(0x0806) always passed, others dropped by default

;no_fc = no                        ;yes/no, default no  -- disable flow control on this port

;no_promisc = yes                  ;yes/no, default: yes (for l2-port port - no) -- disable promiscuous mode on this port

;multicast_enable = yes            ;yes/no, default: yes (for l2-port - no) -- enable receiving all multicast ip packets mode on this port

;hw_ip_checksum = no               ;yes/no, default: no -- enable additional stats about l3/l4 checksum errors and oversized packets

;hw_vlan_extend = no               ;yes/no, default: no -- enable double-vlan

;pmtud = 8000               ;min: 68 max: 65535 default: disabled -- send "ICMP Destination Unreachable -- Fragmentation Needed" for ip packets with DF bit, greater than N bytes

 

[PORT1]

pci_id = 02:00.0

l2_src_ip = 192.168.6.2            ;source ip address of new ip packet for l2-encalpsulation

l2_dst_ip = 192.168.6.1            ;destination ip address of new ip packet for l2-encalpsulation

pair_port = 0                      ;index of port for sending packets received on this one; also packets, received on pair_port, will be sent from this one

mtu = 9610                         ;min: 68 max: 9710 default: 9610

;no_fc = no                        ;yes/no, default no  -- disable flow control on this port

;no_promisc = no                   ;yes/no, default: no -- disable promiscuous mode on this port

;copy_tos = no                     ;yes/no, default: no -- copy ToS-field from orig ip header to l2-encalpsulation ip header

;df_handling = copy                ;copy/set/clear, default copy -- DF bit: copy from orig ip header to l2-encapsulation ip header

;hw_ip_checksum = no               ;yes/no, default: no -- enable additional stats about l3/l4 checksum errors and oversized packets

;hw_vlan_extend = no               ;yes/no, default: no -- enable double-vlan

;pmtud = 8000               ;min: 68 max: 65535 default: disabled -- send "ICMP Destination Unreachable -- Fragmentation Needed" for ip packets with DF bit, greater than N bytes