From c16517d26de30c90dabce1e456615fd7fbdce07c Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 23 Feb 2020 13:20:11 +0100 Subject: kernel: copy kernel 4.19 code to 5.4 No changes were done to the patches while coping them. Currently they do not apply on top of kernel 5.4. Signed-off-by: Hauke Mehrtens --- .../pending-5.4/616-net_optimize_xfrm_calls.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 target/linux/generic/pending-5.4/616-net_optimize_xfrm_calls.patch (limited to 'target/linux/generic/pending-5.4/616-net_optimize_xfrm_calls.patch') diff --git a/target/linux/generic/pending-5.4/616-net_optimize_xfrm_calls.patch b/target/linux/generic/pending-5.4/616-net_optimize_xfrm_calls.patch new file mode 100644 index 0000000000..6a5801027c --- /dev/null +++ b/target/linux/generic/pending-5.4/616-net_optimize_xfrm_calls.patch @@ -0,0 +1,20 @@ +From: Felix Fietkau +Subject: kernel: add a small xfrm related performance optimization + +Signed-off-by: Felix Fietkau +--- + net/netfilter/nf_nat_core.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/net/netfilter/nf_nat_core.c ++++ b/net/netfilter/nf_nat_core.c +@@ -110,6 +110,9 @@ int nf_xfrm_me_harder(struct net *net, s + struct sock *sk = skb->sk; + int err; + ++ if (skb->dev && !dev_net(skb->dev)->xfrm.policy_count[XFRM_POLICY_OUT]) ++ return 0; ++ + err = xfrm_decode_session(skb, &fl, family); + if (err < 0) + return err; -- cgit v1.2.3