Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2978378rdb; Mon, 4 Dec 2023 12:57:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEThkWYcrsTIu9P+SgkB0C/Do9Zza7XdE3n6O684YfRZskCA7sAogBdT9GqQC/6cQyP/efe X-Received: by 2002:a17:90b:4f41:b0:286:9cc1:a10 with SMTP id pj1-20020a17090b4f4100b002869cc10a10mr212099pjb.8.1701723429145; Mon, 04 Dec 2023 12:57:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701723429; cv=none; d=google.com; s=arc-20160816; b=R+dEMXvvgE6eAynkx74RrC50I4qQdIatOU7Fp1Ghfb3VKCXeC83AUogFm98zfOqN/1 bw9wLtrdO1JcKUQRM7Yf789A2TaL/XfdnWAROoiu0xfzYwZd7dhkwcA37cPYc3sK/4ki mVom0ovx1P5A+n78b/v2TpuqIVuJzQyQ8QXrT3LwuK+/F/UrAsFX3Q101IeOkM2ii9Yj V/vy5AHZH88eS8PcbriUeh/C1IhHiNd9N8Tj6ir+eBCKClYSaB3bUNdJvTUA6XN/jJob 5RRS7KwBT3T92l9lzCiv0x4s5geVJaDZeR3BzoQb8PoD6kbZdRYDQzHKAcnmV19J3Tl7 CHag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=ODyk+ttANQamRuubWNRCDO8I/D2JxBDiCAh0nttU7d0=; fh=JT3DbXCycnDgjng2egvIc916cuzoOMwYuenI3anQzBw=; b=gVSuQtFQLe7mIVpl7cAd8vhZvGrYoZhdmAmEWSA0/UH5HLJRUlOv4o2axkDlaNwtGQ s90lMKZfebIGwN6EtnOn6VaNBuwDnKMPQkfFfIV5hIuwGSmHeZjKC7IfNcrRyR5NO901 n6kudbVn5IjSx3K0gAsPhlBkEOp9/6Cc08tpaVXd5kaCfv5xW2gehGvYUhokoljPZWGB OVpSClpGQQ4xt96iEUB7yTjI2QxJiZ9+VUcVsXig+LJygjgMDlfKXj2CZl8XxUh18IZj YzMirRDJd701Ejk1dfXb7nIalke4Er2QhMc1yaY1B257ioQZGLX+EJ8Zu4wMjrQxt6bT jtKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm3 header.b=r4oVnJbK; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=0epMzhcX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id ce9-20020a17090aff0900b00286b48a6226si2087038pjb.89.2023.12.04.12.57.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 12:57:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm3 header.b=r4oVnJbK; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=0epMzhcX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3C3AD80ADF38; Mon, 4 Dec 2023 12:57:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233697AbjLDU45 (ORCPT + 99 others); Mon, 4 Dec 2023 15:56:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233753AbjLDU4w (ORCPT ); Mon, 4 Dec 2023 15:56:52 -0500 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B965C109; Mon, 4 Dec 2023 12:56:55 -0800 (PST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id DB9615C022F; Mon, 4 Dec 2023 15:56:54 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 04 Dec 2023 15:56:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dxuuu.xyz; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1701723414; x= 1701809814; bh=ODyk+ttANQamRuubWNRCDO8I/D2JxBDiCAh0nttU7d0=; b=r 4oVnJbKuvQFHQYEX8R56ZVtXrlkgzIKKVAXWi8AlDWZHZKFL8p/mnFE5y5wV+eK+ 9lOOSI2esM4aFE0BbGS+7tnSOFL+m4vzr8yDkEMwTSD2pPfCEVIpYPlT9ziUuffn AHS8Ww/tjVQFKDK7/+WCPd9NT/sVUjbECVwj6yFz5F7+DDNVHBK0ozgNQ1b8UXD7 HfqcPnc7d0/60iP1zeAHUz15pZSzCg0qDt6ChLSwMzsWqsWLQbafj5MZi/4d+U9M QRPeT4rc6NUiahJWVStSkybkfJTxRFH8iu27phHt1pKSxOr3z9YqslbyUFFZ2jjT Fprwp2xUClTWgZg2SqHvQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1701723414; x= 1701809814; bh=ODyk+ttANQamRuubWNRCDO8I/D2JxBDiCAh0nttU7d0=; b=0 epMzhcXlEAJh9hIhfZQNfzrbBwP6o7+vnL+hC48PCUaQtGZI2fOrXx/8caIwa5wq htQ/sixbVUcrurbCJzWkg9TxH7N/3+9CQ0eK3LIDRTlO4CdjM9kQDTzzNgULXWwx M/DiIVflIr3aKq2z8cQzheaYTDb9wVzOKr9qWw5VdbGItrnQnekMKpMbOqOUtpk5 ueNwd33L0Fwj40BKvK6X5TT2/uw07ldQO2fs86DAt9mavAqB0CAeoPPnGcQUPGTe 5vL4nb14Kp7jOvdr0dcwiIRMxmjO4u0asiV0FyIxCAGO0Z5rfl91H/fXU9U3Ie38 VZSe4IM+U6iZECSED1QdQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudejiedgudeggecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdejtddmnecujfgurhephffvvefufffkofgjfhgggfestdekredt redttdenucfhrhhomhepffgrnhhivghlucgiuhcuoegugihusegugihuuhhurdighiiiqe enucggtffrrghtthgvrhhnpefgfefggeejhfduieekvdeuteffleeifeeuvdfhheejleej jeekgfffgefhtddtteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegugihusegugihuuhhurdighiii X-ME-Proxy: Feedback-ID: i6a694271:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 4 Dec 2023 15:56:52 -0500 (EST) From: Daniel Xu To: davem@davemloft.net, Herbert Xu , steffen.klassert@secunet.com, pabeni@redhat.com, kuba@kernel.org, edumazet@google.com, antony.antony@secunet.com, alexei.starovoitov@gmail.com, yonghong.song@linux.dev, eddyz87@gmail.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, devel@linux-ipsec.org Subject: [PATCH bpf-next v4 01/10] xfrm: bpf: Move xfrm_interface_bpf.c to xfrm_bpf.c Date: Mon, 4 Dec 2023 13:56:21 -0700 Message-ID: X-Mailer: git-send-email 2.42.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 04 Dec 2023 12:57:08 -0800 (PST) This commit moves the contents of xfrm_interface_bpf.c into a new file, xfrm_bpf.c This is in preparation for adding more xfrm kfuncs. We'd like to keep all the bpf integrations in a single file. Signed-off-by: Daniel Xu --- net/xfrm/Makefile | 7 +------ net/xfrm/{xfrm_interface_bpf.c => xfrm_bpf.c} | 12 ++++++++---- 2 files changed, 9 insertions(+), 10 deletions(-) rename net/xfrm/{xfrm_interface_bpf.c => xfrm_bpf.c} (88%) diff --git a/net/xfrm/Makefile b/net/xfrm/Makefile index cd47f88921f5..29fff452280d 100644 --- a/net/xfrm/Makefile +++ b/net/xfrm/Makefile @@ -5,12 +5,6 @@ xfrm_interface-$(CONFIG_XFRM_INTERFACE) += xfrm_interface_core.o -ifeq ($(CONFIG_XFRM_INTERFACE),m) -xfrm_interface-$(CONFIG_DEBUG_INFO_BTF_MODULES) += xfrm_interface_bpf.o -else ifeq ($(CONFIG_XFRM_INTERFACE),y) -xfrm_interface-$(CONFIG_DEBUG_INFO_BTF) += xfrm_interface_bpf.o -endif - obj-$(CONFIG_XFRM) := xfrm_policy.o xfrm_state.o xfrm_hash.o \ xfrm_input.o xfrm_output.o \ xfrm_sysctl.o xfrm_replay.o xfrm_device.o @@ -21,3 +15,4 @@ obj-$(CONFIG_XFRM_USER_COMPAT) += xfrm_compat.o obj-$(CONFIG_XFRM_IPCOMP) += xfrm_ipcomp.o obj-$(CONFIG_XFRM_INTERFACE) += xfrm_interface.o obj-$(CONFIG_XFRM_ESPINTCP) += espintcp.o +obj-$(CONFIG_DEBUG_INFO_BTF) += xfrm_bpf.o diff --git a/net/xfrm/xfrm_interface_bpf.c b/net/xfrm/xfrm_bpf.c similarity index 88% rename from net/xfrm/xfrm_interface_bpf.c rename to net/xfrm/xfrm_bpf.c index 7d5e920141e9..3d3018b87f96 100644 --- a/net/xfrm/xfrm_interface_bpf.c +++ b/net/xfrm/xfrm_bpf.c @@ -1,9 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-only -/* Unstable XFRM Helpers for TC-BPF hook +/* Unstable XFRM BPF helpers. * - * These are called from SCHED_CLS BPF programs. Note that it is - * allowed to break compatibility for these functions since the interface they - * are exposed through to BPF programs is explicitly unstable. + * Note that it is allowed to break compatibility for these functions since the + * interface they are exposed through to BPF programs is explicitly unstable. */ #include @@ -12,6 +11,9 @@ #include #include +#if IS_BUILTIN(CONFIG_XFRM_INTERFACE) || \ + (IS_MODULE(CONFIG_XFRM_INTERFACE) && IS_ENABLED(CONFIG_DEBUG_INFO_BTF_MODULES)) + /* bpf_xfrm_info - XFRM metadata information * * Members: @@ -108,3 +110,5 @@ int __init register_xfrm_interface_bpf(void) return register_btf_kfunc_id_set(BPF_PROG_TYPE_SCHED_CLS, &xfrm_interface_kfunc_set); } + +#endif /* xfrm interface */ -- 2.42.1