From nobody Thu Apr 25 03:44:04 2024 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:ab0:590e:0:0:0:0:0 with SMTP id n14csp3115009uad; Tue, 2 Aug 2022 09:33:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR65awH/xisc6Y17y/PheueR2nsO8PR6EYI12R6GpIlRoV3peItajS1UpG9n2WAFG7A04SHA X-Received: by 2002:a17:90b:350d:b0:1f4:f6a5:a281 with SMTP id ls13-20020a17090b350d00b001f4f6a5a281mr282174pjb.99.1659458017030; Tue, 02 Aug 2022 09:33:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659458017; cv=none; d=google.com; s=arc-20160816; b=Ffxov4i2g746sROoA3B1LAFpTwzKMQ8NNP+zDH5Vbo9r0rgDgTNxTUE8yyLQjZI8Hw 7Qgjjh79he6VpzVDj6A3WFPlQTTPdg2HuFqV0tmhpyGdHhwyu4CvHfFI+brEMBva62AA 8Ow1llHyjf0hAwNmX6cAu83buNFCsh7OaeAqwM2EpGRLYejRY3pievaM9I4vIgaty35O vw80iMutToeZW3Z/xVuv2SBTfYEgv5lo0VUU3W95N259MZPFZ1XhAl+kui8ld7mzMszW bXbeFjS8VitRavF04yhN28lELNKx8JhYl4UGLUdJNOJHzKfgf2H9ywQaGm6ViHtL3iQu l6Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=7pKekS1GhNJAfY1UC8YYASQgdySzXvY2IcYhYTBowgs=; b=fA+allyyX0WRJOl1BlMpiyD+QWE3R+PImt/GkrUogN99l/sYEzfTsrc9U03q1jTmsA gqQO6Am7L1g1waHF8uqlluh1jX8HfjMlgXpjO2dQ/O3c0XMXeICuZmztcLNETaGKLg9d zlCv23RU4lGL4naFo0tOK2dSa5QFqm0KyKzwikdcHNJEysJf+VWUIK0YFQnMqm/iDQaN 1+dTmBk2ARLhxwq4Tp6igyw8aofAPeJvTEqL8dNj6BXamygm6m4v2nmHpEpDRZlWkusD ii9IOaLUDnUzlJqwwlgL0veG/iTGHa7M+A8bw6xT7kAsAGjhCRQCIsZKAiW84OeAtQj/ ED8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oDPTBe+M; spf=pass (google.com: domain of mptcp+bounces-6109-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="mptcp+bounces-6109-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w20-20020a63fb54000000b0041a861c0de9si15698008pgj.695.2022.08.02.09.33.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Aug 2022 09:33:37 -0700 (PDT) Received-SPF: pass (google.com: domain of mptcp+bounces-6109-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oDPTBe+M; spf=pass (google.com: domain of mptcp+bounces-6109-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="mptcp+bounces-6109-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 236B7280C0C for ; Tue, 2 Aug 2022 16:33:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 191EA33D8; Tue, 2 Aug 2022 16:33:35 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 90B907F for ; Tue, 2 Aug 2022 16:33:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0066C433D6; Tue, 2 Aug 2022 16:33:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659458013; bh=9N3wE1euIFQpNs8jo/gYfxXQBUH++c2IQ5TbhgHXCeU=; h=From:To:Cc:Subject:Date:From; b=oDPTBe+MceWArUC00FMqjt3yf/4oQkZhvb1YWY03qMiusvGtDBiFVXL39EghG2UWP jplRn+/rOIR44M06Z4PG7eOyUUdibVnak9B0n+EO2h6a7D9pvm0fcixrkHA4y8h8/Y LnUL4XGCoA4gFuxeoVZO2csg6WOBpluAJXjx7C0dX5hGxod/cwJISPbTe0/cOBjLuI CPJEgduvrOZ5Oy8gq9/ZtrzKZ/Bw1La7EEKYJcQK121vqbV9JspbX8n9pgbp+hnBzJ DZn1u/FMj1ExMP5GQU4p6IIRKgrjddGGkt8SLCvrWwwv0azQ54xu9Sqf34O/Wp2Z1p AG9PmEWixq7jA== From: Jiri Olsa To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Mat Martineau , Matthieu Baerts Cc: Martin KaFai Lau , bpf@vger.kernel.org, Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , mptcp@lists.linux.dev Subject: [PATCHv2 bpf-next] mptcp: Add struct mptcp_sock definition when CONFIG_MPTCP is disabled Date: Tue, 2 Aug 2022 18:33:24 +0200 Message-Id: <20220802163324.1873044-1-jolsa@kernel.org> X-Mailer: git-send-email 2.37.1 Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The btf_sock_ids array needs struct mptcp_sock BTF ID for the bpf_skc_to_mptcp_sock helper. When CONFIG_MPTCP is disabled, the 'struct mptcp_sock' is not defined and resolve_btfids will complain with: BTFIDS vmlinux WARN: resolve_btfids: unresolved symbol mptcp_sock Adding empty difinition for struct mptcp_sock when CONFIG_MPTCP is disabled. Acked-by: Martin KaFai Lau Signed-off-by: Jiri Olsa Reviewed-by: Mat Martineau --- include/net/mptcp.h | 4 ++++ 1 file changed, 4 insertions(+) v2 changes: - moved the new empty struct declaration next to the inline bpf_mptcp_sock_from_subflow function [Mat] diff --git a/include/net/mptcp.h b/include/net/mptcp.h index ac9cf7271d46..412479ebf5ad 100644 --- a/include/net/mptcp.h +++ b/include/net/mptcp.h @@ -291,4 +291,8 @@ struct mptcp_sock *bpf_mptcp_sock_from_subflow(struct s= ock *sk); static inline struct mptcp_sock *bpf_mptcp_sock_from_subflow(struct sock *= sk) { return NULL; } #endif =20 +#if !IS_ENABLED(CONFIG_MPTCP) +struct mptcp_sock { }; +#endif + #endif /* __NET_MPTCP_H */ --=20 2.37.1