summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/prox_args.c
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2017-12-11 13:15:58 +0100
committerXavier Simonart <xavier.simonart@intel.com>2018-01-04 16:18:34 +0100
commit35bf01ebc2139ad51caa77c22f5e67f8709e699f (patch)
treee080758394b64b71d5d631cc401cc6010ca550ed /VNFs/DPPD-PROX/prox_args.c
parentd00ce88ca11ee2730126d2e8bd491361cb491674 (diff)
Add config option to use port mac as src mac in l2fwd and swap
L2fwd and swap has many options to set src mac. swap was supposed to support the ability to use port mac, but config file parsing was wrong. L2fwd was using port mac if a port was available and if src mac=packet or if there was no src mac in the config. Now l2fwd supports the following options - "src mac=xx:xx:xx:xx:xx:xx" => this mac address is used as src mac. - "src mac=packet" => the src mac is taken from the dst mac of the received packet. - "src mac=hw" => the src mac is taken from the mac address of the port, if there is a physical port. Error otherwise. - "src mac=no" => src mac kept untouched - No "src mac" => same as "src mac=hw" if there is a physical port and same as "src mac=packet" otherwise. Default is (no "src mac") hence the mac is taken from the tx port if there is one tx port and from the packet otherwise. swap support is similar, except that it does not support "src mac=no". Change-Id: I70fe49a61c2e85772288b769ede14a7a6205d122 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/VNFs/DPPD-PROX/prox_args.c b/VNFs/DPPD-PROX/prox_args.c
index bbe27382..e6d2f83e 100644
--- a/VNFs/DPPD-PROX/prox_args.c
+++ b/VNFs/DPPD-PROX/prox_args.c
@@ -1292,7 +1292,7 @@ static int get_core_cfg(unsigned sindex, char *str, void *data)
}
else if (STR_EQ(pkey, "packet"))
return 0;
- else if (STR_EQ(pkey, "packet")) {
+ else if (STR_EQ(pkey, "hw")) {
targ->flags |= TASK_ARG_HW_SRC_MAC;
return 0;
} else {