From c1f2f55d4928d7de9a1eaac88b8ac180752184d9 Mon Sep 17 00:00:00 2001 From: Stanislav Fomichev Date: Fri, 31 May 2019 14:05:06 -0700 Subject: [PATCH] UPSTREAM: flow_dissector: remove unused FLOW_DISSECTOR_F_STOP_AT_L3 flag This flag is not used by any caller, remove it. Change-Id: I280df0c749d35d6259fdcf3c7f9d3d142e6289a4 Signed-off-by: Stanislav Fomichev Signed-off-by: David S. Miller --- include/net/flow_dissector.h | 5 ++--- net/core/flow_dissector.c | 10 ++-------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/include/net/flow_dissector.h b/include/net/flow_dissector.h index a28756ce35c3..8fbf9608e933 100644 --- a/include/net/flow_dissector.h +++ b/include/net/flow_dissector.h @@ -213,9 +213,8 @@ enum flow_dissector_key_id { }; #define FLOW_DISSECTOR_F_PARSE_1ST_FRAG BIT(0) -#define FLOW_DISSECTOR_F_STOP_AT_L3 BIT(1) -#define FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL BIT(2) -#define FLOW_DISSECTOR_F_STOP_AT_ENCAP BIT(3) +#define FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL BIT(1) +#define FLOW_DISSECTOR_F_STOP_AT_ENCAP BIT(2) struct flow_dissector_key { enum flow_dissector_key_id key_id; diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index cf3e8d653042..baf4ecaf9b3d 100644 --- a/net/core/flow_dissector.c +++ b/net/core/flow_dissector.c @@ -575,6 +575,8 @@ bool bpf_flow_dissect(struct bpf_prog *prog, struct bpf_flow_dissector *ctx, * @proto: protocol for which to get the flow, if @data is NULL use skb->protocol * @nhoff: network header offset, if @data is NULL use skb_network_offset(skb) * @hlen: packet header length, if @data is NULL use skb_headlen(skb) + * @flags: flags that control the dissection process, e.g. + * FLOW_DISSECTOR_F_STOP_AT_ENCAP. * * The function will try to retrieve individual keys into target specified * by flow_dissector from either the skbuff or a raw buffer specified by the @@ -742,11 +744,6 @@ proto_again: __skb_flow_dissect_ipv4(skb, flow_dissector, target_container, data, iph); - if (flags & FLOW_DISSECTOR_F_STOP_AT_L3) { - fdret = FLOW_DISSECT_RET_OUT_GOOD; - break; - } - break; } case htons(ETH_P_IPV6): { @@ -797,9 +794,6 @@ proto_again: __skb_flow_dissect_ipv6(skb, flow_dissector, target_container, data, iph); - if (flags & FLOW_DISSECTOR_F_STOP_AT_L3) - fdret = FLOW_DISSECT_RET_OUT_GOOD; - break; } case htons(ETH_P_8021AD):