|
@@ -235,6 +235,12 @@ struct tcf_result {
|
|
u32 classid;
|
|
u32 classid;
|
|
};
|
|
};
|
|
const struct tcf_proto *goto_tp;
|
|
const struct tcf_proto *goto_tp;
|
|
|
|
+
|
|
|
|
+ /* used by the TC_ACT_REINSERT action */
|
|
|
|
+ struct {
|
|
|
|
+ bool ingress;
|
|
|
|
+ struct gnet_stats_queue *qstats;
|
|
|
|
+ };
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
|
|
@@ -569,6 +575,15 @@ static inline void skb_reset_tc(struct sk_buff *skb)
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline bool skb_is_tc_redirected(const struct sk_buff *skb)
|
|
|
|
+{
|
|
|
|
+#ifdef CONFIG_NET_CLS_ACT
|
|
|
|
+ return skb->tc_redirected;
|
|
|
|
+#else
|
|
|
|
+ return false;
|
|
|
|
+#endif
|
|
|
|
+}
|
|
|
|
+
|
|
static inline bool skb_at_tc_ingress(const struct sk_buff *skb)
|
|
static inline bool skb_at_tc_ingress(const struct sk_buff *skb)
|
|
{
|
|
{
|
|
#ifdef CONFIG_NET_CLS_ACT
|
|
#ifdef CONFIG_NET_CLS_ACT
|
|
@@ -1108,4 +1123,17 @@ void mini_qdisc_pair_swap(struct mini_Qdisc_pair *miniqp,
|
|
void mini_qdisc_pair_init(struct mini_Qdisc_pair *miniqp, struct Qdisc *qdisc,
|
|
void mini_qdisc_pair_init(struct mini_Qdisc_pair *miniqp, struct Qdisc *qdisc,
|
|
struct mini_Qdisc __rcu **p_miniq);
|
|
struct mini_Qdisc __rcu **p_miniq);
|
|
|
|
|
|
|
|
+static inline void skb_tc_reinsert(struct sk_buff *skb, struct tcf_result *res)
|
|
|
|
+{
|
|
|
|
+ struct gnet_stats_queue *stats = res->qstats;
|
|
|
|
+ int ret;
|
|
|
|
+
|
|
|
|
+ if (res->ingress)
|
|
|
|
+ ret = netif_receive_skb(skb);
|
|
|
|
+ else
|
|
|
|
+ ret = dev_queue_xmit(skb);
|
|
|
|
+ if (ret && stats)
|
|
|
|
+ qstats_overlimit_inc(res->qstats);
|
|
|
|
+}
|
|
|
|
+
|
|
#endif
|
|
#endif
|