#include "task_init.h"
#include "task_base.h"
#include "stats.h"
+#include "prox_compat.h"
struct task_dump {
struct task_base base;
uint32_t n_mbufs;
struct rte_mbuf **mbufs;
uint32_t n_pkts;
- char pcap_file[128];
+ char pcap_file[256];
};
static uint16_t buffer_packets(struct task_dump *task, struct rte_mbuf **mbufs, uint16_t n_pkts)
struct task_dump *task = (struct task_dump *)tbase;
const int socket_id = rte_lcore_to_socket_id(targ->lconf->id);
+ if (targ->n_pkts == 0)
+ targ->n_pkts = 64 * 1024;
task->mbufs = prox_zmalloc(sizeof(*task->mbufs) * targ->n_pkts, socket_id);
task->n_pkts = targ->n_pkts;
if (!strcmp(targ->pcap_file, "")) {
strcpy(targ->pcap_file, "out.pcap");
}
- strncpy(task->pcap_file, targ->pcap_file, sizeof(task->pcap_file));
+ prox_strncpy(task->pcap_file, targ->pcap_file, sizeof(task->pcap_file));
}
static void stop(struct task_base *tbase)