summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/prox_args.c
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2020-09-22 12:42:06 +0200
committerXavier Simonart <xavier.simonart@intel.com>2020-10-16 14:32:53 +0200
commitf9b0da859a9f2a6556f0437d5cff42a0648dcab2 (patch)
tree3b48c310d87547912a2f0fa3e17c34b0e9a594df /VNFs/DPPD-PROX/prox_args.c
parent0d1b97e647224d3d977186523d45555bc819f42a (diff)
Report failure when tap port is not mapped to real dpdk port.
When using "vdev=" in port section, a tap device and an additional dpdk port are created. In most cases, we still want to use a real DPDK device (i.e. bound to an interface such as virtio or a PF or a VF). PROX will now report by default an error when the used [port] is not a DPDK bound device. An additional parameter "virtual=yes" can be added in the port section in case one want to disable this error checking (e.g. specify additional parameter for the vdev device). This patch also fixes a potential endianess issue when configuring IP addresses. Change-Id: Iffdd9552308be3b77cfe2067630647acac2c01fe 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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/prox_args.c b/VNFs/DPPD-PROX/prox_args.c
index d6c1639d..aa87100a 100644
--- a/VNFs/DPPD-PROX/prox_args.c
+++ b/VNFs/DPPD-PROX/prox_args.c
@@ -582,6 +582,13 @@ static int get_port_cfg(unsigned sindex, char *str, void *data)
}
return 0;
}
+ else if (STR_EQ(str, "virtual")) {
+ uint32_t val;
+ if (parse_bool(&val, pkey)) {
+ return -1;
+ }
+ cfg->virtual = val;
+ }
else if (STR_EQ(str, "vdev")) {
prox_strncpy(cfg->vdev, pkey, MAX_NAME_SIZE);
}