diff options
author | Xavier Simonart <xavier.simonart@intel.com> | 2019-06-07 14:54:43 +0200 |
---|---|---|
committer | Patrice Buriez <patrice.buriez@intel.com> | 2019-06-14 20:41:50 +0200 |
commit | ed14b300105eb2bde89eaece3cdb4f0d976f6bb8 (patch) | |
tree | 70027e8d48cc3e77a3a23e3adb92cd4eb2176af8 /VNFs/DPPD-PROX/handle_gen.c | |
parent | 843ca042cad997b51390bd6156d3200de18294d2 (diff) |
Increase window size for latency accuracy
Accuracy of latency is obtained by writing TX accuracy for packet N
in a later packet i.e. packet N + WINDOW.
If this window is too small, packet N + WINDOW (conveying accuracy
for packet N) might arrive before packet N, resulting in no accuracy
for packet N.
This change increases this window from 64 to 8K packets.
This change should result in a higher number of packets used for
latency measurements when packets are reordered.
This change might have a performance impact as it uses more memory.
Change-Id: I1016fddb66af86605c73a24050238da41cf54152
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 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/VNFs/DPPD-PROX/handle_gen.c b/VNFs/DPPD-PROX/handle_gen.c index 4bf2e6eb..fa16b309 100644 --- a/VNFs/DPPD-PROX/handle_gen.c +++ b/VNFs/DPPD-PROX/handle_gen.c @@ -114,7 +114,7 @@ struct task_gen { uint16_t rand_offset; /* each random has an offset*/ uint8_t rand_len; /* # bytes to take from random (no bias introduced) */ } rand[64]; - uint64_t accur[64]; + uint64_t accur[ACCURACY_WINDOW]; uint64_t pkt_tsc_offset[64]; struct pkt_template *pkt_template_orig; /* packet templates (from inline or from pcap) */ struct ether_addr src_mac; @@ -363,11 +363,11 @@ static void task_gen_apply_all_accur_pos(struct task_gen *task, struct rte_mbuf if (!task->accur_pos) return; - /* The accuracy of task->pkt_queue_index - 64 is stored in - packet task->pkt_queue_index. The ID modulo 64 is the + /* The accuracy of task->pkt_queue_index - ACCURACY_WINDOW is stored in + packet task->pkt_queue_index. The ID modulo ACCURACY_WINDOW is the same. */ for (uint16_t j = 0; j < count; ++j) { - uint32_t accuracy = task->accur[(task->pkt_queue_index + j) & 63]; + uint32_t accuracy = task->accur[(task->pkt_queue_index + j) & (ACCURACY_WINDOW - 1)]; task_gen_apply_accur_pos(task, pkt_hdr[j], accuracy); } } @@ -505,7 +505,7 @@ static void task_gen_store_accuracy(struct task_gen *task, uint32_t count, uint6 uint64_t first_accuracy_idx = task->pkt_queue_index - count; for (uint32_t i = 0; i < count; ++i) { - uint32_t accuracy_idx = (first_accuracy_idx + i) & 63; + uint32_t accuracy_idx = (first_accuracy_idx + i) & (ACCURACY_WINDOW - 1); task->accur[accuracy_idx] = accur; } |