All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/tap: fix icc build
@ 2018-03-12 19:31 Ferruh Yigit
  2018-04-24 13:21 ` [dpdk-stable] " De Lara Guarch, Pablo
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2018-03-12 19:31 UTC (permalink / raw)
  To: Pascal Mazon; +Cc: dev, Ferruh Yigit, stable

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>
---
 drivers/net/tap/rte_eth_tap.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index f09db0ea9..4bf2d9618 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -593,7 +593,9 @@ tap_ioctl(struct pmd_internals *pmd, unsigned long request,
 	case SIOCSIFMTU:
 		break;
 	default:
-		RTE_ASSERT(!"unsupported request type: must not happen");
+		RTE_LOG(WARNING, PMD, "%s: ioctl() called with wrong arg\n",
+			pmd->name);
+		return -EINVAL;
 	}
 	if (ioctl(pmd->ioctl_sock, request, ifr) < 0)
 		goto error;
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] net/tap: fix icc build
  2018-03-12 19:31 [PATCH] net/tap: fix icc build Ferruh Yigit
@ 2018-04-24 13:21 ` De Lara Guarch, Pablo
  2018-04-24 17:05   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: De Lara Guarch, Pablo @ 2018-04-24 13:21 UTC (permalink / raw)
  To: Yigit, Ferruh, Pascal Mazon; +Cc: dev, Yigit, Ferruh, stable



> -----Original Message-----
> From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of Ferruh Yigit
> Sent: Monday, March 12, 2018 7:32 PM
> To: Pascal Mazon <pascal.mazon@6wind.com>
> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>; stable@dpdk.org
> Subject: [dpdk-stable] [PATCH] 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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] net/tap: fix icc build
  2018-04-24 13:21 ` [dpdk-stable] " De Lara Guarch, Pablo
@ 2018-04-24 17:05   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2018-04-24 17:05 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, Pascal Mazon; +Cc: dev, stable

On 4/24/2018 2:21 PM, De Lara Guarch, Pablo wrote:
> 
> 
>> -----Original Message-----
>> From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of Ferruh Yigit
>> Sent: Monday, March 12, 2018 7:32 PM
>> To: Pascal Mazon <pascal.mazon@6wind.com>
>> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>; stable@dpdk.org
>> Subject: [dpdk-stable] [PATCH] 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>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-24 17:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-12 19:31 [PATCH] net/tap: fix icc build Ferruh Yigit
2018-04-24 13:21 ` [dpdk-stable] " De Lara Guarch, Pablo
2018-04-24 17:05   ` Ferruh Yigit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.