From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [RFC PATCH 0/3] sk_buff: add skb extension infrastructure Date: Mon, 26 Nov 2018 15:05:02 -0800 Message-ID: References: <20181126113857.29270-1-fw@strlen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: Florian Westphal , netdev@vger.kernel.org Return-path: Received: from mail-pg1-f193.google.com ([209.85.215.193]:38166 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726627AbeK0KAq (ORCPT ); Tue, 27 Nov 2018 05:00:46 -0500 Received: by mail-pg1-f193.google.com with SMTP id g189so6882778pgc.5 for ; Mon, 26 Nov 2018 15:05:03 -0800 (PST) In-Reply-To: <20181126113857.29270-1-fw@strlen.de> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 11/26/2018 03:38 AM, Florian Westphal wrote: > The (out-of-tree) Multipath-TCP implementation needs a significant amount > of extra space in the skb control buffer. > > Increasing skb->cb[] size in mainline is a non-starter for memory and > and performance reasons (f.e. increase in cb size also moves several > frequently-accessed fields to other cache lines). > One thing that could be done without too much impact is to provide a cbext[] only for TCP packets in write/rtx queue, that is not in sk_buff but on the struct sk_buff_fclones This extra space would not be 0-initialized at alloc_skb() and would not be copied at skb_clone() I mentioned this idea a while back already. diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 73902acf2b71c8800d81b744a936a7420f33b459..c4bfc2fd98eb9723c0219d5cd8bf5b28afaf5398 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -1018,6 +1018,8 @@ struct sk_buff_fclones { struct sk_buff skb2; refcount_t fclone_ref; + + char cbext[128] __aligned(8); }; /**