Merge "Fix potential crash when getting device info"
authorDeepak S <deepak.s@linux.intel.com>
Thu, 6 Dec 2018 02:59:38 +0000 (02:59 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Thu, 6 Dec 2018 02:59:38 +0000 (02:59 +0000)
VNFs/DPPD-PROX/prox_args.c
VNFs/DPPD-PROX/prox_port_cfg.c
docs/index.rst [new file with mode: 0644]

index c09c563..59c514f 100644 (file)
@@ -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)) {
index 5de9dd3..5c5ca58 100644 (file)
@@ -462,6 +462,7 @@ static void init_port(struct prox_port_cfg *port_cfg)
 #if RTE_VERSION >= RTE_VERSION_NUM(18,8,0,1)
        CONFIGURE_RX_OFFLOAD(DEV_RX_OFFLOAD_CRC_STRIP);
        CONFIGURE_RX_OFFLOAD(DEV_RX_OFFLOAD_JUMBO_FRAME);
+       CONFIGURE_RX_OFFLOAD(DEV_RX_OFFLOAD_VLAN_STRIP);
 #else
        if (port_cfg->requested_rx_offload & DEV_RX_OFFLOAD_CRC_STRIP) {
                port_cfg->port_conf.rxmode.hw_strip_crc = 1;
@@ -475,6 +476,7 @@ static void init_port(struct prox_port_cfg *port_cfg)
 #if RTE_VERSION >= RTE_VERSION_NUM(18,8,0,1)
        CONFIGURE_TX_OFFLOAD(DEV_TX_OFFLOAD_IPV4_CKSUM);
        CONFIGURE_TX_OFFLOAD(DEV_TX_OFFLOAD_UDP_CKSUM);
+       CONFIGURE_TX_OFFLOAD(DEV_TX_OFFLOAD_VLAN_INSERT);
 #else
        if ((port_cfg->dev_info.tx_offload_capa & (DEV_TX_OFFLOAD_IPV4_CKSUM | DEV_TX_OFFLOAD_UDP_CKSUM)) == 0) {
                port_cfg->tx_conf.txq_flags |= ETH_TXQ_FLAGS_NOOFFLOADS;
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644 (file)
index 0000000..1376a69
--- /dev/null
@@ -0,0 +1,19 @@
+.. _samplevnf:
+
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. SPDX-License-Identifier CC-BY-4.0
+.. (c) Open Platform for NFV Project, Inc. and its contributors
+
+*********************************
+OPNFV Samplevnf
+*********************************
+
+.. toctree::
+   :numbered:
+   :maxdepth: 1
+
+   release/release-notes/index
+   release/results/index
+   testing/developer/index
+   testing/user/userguide/index