From: Florian Westphal Subject: Re: [PATCH net-next 02/13] sk_buff: add skb extension infrastructure Date: Wed, 12 Dec 2018 21:52:36 +0100 Message-ID: <20181212205236.sja4fw4sf5egtkyw@breakpoint.cc> References: <20181210145006.19098-1-fw@strlen.de> <20181210145006.19098-3-fw@strlen.de> <4a43ca01-d09b-71e8-18e1-9a5707787ae0@gmail.com> <20181212184446.gyjwbwoyzhrk7kxw@breakpoint.cc> <7906a8d9-c2f9-0883-3d13-5ef38e53f10c@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Florian Westphal , netdev@vger.kernel.org To: Eric Dumazet Return-path: Received: from Chamillionaire.breakpoint.cc ([146.0.238.67]:45418 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728341AbeLLUwi (ORCPT ); Wed, 12 Dec 2018 15:52:38 -0500 Content-Disposition: inline In-Reply-To: <7906a8d9-c2f9-0883-3d13-5ef38e53f10c@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: Eric Dumazet wrote: > > If you prefer that, ok, but I don't see why we can't unify them behind > > a single layer? > > Well, for a start we do not use nf_brifge or secpath. Then the extension framework isn't built and the result is exactly the same as before these patches: helpers turn into empty inline stubs. If its built, sk_buff size is reduced by up to one pointer, and the added one isn't initialised at allocation time. sk_buff layout with the extension patches is almost same as with XFRM=n BRIDGE_NF=n (because nf_bridge and sp pointers get removed), there is only one additional pointer at the end, not inited at alloc time. The other new member fills a hole. > XDP is all about not unifying because unifying has a cost. > > Do we really want to slow down the stack just because MPTCP is coming ? I don't want to slow down the stack. All places that gain a helper call do so instead of the nf_bridge/secpath one. They only expand into code if at least one of secpath or nf_bridge are built in. Both struct secpath and nf_bridge have their refcounts removed, so no additional reference counts are added. If you still think this is proposal is a bad idea, ok, let me know and I will stop working on this. MPTCP can then just add skb->cb2[], but neither nf_bridge nor secpath can use it. If not, I will send another iteration that just allocates the entire extension space if first extension is added, it simplifies allocation handling a little.