From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [net-next, RFC, 4/8] net: core: add recycle capabilities on skbs via page_pool API Date: Sat, 8 Dec 2018 04:29:17 -0800 Message-ID: <72f33f12-9222-cbe7-6ff2-e4b4f86fb17c@gmail.com> References: <154413874729.21735.10644578158550468689.stgit@firesoul> <20181208095758.GA32028@strlen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, "David S. Miller" , =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , ard.biesheuvel@linaro.org, Jason Wang , ilias.apalodimas@linaro.org, =?UTF-8?B?QmrDtnJuVMO2cGVs?= , w@1wt.eu, Saeed Mahameed , mykyta.iziumtsev@gmail.com, Daniel Borkmann , Alexei Starovoitov , Tariq Toukan To: Florian Westphal , Jesper Dangaard Brouer Return-path: Received: from mail-pf1-f178.google.com ([209.85.210.178]:39752 "EHLO mail-pf1-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbeLHM3V (ORCPT ); Sat, 8 Dec 2018 07:29:21 -0500 Received: by mail-pf1-f178.google.com with SMTP id c72so3211116pfc.6 for ; Sat, 08 Dec 2018 04:29:20 -0800 (PST) In-Reply-To: <20181208095758.GA32028@strlen.de> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 12/08/2018 01:57 AM, Florian Westphal wrote: > 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. > But I do not get why the patch is needed. Adding extra cost for each skb destruction is costly. I though XDP was all about _not_ having skbs. Please let's do not slow down the non XDP stack only to make XDP more appealing.