Browse Source

update indent size

dev
jinhao2 2 years ago
parent
commit
4dfcdbcc8d
  1. 3
      config.ini
  2. 2
      lib/ff_config.c
  3. 5
      lib/ff_dpdk_if.c

3
config.ini

@ -1,6 +1,6 @@
[dpdk]
# Hexadecimal bitmask of cores to run on.
lcore_mask=2
lcore_mask=1
# Number of memory channels.
channel=4
@ -71,7 +71,6 @@ savelen= 16777216
# Port config section
# Correspond to dpdk.port_list's index: port0, port1...
[port0]
addr=192.168.1.2
netmask=255.255.225.0

2
lib/ff_config.c

@ -623,7 +623,7 @@ ini_parse_handler(void* user, const char* section, const char* name,
} else if (strcmp(name, "enable") == 0) {
pconfig->pcap.enable = (uint16_t)atoi(value);
} else if (strcmp(name, "savepath") == 0) {
pconfig->pcap.save_path = strdup(value);
pconfig->pcap.save_path = strdup(value);
}
}

5
lib/ff_dpdk_if.c

@ -276,7 +276,7 @@ init_lcore_conf(void)
/* Enable pcap dump */
if (ff_global_cfg.pcap.enable) {
ff_enable_pcap(ff_global_cfg.pcap.save_path, ff_global_cfg.pcap.snap_len);
ff_enable_pcap(ff_global_cfg.pcap.save_path, ff_global_cfg.pcap.snap_len);
}
lcore_conf.nb_queue_list[port_id] = pconf->nb_lcores;
@ -1328,7 +1328,8 @@ send_burst(struct lcore_conf *qconf, uint16_t n, uint8_t port)
if (unlikely(ff_global_cfg.pcap.enable)) {
uint16_t i;
for (i = 0; i < n; i++) {
ff_dump_packets( ff_global_cfg.pcap.save_path, m_table[i], ff_global_cfg.pcap.snap_len, ff_global_cfg.pcap.save_len);
ff_dump_packets( ff_global_cfg.pcap.save_path, m_table[i],
ff_global_cfg.pcap.snap_len, ff_global_cfg.pcap.save_len);
}
}

Loading…
Cancel
Save