Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6427rdb; Mon, 4 Dec 2023 17:59:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IGYF0dRsKttiN7sOYTR+bimNgFoAVotHj11UEU7jRkCd3FjQPJ9uXmrbvllalgbCCkzZEWR X-Received: by 2002:a05:6a20:4303:b0:18f:4779:6781 with SMTP id h3-20020a056a20430300b0018f47796781mr3867334pzk.105.1701741554159; Mon, 04 Dec 2023 17:59:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701741554; cv=none; d=google.com; s=arc-20160816; b=oVQmQEtY7SKyjZ3rXxcPu7iy1bYiETpS23d0sOJLXwAlp0MUfBJISSjPJcSDi+la6e 4zBSjZqv34Vc43ZMfusK704WgpLMnKeGDOL2uD3lasX9TeYrZDe8+sLC/mgkqrdVMA/V JhMS2srCFsvpY0Da9oUIwOG1yMnw4+ljrzrID2ql7ELp7XiI5IErfXFOU908R0b3lZ+N mfgz6BapdCzvFy+stEPSWqYKOihGbRGgEWgXAzEcHnnyILqS6izIXQnJJn4vLPlL9/zM /RaCsfLKTV9Y8EluKj+5M4dsFcXmL432mg+H2jJQ1I/Cjd6ZDYc/hwkLiNO7A//GPu3W h2qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=fDBKOw3s0R/x34Gl0DdYfEHhp4k1EOz2IyOuhxx/RDw=; fh=eFMLoAro5SE++E9wRcSzM7oGgxOHpuRqwM45ltEk11A=; b=WTEMiZqFiFKQ9sDbMParUDxzIU1dYD8LOWNQA1Le1RB0nQARXKNEkcPv0G1CQRTb8S lWJOsmNsVUHKIG8oLTrgRLOGtb9hc4bM9V70FGhSZ3T+CUlBmOR6n6v1BwTW5jOmvUN2 zwpS1zWJlx5g20DQnt2XGDMipfoiv+DcI4KRzfcdS7lHKrGRYAIwdC4JyljVPSsbUJ7D +qcRgE5Tb5CnR9NcMhm5R5pIRYYqSdCl9kQl5lfrsXHOulRiaYbyV/58PJ52kcI8Cd3G 75ubweyKjAxLrrEJRgKy0C2C46bHr0k/irmzYVeZmtD96/s+Bel8F9mon0qMNC66/T6u Qtsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=L08xTNSk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id c2-20020a631c42000000b005bd641c3614si8523515pgm.769.2023.12.04.17.59.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 17:59:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=L08xTNSk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D579780B1D3D; Mon, 4 Dec 2023 17:59:12 -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 S231627AbjLEB7D (ORCPT + 99 others); Mon, 4 Dec 2023 20:59:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229575AbjLEB7C (ORCPT ); Mon, 4 Dec 2023 20:59:02 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B495B4; Mon, 4 Dec 2023 17:59:08 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40c0fc1cf3dso6016395e9.0; Mon, 04 Dec 2023 17:59:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701741547; x=1702346347; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fDBKOw3s0R/x34Gl0DdYfEHhp4k1EOz2IyOuhxx/RDw=; b=L08xTNSk5eQU3t+7yuY8dwHJdDqcp5qOVAX9qAPdQOSwnMydAxATTumbVZFOd1LZpk r02QCDg1fTg1Df6oenFxYMTCgt7XJGwkCZPG7FSF/YMHRioeDLY2Ki0N/5Vju9iERrIE xzZq7GI749vs977WligIkSl9yzhFPi7ZFgaJL6WaxGK7al7ZaNEIn5tc11ZLsIgkAQdP YAIRZhwXsfH46ls8en6WagtJChHaClBOO7PQXiqyAWQ5zmof17sXgXqRRRoNi5ZHevqq w/56GAH+2kjIYj1DNYaq8Rl9wnUngWNMdQzTKagxr0a1e00PNOlXGL/Vg6viuwhnvqOv N/vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701741547; x=1702346347; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fDBKOw3s0R/x34Gl0DdYfEHhp4k1EOz2IyOuhxx/RDw=; b=HJVpVMBTspDPqLc2iozaFr23k9CsV4CMgIEGZsrNBTq3IroTKnEwCjK0iNl2Gj0Lo8 i8/czbeFjtwjo35g+ri/FEAWsThaK/jfXHvws2jeuMUUZCPwnjaMsqETsPkcD7lYUIIq 4KePO3CnMMkWkj/OmG7JEOScyLz2f5Q+QdFfNVavhNdXCQ5pxzUXO1mQjdsAzoq/hqNR kh4WKhnMM4hyS6VCbF/a5c72K+C5Pnmx8oSQNxxjd6jHyHYSxhG/CTQHAV8RQfNIDEOW bn5PRegh+ul4SFWIxKg3JV88N9OsX+w+cYsC7+JB/ta9l/1beZji/HTTtO01Ob92Fc5U 3b5Q== X-Gm-Message-State: AOJu0YyjWSKQgzs+qGx8XSzjGD0ezxrWl7kz0fgNwMf9hUXTAJoyx3Wl MnZwB11yxWjOGEXgio9kRejknr1I79ajWlUg8gI= X-Received: by 2002:a05:600c:444a:b0:40b:5e21:d36f with SMTP id v10-20020a05600c444a00b0040b5e21d36fmr31135wmn.120.1701741546663; Mon, 04 Dec 2023 17:59:06 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Alexei Starovoitov Date: Mon, 4 Dec 2023 17:58:55 -0800 Message-ID: Subject: Re: [PATCH bpf-next v4 01/10] xfrm: bpf: Move xfrm_interface_bpf.c to xfrm_bpf.c To: Daniel Xu Cc: "David S. Miller" , Herbert Xu , Steffen Klassert , Paolo Abeni , Jakub Kicinski , Eric Dumazet , antony.antony@secunet.com, Yonghong Song , Eddy Z , Network Development , LKML , bpf , devel@linux-ipsec.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,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 17:59:13 -0800 (PST) On Mon, Dec 4, 2023 at 12:56=E2=80=AFPM Daniel Xu wrote: > > 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 =3D> xfrm_bpf.c} | 12 ++++++++---- > 2 files changed, 9 insertions(+), 10 deletions(-) > rename net/xfrm/{xfrm_interface_bpf.c =3D> 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) +=3D xfrm_interface_core.o > > -ifeq ($(CONFIG_XFRM_INTERFACE),m) > -xfrm_interface-$(CONFIG_DEBUG_INFO_BTF_MODULES) +=3D xfrm_interface_bpf.= o > -else ifeq ($(CONFIG_XFRM_INTERFACE),y) > -xfrm_interface-$(CONFIG_DEBUG_INFO_BTF) +=3D xfrm_interface_bpf.o > -endif > - > obj-$(CONFIG_XFRM) :=3D 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) +=3D xfrm_compat.o > obj-$(CONFIG_XFRM_IPCOMP) +=3D xfrm_ipcomp.o > obj-$(CONFIG_XFRM_INTERFACE) +=3D xfrm_interface.o > obj-$(CONFIG_XFRM_ESPINTCP) +=3D espintcp.o > +obj-$(CONFIG_DEBUG_INFO_BTF) +=3D xfrm_bpf.o ... > +#if IS_BUILTIN(CONFIG_XFRM_INTERFACE) || \ > + (IS_MODULE(CONFIG_XFRM_INTERFACE) && IS_ENABLED(CONFIG_DEBUG_INFO_BT= F_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 */ imo the original approach was cleaner. #ifdefs in .c should be avoided when possible. But I'm not going to insist. ipsec folks please ack the first 3 patches.