Introduced separate packet length parser management flag for AF_PACKET: af_packet_read_packet_length_from_ip_header. It's not coupled with Netmap anymore

This commit is contained in:
Pavel Odintsov 2020-12-13 14:34:11 +00:00
parent 3d8ee7f936
commit 79e3e351aa
2 changed files with 5 additions and 2 deletions

View File

@ -315,9 +315,9 @@ void start_afpacket_collection(process_packet_pointer func_ptr) {
unsigned int num_cpus = sysconf(_SC_NPROCESSORS_ONLN);
logger.info("We have %d cpus for AF_PACKET", num_cpus);
if (configuration_map.count("netmap_read_packet_length_from_ip_header") != 0) {
if (configuration_map.count("af_packet_read_packet_length_from_ip_header") != 0) {
afpacket_read_packet_length_from_ip_header =
configuration_map["netmap_read_packet_length_from_ip_header"] == "on";
configuration_map["af_packet_read_packet_length_from_ip_header"] == "on";
}
std::string interfaces_list = "";

View File

@ -108,6 +108,9 @@ mirror_af_packet_custom_sampling_rate = 1
# Available modes: cpu, lb, hash, random, rollover, queue_mapping
mirror_af_packet_fanout_mode = cpu
# This option should be enabled if you are using Juniper with mirroring of the first X bytes of packet: maximum-packet-length 110;
af_packet_read_packet_length_from_ip_header = off
# Port mirroring sampling ratio
netmap_sampling_ratio = 1