summaryrefslogtreecommitdiff
path: root/net/sched/act_api.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2020-11-27 14:36:04 -0800
committerJakub Kicinski <kuba@kernel.org>2020-11-27 14:36:04 -0800
commit4be074e6dd24e83da38e7b700c150a62667cf2f7 (patch)
tree05c6360e02fed40ef5dd599c1974414b639cb7e7 /net/sched/act_api.c
parentfb3158ea612c5a0bda8ce07977c573757753a270 (diff)
parentc129412f74e99b609f0a8e95fc3915af1fd40f34 (diff)
Merge branch 'net-sched-fix-over-mtu-packet-of-defrag-in'
wenxu says: ==================== net/sched: fix over mtu packet of defrag in Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet over the mtu of target device. The first patch fix miss init the qdisc_skb_cb->mru The send one refactor the hanle of xmit in act_mirred and prepare for the third one The last one add implict packet fragment support to fix the over mtu for defrag in act_ct. ==================== Link: https://lore.kernel.org/r/1606276883-6825-1-git-send-email-wenxu@ucloud.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/sched/act_api.c')
-rw-r--r--net/sched/act_api.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 99db1c77426b..2e85b636b27b 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -22,6 +22,22 @@
#include <net/act_api.h>
#include <net/netlink.h>
+#ifdef CONFIG_INET
+DEFINE_STATIC_KEY_FALSE(tcf_frag_xmit_count);
+EXPORT_SYMBOL_GPL(tcf_frag_xmit_count);
+#endif
+
+int tcf_dev_queue_xmit(struct sk_buff *skb, int (*xmit)(struct sk_buff *skb))
+{
+#ifdef CONFIG_INET
+ if (static_branch_unlikely(&tcf_frag_xmit_count))
+ return sch_frag_xmit_hook(skb, xmit);
+#endif
+
+ return xmit(skb);
+}
+EXPORT_SYMBOL_GPL(tcf_dev_queue_xmit);
+
static void tcf_action_goto_chain_exec(const struct tc_action *a,
struct tcf_result *res)
{