summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/prox_args.c
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2018-12-06 02:59:29 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-12-06 02:59:29 +0000
commit8dd272c5f94e4d7faa8d23d4943137f3779e2c05 (patch)
treee20e21129312dab48ba4d2ecda79d5e80a19c75b /VNFs/DPPD-PROX/prox_args.c
parent9640f37b8a110f5e9fa1e71cd2de48b95373ed12 (diff)
parent899bdc59981a301aa6f5d02f0b1edef404e93569 (diff)
Merge "Add support for VLAN insert and stripping"
Diffstat (limited to 'VNFs/DPPD-PROX/prox_args.c')
-rw-r--r--VNFs/DPPD-PROX/prox_args.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/prox_args.c b/VNFs/DPPD-PROX/prox_args.c
index c09c563d..59c514fc 100644
--- a/VNFs/DPPD-PROX/prox_args.c
+++ b/VNFs/DPPD-PROX/prox_args.c
@@ -559,6 +559,23 @@ static int get_port_cfg(unsigned sindex, char *str, void *data)
else
cfg->requested_rx_offload &= ~DEV_RX_OFFLOAD_CRC_STRIP;
}
+ else if (STR_EQ(str, "vlan")) {
+#if RTE_VERSION >= RTE_VERSION_NUM(18,8,0,1)
+ uint32_t val;
+ if (parse_bool(&val, pkey)) {
+ return -1;
+ }
+ if (val) {
+ cfg->requested_rx_offload |= DEV_RX_OFFLOAD_VLAN_STRIP;
+ cfg->requested_tx_offload |= DEV_TX_OFFLOAD_VLAN_INSERT;
+ } else {
+ cfg->requested_rx_offload &= ~DEV_RX_OFFLOAD_VLAN_STRIP;
+ cfg->requested_tx_offload &= ~DEV_TX_OFFLOAD_VLAN_INSERT;
+ }
+#else
+ plog_warn("vlan option not supported : update DPDK at least to 18.08 to support this option\n");
+#endif
+ }
else if (STR_EQ(str, "mtu size")) {
uint32_t val;
if (parse_int(&val, pkey)) {