net/tap: fix icc build
authorFerruh Yigit <ferruh.yigit@intel.com>
Mon, 12 Mar 2018 19:31:33 +0000 (19:31 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 27 Apr 2018 16:34:42 +0000 (17:34 +0100)
commit6db80eb7c97e7db9c006641cc7ecae46c625d64e
tree15cadfabb0d9ea230cfd556ec059500bd7aff033
parent49dad9028e2ac2c9576c41bda13ae62814cb6e97
net/tap: fix icc build

build error:
.../dpdk/drivers/net/tap/rte_eth_tap.c(598):
error #279: controlling expression is constant
RTE_ASSERT(!"unsupported request type: must not happen");

Although RTE_ASSERT helps debugging this issue when assert enabled,
constant expression in assert means this path can be taken during
runtime and there is no protection against it when assert is disabled.

Adding error log and error return back, replacing RTE_ASSERT.

Fixes: 7748a4b44196 ("net/tap: add debug messages")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
drivers/net/tap/rte_eth_tap.c