Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2165827rdd; Fri, 12 Jan 2024 01:01:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IEtWQo0ImjMWxX89+SBPg7Ju9D+xzmguya9hJ3lst88vzJUHXIVxs2+7CwOM0yE2vycfmJr X-Received: by 2002:a05:6402:1b1a:b0:558:89a5:f5cb with SMTP id by26-20020a0564021b1a00b0055889a5f5cbmr473999edb.31.1705050115549; Fri, 12 Jan 2024 01:01:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705050115; cv=none; d=google.com; s=arc-20160816; b=fSdc0ON6idDhVDf7EmbrNictG4KjHSmjoFSQ2ECaVqi7G9Br8TFVguOI+tNUAbBILg SNSyTNDYw+13sTO2OHHSwwhHmsojyE3D9PW/h9m7UT6wEJ/HU7jl0PakX01QDNwRIaU3 GUVmQxf0wec3v6f7+UNckhPe77WS/1anDvHZHGlshQJEvcNLcbLuGrqd48eisUk0kKr+ 9UBtGhOSHBvKRrGS5Kkt0z0cTk9lLtkhUylb7uhYl8kssUYpXZoWsrfzI4svTZ4AGuDg gCQj0xMmVb5UoyG2FMFP2H71X/qdKWqCM9whDV6zbAh7R8n1CK7DX0iznxvenrVVtvYh f/hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:dkim-signature:date; bh=cYtWY9hDXkpJN3n4nxz2ZUDW4riO9eRN9qxUsjklYiE=; fh=3bUW+faxFEXVCLryxfjxm52dICSsgXeijN8+mV3crCk=; b=NboqOW8hyEKjvjrF93xE6A65CnR3TT6rozEnt3ZtLD11DpoW7sLKp8I2uR5thHplHc y18SeFGczCXE613XkrP8YCxnRQwL51IE27sbLMolONXCtw/rBoL7CRZjAPnDH3HnFF1k w2iK8VUmc5+MDaJVhBrdOJnE/LUiTSLOb+/gmsw2qNuP2AzWPw2+aQax2v1CCbngZ16m SdH5lif6kSxpYHDH/DOYbI3ozHdbYUkILQuHPdJ3I3GaXVbVOKvwCuoH5RLExKM3kmji 0/6wGsAX/espKOAuar1HfwOBQ0EO5aNdP7GlxXUtSnFiSruDtYm/k1C+0VmTB2YDntZ5 aMig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=CuzGRTsw; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-24443-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24443-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id fj5-20020a0564022b8500b0055864429c17si1220492edb.302.2024.01.12.01.01.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 01:01:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24443-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=CuzGRTsw; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-24443-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24443-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4C2CD1F23094 for ; Fri, 12 Jan 2024 09:01:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3AC085578E; Fri, 12 Jan 2024 09:01:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="CuzGRTsw"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="uhIVYCUR" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9FFB14F66; Fri, 12 Jan 2024 09:01:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Fri, 12 Jan 2024 10:01:40 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1705050102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cYtWY9hDXkpJN3n4nxz2ZUDW4riO9eRN9qxUsjklYiE=; b=CuzGRTswnalzZbMOffuEnmxQw7N8eG94OCB9DMMcd/yHLwwSkHiizA9uj2Wh8R7IDzbYRb 53+qCoZiqbpWFhBp3zRIOyD/Bq6YpVy39M2ssOHnCmQXwbGahKkb3/Nt0FLkul3VQCmnQ/ /arUdwpmpZGSLdkKkWGfvqfEA4HoF5EKrxv8Wjo/7haxNb9C8JEj6I6zt1S3LV37IA2a1L SKHaCMD35rJvUopI7dEKXmG8UV4ltjyOhYe/zZZ80SSJpcnGcETzYlO+Md7w9uH3c1a2Kx DU4iHR/q0u/rjRm5s29P7Ntq8h1apcEwhAX9k5oTqnmpgU2QiRD1ah65idA2gw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1705050102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cYtWY9hDXkpJN3n4nxz2ZUDW4riO9eRN9qxUsjklYiE=; b=uhIVYCURSTw9wJBjiY3yz2qpg2LnjrnOiCtlGBOUBjwOMmeyLS5bjCly/h4q2ivDmycAWV ExgLPgVwEai9cgBw== From: Sebastian Andrzej Siewior To: Paolo Abeni Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, "David S. Miller" , Boqun Feng , Daniel Borkmann , Eric Dumazet , Frederic Weisbecker , Ingo Molnar , Jakub Kicinski , Peter Zijlstra , Thomas Gleixner , Waiman Long , Will Deacon Subject: Re: [PATCH net-next 03/24] net: Use __napi_alloc_frag_align() instead of open coding it. Message-ID: <20240112090140.u5Lac1X9@linutronix.de> References: <20231215171020.687342-1-bigeasy@linutronix.de> <20231215171020.687342-4-bigeasy@linutronix.de> <9d4e1a18e6402f5476ebaaafd4a40a925daf19e6.camel@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <9d4e1a18e6402f5476ebaaafd4a40a925daf19e6.camel@redhat.com> On 2023-12-18 08:48:56 [+0100], Paolo Abeni wrote: > > diff --git a/net/core/skbuff.c b/net/core/skbuff.c > > index b157efea5dea8..de9397e45718a 100644 > > --- a/net/core/skbuff.c > > +++ b/net/core/skbuff.c > > @@ -311,11 +311,8 @@ void *__netdev_alloc_frag_align(unsigned int fragsz, unsigned int align_mask) > > > > data = page_frag_alloc_align(nc, fragsz, GFP_ATOMIC, align_mask); > > } else { > > - struct napi_alloc_cache *nc; > > - > > local_bh_disable(); > > - nc = this_cpu_ptr(&napi_alloc_cache); > > - data = page_frag_alloc_align(&nc->page, fragsz, GFP_ATOMIC, align_mask); > > There is a: > > fragsz = SKB_DATA_ALIGN(fragsz); > > statement just before the enclosing 'if'. I would consider moving such > assignment inside the 'then' branch - since __napi_alloc_frag_align() > already include that. Okay, moved. > /P Sebastian