From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f169.google.com (mail-wr0-f169.google.com [209.85.128.169]) by dpdk.org (Postfix) with ESMTP id CD8C17D12 for ; Wed, 14 Jun 2017 15:24:23 +0200 (CEST) Received: by mail-wr0-f169.google.com with SMTP id q97so598752wrb.2 for ; Wed, 14 Jun 2017 06:24:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=2Rt/63O0QI+ioUGFcrvE51LTv9apvdtP8N56Elzgzqg=; b=FKynyaiujzyh9J2/vWGlS0BJt9rDK3JTAB5CKdfWWQ9Ozt1osqMjEl69XLoAClViMO yKfMvRa/4i/MexI9i+POKWAfO5iCuaVzYhXqIb27SlFKbpvR/FAGWtCKKnI2jVHZSt7u Sp/0ofxhb+u/oZ9j/l1USPw5ZhYS3BjMM0UxEjgJeUUwnnayHW9p/TwTik17cnUOhSmN qOyyUSgOKJn8AcPpiBNm9y/xXl8RctHPYuMloxxhHrG0bEc67WrmdHa2YcqEPT19z9hW vBoetCCccT08pASyftRgQ6BlbQ7X+hbdgakNA4QsCgXk36kVKqu12KgjBoW6QX549Lgj 7E7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=2Rt/63O0QI+ioUGFcrvE51LTv9apvdtP8N56Elzgzqg=; b=b7BOLsb7UvtmtFKtPx81od6YTT9OrSELJiCWdRJJiA4a7otsx3kiFYVpc+ORP/VS5R aA9FJLCaMik2L/RhtqJdcPexktcpRZL80a7f6HmjL20erWGi845LZQsyz8xnQ0fpB7Er aqRhk0BlhG9v1pBHpJxn6oJjCKxYxjDHwvsaZeZCTqBwwqWoVORYjkKe8vu5nS2kzLdS gxRhR8ez/UWSJWZRhUxtlC0mm44Yn1c9DbhI+PR9lFozl+/TZVWO4Xo71KWX4tzUFalr 5Ydjs5LZ4OxvhidYMUkCqZVS4/BZ6uk9e/BcFB1b1VTqXSQpjY4c899tzuHQtUy+bwRE Wgpg== X-Gm-Message-State: AKS2vOxtvOgsweT+hzg3ClurDTlLWmebgwpIootu7yix9vmubYNC2VlT JB1KVCF1zWC8z69h X-Received: by 10.223.176.133 with SMTP id i5mr28912wra.53.1497446663398; Wed, 14 Jun 2017 06:24:23 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id t22sm15879wmt.19.2017.06.14.06.24.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Jun 2017 06:24:22 -0700 (PDT) Date: Wed, 14 Jun 2017 15:24:14 +0200 From: Adrien Mazarguil To: Ferruh Yigit Cc: Nelio Laranjeiro , dev@dpdk.org, stable@dpdk.org Message-ID: <20170614132414.GN1758@6wind.com> References: <20170613164212.42374-1-ferruh.yigit@intel.com> <20170613164212.42374-4-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170613164212.42374-4-ferruh.yigit@intel.com> Subject: Re: [dpdk-stable] [PATCH 4/5] net/mlx5: fix build with gcc 7.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jun 2017 13:24:24 -0000 On Tue, Jun 13, 2017 at 05:42:11PM +0100, Ferruh Yigit wrote: > build error: > .../dpdk/drivers/net/mlx5/mlx5_fdir.c: > In function ‘fdir_filter_to_flow_desc’: > .../dpdk/drivers/net/mlx5/mlx5_fdir.c:146:18: > error: this statement may fall through [-Werror=implicit-fallthrough=] > desc->dst_port = fdir_filter->input.flow.udp4_flow.dst_port; > ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > .../dpdk/drivers/net/mlx5/mlx5_fdir.c:147:2: note: here > case RTE_ETH_FLOW_NONFRAG_IPV4_OTHER: > ^~~~ > > Fixed by adding fallthrough comment to the code. > > Fixes: 76f5c99e6840 ("mlx5: support flow director") > Cc: stable@dpdk.org > > Signed-off-by: Ferruh Yigit > --- > drivers/net/mlx5/mlx5_fdir.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/mlx5/mlx5_fdir.c b/drivers/net/mlx5/mlx5_fdir.c > index 1cff41bab..c8d47489f 100644 > --- a/drivers/net/mlx5/mlx5_fdir.c > +++ b/drivers/net/mlx5/mlx5_fdir.c > @@ -144,6 +144,7 @@ fdir_filter_to_flow_desc(const struct rte_eth_fdir_filter *fdir_filter, > case RTE_ETH_FLOW_NONFRAG_IPV4_TCP: > desc->src_port = fdir_filter->input.flow.udp4_flow.src_port; > desc->dst_port = fdir_filter->input.flow.udp4_flow.dst_port; > + /* fallthrough */ > case RTE_ETH_FLOW_NONFRAG_IPV4_OTHER: > desc->src_ip[0] = fdir_filter->input.flow.ip4_flow.src_ip; > desc->dst_ip[0] = fdir_filter->input.flow.ip4_flow.dst_ip; That's a fine workaround, therefore: Acked-by: Adrien Mazarguil On a personal note though, GCC, seriously? While I understand missing breaks inside switch statements is a common mistake, having the compiler rely on a comment that basically says "yes, it's done on purpose" just doesn't feel right; compilers should discard comments and not attempt to interpret them, otherwise they have to deal with locale-related issues. It's like enforcing checkpatch.pl rules in GCC by default. Anyway, back to work. -- Adrien Mazarguil 6WIND