Skip to content

Commit

Permalink
tc: Fix build breakage on GCC 7 by annotating fall-through.
Browse files Browse the repository at this point in the history
Open vSwitch enables the GCC 7+ option that warns about fall-through
switch statements.  This commit fixes newly introduced warnings.

Fixes: d6118e6 ("netdev-tc-offloads: Verify csum flags on dump from tc")
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Paul Blakey <paulb@mellanox.com>
  • Loading branch information
blp committed Nov 27, 2017
1 parent bbf219e commit eeb0ca8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/tc.c
Expand Up @@ -1250,6 +1250,7 @@ csum_update_flag(struct tc_flower *flower,
switch (htype) {
case TCA_PEDIT_KEY_EX_HDR_TYPE_IP4:
flower->csum_update_flags |= TCA_CSUM_UPDATE_FLAG_IPV4HDR;
/* Fall through. */
case TCA_PEDIT_KEY_EX_HDR_TYPE_IP6:
case TCA_PEDIT_KEY_EX_HDR_TYPE_TCP:
case TCA_PEDIT_KEY_EX_HDR_TYPE_UDP:
Expand All @@ -1269,6 +1270,7 @@ csum_update_flag(struct tc_flower *flower,
flower->key.ip_proto);
break;
}
/* Fall through. */
case TCA_PEDIT_KEY_EX_HDR_TYPE_ETH:
return 0; /* success */

Expand Down

0 comments on commit eeb0ca8

Please sign in to comment.