From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Westphal Subject: Re: [net-next, RFC, 4/8] net: core: add recycle capabilities on skbs via page_pool API Date: Sat, 8 Dec 2018 10:57:58 +0100 Message-ID: <20181208095758.GA32028@strlen.de> References: <154413874729.21735.10644578158550468689.stgit@firesoul> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, "David S. Miller" , Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= , ard.biesheuvel@linaro.org, Jason Wang , ilias.apalodimas@linaro.org, =?iso-8859-1?Q?Bj=F6rnT=F6pel?= , w@1wt.eu, Saeed Mahameed , mykyta.iziumtsev@gmail.com, Daniel Borkmann , Alexei Starovoitov , Tariq Toukan To: Jesper Dangaard Brouer Return-path: Received: from Chamillionaire.breakpoint.cc ([146.0.238.67]:51396 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726099AbeLHJ62 (ORCPT ); Sat, 8 Dec 2018 04:58:28 -0500 Content-Disposition: inline In-Reply-To: <154413874729.21735.10644578158550468689.stgit@firesoul> Sender: netdev-owner@vger.kernel.org List-ID: Jesper Dangaard Brouer wrote: > From: Ilias Apalodimas > > This patch is changing struct sk_buff, and is thus per-definition > controversial. > > Place a new member 'mem_info' of type struct xdp_mem_info, just after > members (flags) head_frag and pfmemalloc, And not in between > headers_start/end to ensure skb_copy() and pskb_copy() work as-is. > Copying mem_info during skb_clone() is required. This makes sure that > pages are correctly freed or recycled during the altered > skb_free_head() invocation. I read this to mean that this 'info' isn't accessed/needed until skb is freed. Any reason its not added at the end? This would avoid moving other fields that are probably accessed more frequently during processing.