Subject: Re: [PATCH netnext] mpls: Reduce skb re-allocations due to skb_cow()

From: Simon Horman <[email-masked]>
Date: Fri, 16 Aug 2024 12:18:43 +0100

On Thu, Aug 15, 2024 at 09:12:01AM -0700, Christoph Paasch wrote:
> mpls_xmit() needs to prepend the MPLS-labels to the packet. That implies
> one needs to make sure there is enough space for it in the headers.
> 
> Calling skb_cow() implies however that one wants to change even the
> playload part of the packet (which is not true for MPLS). Thus, call
> skb_cow_head() instead, which is what other tunnelling protocols do.
> 
> Running a server with this comm it entirely removed the calls to
> pskb_expand_head() from the callstack in mpls_xmit() thus having
> significant CPU-reduction, especially at peak times.

Hi Christoph and Craig,

Including some performance data here would be nice.

> Cc: Roopa Prabhu <[email-masked]>
> Reported-by: Craig Taylor <[email-masked]>
> Signed-off-by: Christoph Paasch <[email-masked]>

And one minor nit, which I do not think warrants a repost:
netnext -> net-next.

In any case, this looks good to me.

Reviewed-by: Simon Horman <[email-masked]>