From 0d2e17d445cf3e16010f3825cbc118cd9f3581cb Mon Sep 17 00:00:00 2001 From: Zoltan HERPAI Date: Mon, 20 Jun 2016 17:44:53 +0200 Subject: brcm2708: rename patch Signed-off-by: Zoltan HERPAI --- ...20-net-sched-add-skb_at_tc_ingress-helper.patch | 50 ++++++++++++++++++++++ ...21-net-sched-add-skb_at_tc_ingress-helper.patch | 50 ---------------------- 2 files changed, 50 insertions(+), 50 deletions(-) create mode 100644 target/linux/brcm2708/patches-4.4/0220-net-sched-add-skb_at_tc_ingress-helper.patch delete mode 100644 target/linux/brcm2708/patches-4.4/0221-net-sched-add-skb_at_tc_ingress-helper.patch (limited to 'target/linux') diff --git a/target/linux/brcm2708/patches-4.4/0220-net-sched-add-skb_at_tc_ingress-helper.patch b/target/linux/brcm2708/patches-4.4/0220-net-sched-add-skb_at_tc_ingress-helper.patch new file mode 100644 index 0000000000..df8f3dc0e1 --- /dev/null +++ b/target/linux/brcm2708/patches-4.4/0220-net-sched-add-skb_at_tc_ingress-helper.patch @@ -0,0 +1,50 @@ +From a436f21ba8e57517734c24d2b571d5aed888be36 Mon Sep 17 00:00:00 2001 +From: Daniel Borkmann +Date: Thu, 7 Jan 2016 15:50:22 +0100 +Subject: [PATCH 221/232] net, sched: add skb_at_tc_ingress helper + +Add a skb_at_tc_ingress() as this will be needed elsewhere as well and +can hide the ugly ifdef. + +Signed-off-by: Daniel Borkmann +Acked-by: Alexei Starovoitov +Signed-off-by: David S. Miller +--- + include/net/sch_generic.h | 9 +++++++++ + net/sched/cls_bpf.c | 6 +----- + 2 files changed, 10 insertions(+), 5 deletions(-) + +--- a/include/net/sch_generic.h ++++ b/include/net/sch_generic.h +@@ -408,6 +408,15 @@ bool tcf_destroy(struct tcf_proto *tp, b + void tcf_destroy_chain(struct tcf_proto __rcu **fl); + int skb_do_redirect(struct sk_buff *); + ++static inline bool skb_at_tc_ingress(const struct sk_buff *skb) ++{ ++#ifdef CONFIG_NET_CLS_ACT ++ return G_TC_AT(skb->tc_verd) & AT_INGRESS; ++#else ++ return false; ++#endif ++} ++ + /* Reset all TX qdiscs greater then index of a device. */ + static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i) + { +--- a/net/sched/cls_bpf.c ++++ b/net/sched/cls_bpf.c +@@ -79,12 +79,8 @@ static int cls_bpf_classify(struct sk_bu + struct tcf_result *res) + { + struct cls_bpf_head *head = rcu_dereference_bh(tp->root); ++ bool at_ingress = skb_at_tc_ingress(skb); + struct cls_bpf_prog *prog; +-#ifdef CONFIG_NET_CLS_ACT +- bool at_ingress = G_TC_AT(skb->tc_verd) & AT_INGRESS; +-#else +- bool at_ingress = false; +-#endif + int ret = -1; + + if (unlikely(!skb_mac_header_was_set(skb))) diff --git a/target/linux/brcm2708/patches-4.4/0221-net-sched-add-skb_at_tc_ingress-helper.patch b/target/linux/brcm2708/patches-4.4/0221-net-sched-add-skb_at_tc_ingress-helper.patch deleted file mode 100644 index df8f3dc0e1..0000000000 --- a/target/linux/brcm2708/patches-4.4/0221-net-sched-add-skb_at_tc_ingress-helper.patch +++ /dev/null @@ -1,50 +0,0 @@ -From a436f21ba8e57517734c24d2b571d5aed888be36 Mon Sep 17 00:00:00 2001 -From: Daniel Borkmann -Date: Thu, 7 Jan 2016 15:50:22 +0100 -Subject: [PATCH 221/232] net, sched: add skb_at_tc_ingress helper - -Add a skb_at_tc_ingress() as this will be needed elsewhere as well and -can hide the ugly ifdef. - -Signed-off-by: Daniel Borkmann -Acked-by: Alexei Starovoitov -Signed-off-by: David S. Miller ---- - include/net/sch_generic.h | 9 +++++++++ - net/sched/cls_bpf.c | 6 +----- - 2 files changed, 10 insertions(+), 5 deletions(-) - ---- a/include/net/sch_generic.h -+++ b/include/net/sch_generic.h -@@ -408,6 +408,15 @@ bool tcf_destroy(struct tcf_proto *tp, b - void tcf_destroy_chain(struct tcf_proto __rcu **fl); - int skb_do_redirect(struct sk_buff *); - -+static inline bool skb_at_tc_ingress(const struct sk_buff *skb) -+{ -+#ifdef CONFIG_NET_CLS_ACT -+ return G_TC_AT(skb->tc_verd) & AT_INGRESS; -+#else -+ return false; -+#endif -+} -+ - /* Reset all TX qdiscs greater then index of a device. */ - static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i) - { ---- a/net/sched/cls_bpf.c -+++ b/net/sched/cls_bpf.c -@@ -79,12 +79,8 @@ static int cls_bpf_classify(struct sk_bu - struct tcf_result *res) - { - struct cls_bpf_head *head = rcu_dereference_bh(tp->root); -+ bool at_ingress = skb_at_tc_ingress(skb); - struct cls_bpf_prog *prog; --#ifdef CONFIG_NET_CLS_ACT -- bool at_ingress = G_TC_AT(skb->tc_verd) & AT_INGRESS; --#else -- bool at_ingress = false; --#endif - int ret = -1; - - if (unlikely(!skb_mac_header_was_set(skb))) -- cgit v1.2.3