public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH net-next] mpls: Do not orphan the skb
@ 2024-03-06 18:11 Christoph Paasch
  2024-03-06 18:40 ` Eric Dumazet
  2024-03-08  5:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Paasch @ 2024-03-06 18:11 UTC (permalink / raw)
  To: David Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: netdev, Roopa Prabhu, Craig Taylor

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>
---
 net/mpls/mpls_iptunnel.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/mpls/mpls_iptunnel.c b/net/mpls/mpls_iptunnel.c
index ef59e25dc482..8fc790f2a01b 100644
--- a/net/mpls/mpls_iptunnel.c
+++ b/net/mpls/mpls_iptunnel.c
@@ -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;
-- 
2.39.3 (Apple Git-146)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] mpls: Do not orphan the skb
  2024-03-06 18:11 [PATCH net-next] mpls: Do not orphan the skb Christoph Paasch
@ 2024-03-06 18:40 ` Eric Dumazet
  2024-03-08  5:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2024-03-06 18:40 UTC (permalink / raw)
  To: Christoph Paasch
  Cc: David Miller, Jakub Kicinski, Paolo Abeni, netdev, Roopa Prabhu,
	Craig Taylor

On Wed, Mar 6, 2024 at 7:11 PM Christoph Paasch <cpaasch@apple•com> wrote:
>
> 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>
> ---

This seems reasonable to me, thanks.

Packets are immediately sent, there is no queue.

Reviewed-by: Eric Dumazet <edumazet@google•com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] mpls: Do not orphan the skb
  2024-03-06 18:11 [PATCH net-next] mpls: Do not orphan the skb Christoph Paasch
  2024-03-06 18:40 ` Eric Dumazet
@ 2024-03-08  5:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-03-08  5:00 UTC (permalink / raw)
  To: Christoph Paasch; +Cc: davem, edumazet, kuba, pabeni, netdev, roopa, cmtaylor

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel•org>:

On Wed, 06 Mar 2024 10:11:17 -0800 you wrote:
> 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, ...
> 
> [...]

Here is the summary with links:
  - [net-next] mpls: Do not orphan the skb
    https://git.kernel.org/netdev/net-next/c/8edbd3960150

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-08  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-06 18:11 [PATCH net-next] mpls: Do not orphan the skb Christoph Paasch
2024-03-06 18:40 ` Eric Dumazet
2024-03-08  5:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox