summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/prox_args.c
diff options
context:
space:
mode:
authorLuc Provoost <luc.provoost@intel.com>2021-02-01 14:04:01 +0100
committerLuc Provoost <luc.provoost@intel.com>2021-02-10 11:02:06 +0100
commitb7541865102edde8377d3965df658da8bd638a62 (patch)
tree801fd0920f854c1f89f18591615474495ff2d66f /VNFs/DPPD-PROX/prox_args.c
parentc6e1493ced84fa82f689dfe88485a300dfb59183 (diff)
Expand mirror functionality
In order to deal with non-symmetrical load, the mirror function can now change the packet size of each packet it receives. It can also send the incoming packet multiple times on each of the tx ports. To support this feature, 2 new parameters in the cfg file have been added for the mirror mode: - multiplier: specifies how many times a packet needs to be sent on each tx port. Default is 1. - mirror_size: the size of the packets that need to be sent. This will just change (increase) the packet size of each incoming packet. If not specified or invalid value (e.g. <64), the size will not be changed. The packet size will only be changed for IPv4 UDP and IPv4 TCP. Note that these parameters have no effect on the mirror copy submode. Change-Id: Ic46b52abdd80ed51cffee667bd04ade9ec23ff6d Signed-off-by: Luc Provoost <luc.provoost@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/prox_args.c')
-rw-r--r--VNFs/DPPD-PROX/prox_args.c46
1 files changed, 28 insertions, 18 deletions
diff --git a/VNFs/DPPD-PROX/prox_args.c b/VNFs/DPPD-PROX/prox_args.c
index aa87100a..178126f6 100644
--- a/VNFs/DPPD-PROX/prox_args.c
+++ b/VNFs/DPPD-PROX/prox_args.c
@@ -1836,31 +1836,41 @@ static int get_core_cfg(unsigned sindex, char *str, void *data)
return parse_int(&targ->n_max_rules, pkey);
}
- if (STR_EQ(str, "tunnel hop limit")) {
- uint32_t val;
- int err = parse_int(&val, pkey);
- if (err) {
- return -1;
- }
- targ->tunnel_hop_limit = val;
- return 0;
- }
+ if (STR_EQ(str, "tunnel hop limit")) {
+ uint32_t val;
+ int err = parse_int(&val, pkey);
+ if (err) {
+ return -1;
+ }
+ targ->tunnel_hop_limit = val;
+ return 0;
+ }
- if (STR_EQ(str, "lookup port mask")) {
- uint32_t val;
- int err = parse_int(&val, pkey);
- if (err) {
- return -1;
- }
- targ->lookup_port_mask = val;
- return 0;
- }
+ if (STR_EQ(str, "lookup port mask")) {
+ uint32_t val;
+ int err = parse_int(&val, pkey);
+ if (err) {
+ return -1;
+ }
+ targ->lookup_port_mask = val;
+ return 0;
+ }
if (STR_EQ(str, "irq debug")) {
parse_int(&targ->irq_debug, pkey);
return 0;
}
+ if (STR_EQ(str, "multiplier")) {
+ parse_int(&targ->multiplier, pkey);
+ return 0;
+ }
+
+ if (STR_EQ(str, "mirror size")) {
+ parse_int(&targ->mirror_size, pkey);
+ return 0;
+ }
+
set_errf("Option '%s' is not known", str);
/* fail on unknown keys */
return -1;