dpdk: fix coverity warning in the flow code 92/27792/4
authorChenmin Sun <chenmin.sun@intel.com>
Sun, 5 Jul 2020 18:46:00 +0000 (02:46 +0800)
committerDamjan Marion <dmarion@me.com>
Thu, 16 Jul 2020 21:44:19 +0000 (21:44 +0000)
CID 211153

Type: fix

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: Ic4d518d047c3ff36d9a7b72477c3efcb554d05bb

src/plugins/dpdk/device/flow.c

index 674f2f5..f34050a 100644 (file)
@@ -221,7 +221,7 @@ dpdk_flow_add (dpdk_device_t * xd, vnet_flow_t * f, dpdk_flow_entry_t * fe)
        }
       protocol = l2tp->protocol;
     }
-  if (f->type == VNET_FLOW_TYPE_IP4_IPSEC_ESP)
+  else if (f->type == VNET_FLOW_TYPE_IP4_IPSEC_ESP)
     {
       vnet_flow_ip4_ipsec_esp_t *tesp = &f->ip4_ipsec_esp;
       item->type = RTE_FLOW_ITEM_TYPE_IPV4;