From patchwork Tue Jan 7 15:29:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Lobakin X-Patchwork-Id: 13929179 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 387FB1F4276; Tue, 7 Jan 2025 15:31:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736263912; cv=none; b=Z4C2mtmeCsn3dbhapXQ07p8bsjLDsF+2kOHaD7u/HLXd5RTNWY4jBZbM9nZx9UJJaB3RzLw7dL9qBTeha7uleWGiyzlD48gIbF/xAkqfoQeBFXgXdxEetY8p+Ro64JJ0kiGs+VXaUyM96jESQuO715p5LihFRIxX1aNpBvQu1oo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736263912; c=relaxed/simple; bh=02kZtbtipIWVTWFg7jgWGOul0B8zGr6oxzoMcfkW5U4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eiQwle3aH5b6hB4Oi5gDkTfiecKH48/flxJ66UyU54KFli0WkkMt3/Va0OvfXWacviFsAfypEneElva9dZVuayJ0+UKTvUOFF044uAILc9jGZ4s5ywR7myWkybslAfiE6kbo3L+joyLnzdgWHY1vB/SaPFd4bpfuvC1EkgLMs5s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=APWW3StN; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="APWW3StN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736263909; x=1767799909; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=02kZtbtipIWVTWFg7jgWGOul0B8zGr6oxzoMcfkW5U4=; b=APWW3StNxbi49///Ry3zcuacxr76YSB0poC7/hrsCSTMVkP+/l14A4gb 3eRKO13K5e6jO6yWaMg4q4KMlnffYRazIk65+t76xcOnM9NZ4F71OXrSr Z0Q/bqk4I3cjHymdJoR7x5eDo8+JywkyJu9oFgqtgIjkdSbREtdeyQGON JRr6M7331lG7Mf/ku9CngLO2Dmc0bAAc0fiJOgV95+zbyoOeDccRtjrhe c1LiD4bjv1kvvA9jYHTud+kpMFQLhwYyv4qX8QG47lWu5ZEzprDAqNjHY Z51qtbXlyBqZQK5WH2z37heLSHlSylu41WgbTsNKfTi/oKvl4qUZfPm8J Q==; X-CSE-ConnectionGUID: FfyrkbRuQKS59eTBliu3UA== X-CSE-MsgGUID: 8B3XdXEqRDKN7D3abgyclw== X-IronPort-AV: E=McAfee;i="6700,10204,11308"; a="35685915" X-IronPort-AV: E=Sophos;i="6.12,295,1728975600"; d="scan'208";a="35685915" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2025 07:31:39 -0800 X-CSE-ConnectionGUID: Q6Imvzp/TniSvLBViwAYpw== X-CSE-MsgGUID: n+pHpbs5S5+aC992Y7kejw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="103646975" Received: from newjersey.igk.intel.com ([10.102.20.203]) by orviesa008.jf.intel.com with ESMTP; 07 Jan 2025 07:31:35 -0800 From: Alexander Lobakin To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Alexander Lobakin , Lorenzo Bianconi , Daniel Xu , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , John Fastabend , =?utf-8?q?Toke_H=C3=B8iland-J?= =?utf-8?q?=C3=B8rgensen?= , Jesper Dangaard Brouer , Martin KaFai Lau , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v2 8/8] xdp: remove xdp_alloc_skb_bulk() Date: Tue, 7 Jan 2025 16:29:40 +0100 Message-ID: <20250107152940.26530-9-aleksander.lobakin@intel.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250107152940.26530-1-aleksander.lobakin@intel.com> References: <20250107152940.26530-1-aleksander.lobakin@intel.com> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org The only user was veth, which now uses napi_skb_cache_get_bulk(). It's now preferred over a direct allocation and is exported as well, so remove this one. Signed-off-by: Alexander Lobakin --- include/net/xdp.h | 1 - net/core/xdp.c | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/include/net/xdp.h b/include/net/xdp.h index 6da0e746cf75..e2f83819405b 100644 --- a/include/net/xdp.h +++ b/include/net/xdp.h @@ -344,7 +344,6 @@ struct sk_buff *__xdp_build_skb_from_frame(struct xdp_frame *xdpf, struct net_device *dev); struct sk_buff *xdp_build_skb_from_frame(struct xdp_frame *xdpf, struct net_device *dev); -int xdp_alloc_skb_bulk(void **skbs, int n_skb, gfp_t gfp); struct xdp_frame *xdpf_clone(struct xdp_frame *xdpf); static inline diff --git a/net/core/xdp.c b/net/core/xdp.c index 67b53fc7191e..eb8762ff16cb 100644 --- a/net/core/xdp.c +++ b/net/core/xdp.c @@ -619,16 +619,6 @@ void xdp_warn(const char *msg, const char *func, const int line) }; EXPORT_SYMBOL_GPL(xdp_warn); -int xdp_alloc_skb_bulk(void **skbs, int n_skb, gfp_t gfp) -{ - n_skb = kmem_cache_alloc_bulk(net_hotdata.skbuff_cache, gfp, n_skb, skbs); - if (unlikely(!n_skb)) - return -ENOMEM; - - return 0; -} -EXPORT_SYMBOL_GPL(xdp_alloc_skb_bulk); - /** * xdp_build_skb_from_buff - create an skb from &xdp_buff * @xdp: &xdp_buff to convert to an skb