diff options
author | Xavier Simonart <xavier.simonart@intel.com> | 2018-01-13 21:28:14 +0100 |
---|---|---|
committer | Patrice Buriez <patrice.buriez@intel.com> | 2018-02-15 21:22:03 +0100 |
commit | 9fa316261d7d9e79bcff84fb84ab498b9e7d93f4 (patch) | |
tree | f22e7715e48629faf56f8dc238974e489c30fe50 /VNFs/DPPD-PROX/handle_gen.c | |
parent | aa09ff9157159b26c431ba61a6f0a08308d123dd (diff) |
Fix latency accuracy and dumping latencies to file
- Also changed lat_info.tx_packet_index to uint64_t,
so also did it for task_lat.prev_tx_packet_index and n_loss.
- Adjusted format strings accordingly, and fixed some other formats.
- Adjusted overflow increment to 2^32 (i.e. UINT32_MAX + 1).
- Replaced hard-coded 64 with ACCURACY_BUFFER_SIZE (still hard-coded
in handle_gen.c).
Change-Id: Ia59f36e17c0797a2a958dbe3b2ac420263473524
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/handle_gen.c')
-rw-r--r-- | VNFs/DPPD-PROX/handle_gen.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/VNFs/DPPD-PROX/handle_gen.c b/VNFs/DPPD-PROX/handle_gen.c index 0f70ee6b..515c1dac 100644 --- a/VNFs/DPPD-PROX/handle_gen.c +++ b/VNFs/DPPD-PROX/handle_gen.c @@ -1174,7 +1174,8 @@ static void init_task_gen_early(struct task_args *targ) uint8_t *generator_count = prox_sh_find_system("generator_count"); if (generator_count == NULL) { - generator_count = prox_zmalloc(sizeof(*generator_count), 0); + generator_count = prox_zmalloc(sizeof(*generator_count), rte_lcore_to_socket_id(targ->lconf->id)); + PROX_PANIC(generator_count == NULL, "Failed to allocate generator count\n"); prox_sh_add_system("generator_count", generator_count); } targ->generator_id = *generator_count; @@ -1224,6 +1225,7 @@ static void init_task_gen(struct task_base *tbase, struct task_args *targ) PROX_PANIC((task->lat_pos || task->accur_pos) && !task->lat_enabled, "lat not enabled by lat pos or accur pos configured\n"); task->generator_id = targ->generator_id; + plog_info("\tGenerator id = %d\n", task->generator_id); task->link_speed = UINT64_MAX; if (!strcmp(targ->pcap_file, "")) { @@ -1258,6 +1260,7 @@ static struct task_init task_init_gen = { .init = init_task_gen, .handle = handle_gen_bulk, .start = start, + .early_init = init_task_gen_early, #ifdef SOFT_CRC // For SOFT_CRC, no offload is needed. If both NOOFFLOADS and NOMULTSEGS flags are set the // vector mode is used by DPDK, resulting (theoretically) in higher performance. @@ -1274,6 +1277,7 @@ static struct task_init task_init_gen_l3 = { .init = init_task_gen, .handle = handle_gen_bulk, .start = start, + .early_init = init_task_gen_early, #ifdef SOFT_CRC // For SOFT_CRC, no offload is needed. If both NOOFFLOADS and NOMULTSEGS flags are set the // vector mode is used by DPDK, resulting (theoretically) in higher performance. @@ -1290,6 +1294,7 @@ static struct task_init task_init_gen_pcap = { .init = init_task_gen_pcap, .handle = handle_gen_pcap_bulk, .start = start_pcap, + .early_init = init_task_gen_early, #ifdef SOFT_CRC .flag_features = TASK_FEATURE_NEVER_DISCARDS | TASK_FEATURE_NO_RX | TASK_FEATURE_TXQ_FLAGS_NOOFFLOADS | TASK_FEATURE_TXQ_FLAGS_NOMULTSEGS, #else |