diff options
author | Tom Herbert <tom@quantonium.net> | 2017-09-01 23:04:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-05 20:40:08 +0200 |
commit | 3a1214e8b06317b4e71cd3a36344df87b7858e19 (patch) | |
tree | eb04848adab6ac341a0b9dcbcd5e646ccf28e769 /include/net | |
parent | soc: ti/knav_dma: include dmaengine header (diff) | |
download | linux-3a1214e8b06317b4e71cd3a36344df87b7858e19.tar.xz linux-3a1214e8b06317b4e71cd3a36344df87b7858e19.zip |
flow_dissector: Cleanup control flow
__skb_flow_dissect is riddled with gotos that make discerning the flow,
debugging, and extending the capability difficult. This patch
reorganizes things so that we only perform goto's after the two main
switch statements (no gotos within the cases now). It also eliminates
several goto labels so that there are only two labels that can be target
for goto.
Reported-by: Alexander Popov <alex.popov@linux.com>
Signed-off-by: Tom Herbert <tom@quantonium.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/flow_dissector.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/flow_dissector.h b/include/net/flow_dissector.h index e2663e900b0a..fc3dce730a6b 100644 --- a/include/net/flow_dissector.h +++ b/include/net/flow_dissector.h @@ -19,6 +19,14 @@ struct flow_dissector_key_control { #define FLOW_DIS_FIRST_FRAG BIT(1) #define FLOW_DIS_ENCAPSULATION BIT(2) +enum flow_dissect_ret { + FLOW_DISSECT_RET_OUT_GOOD, + FLOW_DISSECT_RET_OUT_BAD, + FLOW_DISSECT_RET_PROTO_AGAIN, + FLOW_DISSECT_RET_IPPROTO_AGAIN, + FLOW_DISSECT_RET_CONTINUE, +}; + /** * struct flow_dissector_key_basic: * @thoff: Transport header offset |