One approach involves aggregating multiple arguments of the same type into a list, while the other involves creating custom Suricata arguments tailored for DPDK. In the latter case, these custom parameters would then be "translated" into DPDK EAL arguments.
Argument aggregation¶
It would extend the way DPDK EAL arguments are used currently. The only addition would be aggregating the parameters of the same type into one list.
Example from the suricata.yaml:
dpdk:
eal-params:
proc-type: primary
a: ["0000:3b:00.0", "0000:3b:00.1"]
vdev: ["net_pcap0,rx_pcap=input.pcap,tx_pcap=output.pcap", "net_pcap1,rx_pcap=input.pcap,tx_pcap=output.pcap"]
Suricata DPDK arguments¶
This concept is not entirely new, as for instance, lcore parameters are not permitted in the EAL configuration section. These are crafted/loaded of the threading section of the suricata.yaml file. However, the remaining DPDK arguments are still inputted in their raw form. To go this way, this would mean implementation or rather translation of all/selected DPDK arguments to Suricata arguments. This might be more concise approach but would require constant evaluation of arguments support across DPDK versions.
As an example of this approach, here is extract from the DPDK Trex packet generator configuration file:
- version: 2
interfaces: ['0b:00.0', '0b:00.1']
prefix: TREX
limit_memory: 4096
port_info:
- dest_mac: b4:96:91:9f:63:68
src_mac: 40:a6:b7:0b:55:78
- dest_mac: b4:96:91:9f:63:69
src_mac: 40:a6:b7:0b:55:79
platform:
master_thread_id: 0
latency_thread_id: 1
dual_if:
- socket: 0
threads: [2,3,4,5,6,7]
Arguments such as interfaces
, limit_memory
, *thread*
could be translated to DPDK EAL arguments --allow
, --socket-limit
, -l
respectively.
My conclusion¶
While I can see potential benefits of shielding EAL arguments from the user in the Suricata DPDK arguments variant, I would vote for the Argument aggregation approach within the config to not limit the user to what DPDK EAL arguments are supported and at the same time, there is no need to track the support of individual arguments in within the EAL.