From: Florian Westphal Subject: Re: [PATCH net-next 13/13] net: switch secpath to use skb extension infrastructure Date: Wed, 12 Dec 2018 12:52:58 +0100 Message-ID: <20181212115258.txqgr7tnpnuuwyhi@breakpoint.cc> References: <20181210145006.19098-1-fw@strlen.de> <20181210145006.19098-14-fw@strlen.de> <20181211080605.GS3581@gauss3.secunet.de> <20181211101841.oyacneho4724tzmj@breakpoint.cc> <20181211102042.GT3581@gauss3.secunet.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Florian Westphal , netdev@vger.kernel.org To: Steffen Klassert Return-path: Received: from Chamillionaire.breakpoint.cc ([146.0.238.67]:43004 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727367AbeLLLxA (ORCPT ); Wed, 12 Dec 2018 06:53:00 -0500 Content-Disposition: inline In-Reply-To: <20181211102042.GT3581@gauss3.secunet.de> Sender: netdev-owner@vger.kernel.org List-ID: Steffen Klassert wrote: > > I can run a few IPSEC benchmark tests to see if there is measureable > > impact. > > That would be good, thanks! Will do this later today. One alternative would be to always allocate the entire maximum possible extension length when the first extension is to be added. In this case we could 'replace' secpath cache with a 'extension cache'. The only downside is the increase in allocation size. The upside is that it simplifies extension management -- no need to reallocate, only action needed on 'extension add' is a possible COW action. Allocated memory is left un-initialized aside from 8 byte metadata space. We could later move to on-demand/reallocation if the full allocation size would become too large in the future. I will have a look at 'allocate everything' too, unless someone tells me that this won't be acceptable (cost including future mptcp extension would be ~160 bytes or so).