summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/prox_args.c
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2020-07-02 10:02:40 +0200
committerXavier Simonart <xavier.simonart@intel.com>2020-09-21 09:56:18 +0200
commitace499fbbdd44cbb9c0d68d6aad40e0b280d54de (patch)
tree2c44572bc385b4975dc4aac8795f7cc874fdd548 /VNFs/DPPD-PROX/prox_args.c
parent163323cd8f9eec2390099ca4834827a28c46c6db (diff)
Added support for reporting packet (mis)order.
The "Latency" screen has been updated with 3 columns: - mis-ordered Count the number of mis-ordered packets. - extent: Gives an indication of how mis-ordered the packets are. Receiving packet "x - 5" after receiving packet "x" will cause an extent of 5. - duplicate: Count number of duplicate packets. Following commands have been added for the impair mode: - proba no drop: replaces the former "probability" command. Percentage of forwarded packets. So 99.5 means 0.5% of packet drop. - proba delay Percentage of delayed packets for the impair mode. - proba duplicate Percentage of duplicate packets. Similar parameters are supported within the config files: - proba no drop - proba delay - proba duplicate Note: it is recommanded to use the signature when measuring packet misorder, as otherwise unexpected packet would cause miscounts. Change-Id: I037f606f264d6e2bd7f123df5ed57ab7df8386d7 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/prox_args.c')
-rw-r--r--VNFs/DPPD-PROX/prox_args.c39
1 files changed, 37 insertions, 2 deletions
diff --git a/VNFs/DPPD-PROX/prox_args.c b/VNFs/DPPD-PROX/prox_args.c
index 5af19318..3e3e41ba 100644
--- a/VNFs/DPPD-PROX/prox_args.c
+++ b/VNFs/DPPD-PROX/prox_args.c
@@ -1141,7 +1141,7 @@ static int get_core_cfg(unsigned sindex, char *str, void *data)
if (STR_EQ(str, "packet id pos")) {
return parse_int(&targ->packet_id_pos, pkey);
}
- if (STR_EQ(str, "probability")) {
+ if (STR_EQ(str, "probability")) { // old - use "probability no drop" instead
float probability;
int rc = parse_float(&probability, pkey);
if (probability == 0) {
@@ -1151,9 +1151,44 @@ static int get_core_cfg(unsigned sindex, char *str, void *data)
set_errf("Probability must be < 100\n");
return -1;
}
- targ->probability = probability * 10000;
+ targ->probability_no_drop = probability * 10000;
return rc;
}
+ if (STR_EQ(str, "proba no drop")) {
+ float probability;
+ int rc = parse_float(&probability, pkey);
+ if (probability == 0) {
+ set_errf("probability no drop must be != 0\n");
+ return -1;
+ } else if (probability > 100.0) {
+ set_errf("Probability must be < 100\n");
+ return -1;
+ }
+ targ->probability_no_drop = probability * 10000;
+ return rc;
+ }
+ if (STR_EQ(str, "proba delay")) {
+ float probability;
+ int rc = parse_float(&probability, pkey);
+ if (probability > 100.0) {
+ set_errf("Probability must be < 100\n");
+ return -1;
+ }
+ targ->probability_delay = probability * 10000;
+ return rc;
+ }
+#if RTE_VERSION >= RTE_VERSION_NUM(19,11,0,0)
+ if (STR_EQ(str, "proba duplicate")) {
+ float probability;
+ int rc = parse_float(&probability, pkey);
+ if (probability > 100.0) {
+ set_errf("probability duplicate must be < 100\n");
+ return -1;
+ }
+ targ->probability_duplicate = probability * 10000;
+ return rc;
+ }
+#endif
if (STR_EQ(str, "concur conn")) {
return parse_int(&targ->n_concur_conn, pkey);
}