mpls: Do not orphan the skb
authorChristoph Paasch <cpaasch@apple.com>
Wed, 6 Mar 2024 18:11:17 +0000 (10:11 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 8 Mar 2024 04:42:13 +0000 (20:42 -0800)
We observed that TCP-pacing was falling back to the TCP-layer pacing
instead of utilizing sch_fq for the pacing. This causes significant
CPU-usage due to the hrtimer running on a per-TCP-connection basis.

The issue is that mpls_xmit() calls skb_orphan() and thus sets
skb->sk to NULL. Which implies that many of the goodies of TCP won't
work. Pacing falls back to TCP-layer pacing. TCP Small Queues does not
work, ...

It is safe to remove this call to skb_orphan() in mpls_xmit() as there
really is not reason for it to be there. It appears that this call to
skb_orphan comes from the very initial implementation of MPLS.

Cc: Roopa Prabhu <roopa@nvidia.com>
Reported-by: Craig Taylor <cmtaylor@apple.com>
Signed-off-by: Christoph Paasch <cpaasch@apple.com>
Link: https://lore.kernel.org/r/20240306181117.77419-1-cpaasch@apple.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mpls/mpls_iptunnel.c

index ef59e25..8fc790f 100644 (file)
@@ -55,8 +55,6 @@ static int mpls_xmit(struct sk_buff *skb)
        out_dev = dst->dev;
        net = dev_net(out_dev);
 
-       skb_orphan(skb);
-
        if (!mpls_output_possible(out_dev) ||
            !dst->lwtstate || skb_warn_if_lro(skb))
                goto drop;