summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/handle_dump.c
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2019-09-04 19:20:52 +0200
committerXavier Simonart <xavier.simonart@intel.com>2019-10-11 14:42:50 +0200
commit0f150c2738f496a52cce712991af9ad737ef9254 (patch)
tree8fea41e73607944f216d74515cad4f79d384e086 /VNFs/DPPD-PROX/handle_dump.c
parentae43633b258e3cf53013cfac4643146761f03b9d (diff)
Fix generation through pcap file
- When using "pcap file" argument in PROX config file in the gen mode (and no submode), packets were truncated to 8 bytes (and a warning printed) This has been fixed. - "Set value" command was checking whether offset was within first 1518 bytes unrespective to the mtu (e.g. jumbo packets). This has been fixed. - There was a limit of 64K packets loaded from a pcap file (which could be overwritten through PROX config). This limit has been removed - by default all packets from pcap are loaded - When pcap was loaded, memory was allocated to store the packet. However just enough memory was allocated, so that there was no way to change (increase) packet size through command line after that. Now memory is allocated to store up to mtu size - While "set value" command was acting on all packets, "pkt size" command was only changing the first packet. This has now been changed and both commands change all the packets. - A few other minor cleanups. Change-Id: I7264cee8d57e3e6a405dfd7e7a52a95b99399d99 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/handle_dump.c')
-rw-r--r--VNFs/DPPD-PROX/handle_dump.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/handle_dump.c b/VNFs/DPPD-PROX/handle_dump.c
index 71874620..29a46fef 100644
--- a/VNFs/DPPD-PROX/handle_dump.c
+++ b/VNFs/DPPD-PROX/handle_dump.c
@@ -65,6 +65,8 @@ static void init_task_dump(struct task_base *tbase, __attribute__((unused)) stru
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, "")) {