[dpdk-dev,04/10] net/ixgbe: fix gcc 7 warning for switch fallthrough

Message ID 20170504153822.19461-5-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Bruce Richardson May 4, 2017, 3:38 p.m. UTC
  Add a comment documenting explicitly that we are falling through the case
statements to the next one.

Fixes: f9072f8b90bb ("ixgbe: migrate flow director filtering to new API")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ixgbe/ixgbe_fdir.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Wenzhuo Lu May 5, 2017, 12:46 a.m. UTC | #1
Hi,


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson
> Sent: Thursday, May 4, 2017 11:38 PM
> To: dev@dpdk.org
> Cc: Richardson, Bruce
> Subject: [dpdk-dev] [PATCH 04/10] net/ixgbe: fix gcc 7 warning for switch
> fallthrough
> 
> Add a comment documenting explicitly that we are falling through the case
> statements to the next one.
> 
> Fixes: f9072f8b90bb ("ixgbe: migrate flow director filtering to new API")
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c
index d6e48e9..7f6c7b5 100644
--- a/drivers/net/ixgbe/ixgbe_fdir.c
+++ b/drivers/net/ixgbe/ixgbe_fdir.c
@@ -730,6 +730,7 @@  ixgbe_fdir_filter_to_atr_input(const struct rte_eth_fdir_filter *fdir_filter,
 			fdir_filter->input.flow.udp4_flow.src_port;
 		input->formatted.dst_port =
 			fdir_filter->input.flow.udp4_flow.dst_port;
+		/* fall-through */
 	/*for SCTP flow type, port and verify_tag are meaningless in ixgbe.*/
 	case RTE_ETH_FLOW_NONFRAG_IPV4_SCTP:
 	case RTE_ETH_FLOW_NONFRAG_IPV4_OTHER:
@@ -745,6 +746,7 @@  ixgbe_fdir_filter_to_atr_input(const struct rte_eth_fdir_filter *fdir_filter,
 			fdir_filter->input.flow.udp6_flow.src_port;
 		input->formatted.dst_port =
 			fdir_filter->input.flow.udp6_flow.dst_port;
+		/* fall-through */
 	/*for SCTP flow type, port and verify_tag are meaningless in ixgbe.*/
 	case RTE_ETH_FLOW_NONFRAG_IPV6_SCTP:
 	case RTE_ETH_FLOW_NONFRAG_IPV6_OTHER: