BPF List
 help / color / mirror / Atom feed
From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Geliang Tang <geliangtang@gmail.com>,
	Martin KaFai Lau <kafai@fb.com>,
	Geliang Tang <geliang.tang@suse.com>,
	Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	MPTCP Upstream <mptcp@lists.linux.dev>,
	Nicolas Rybowski <nicolas.rybowski@tessares.net>,
	Matthieu Baerts <matthieu.baerts@tessares.net>
Subject: Re: [PATCH bpf-next v4 1/7] bpf: add bpf_skc_to_mptcp_sock_proto
Date: Wed, 18 May 2022 17:38:43 -0700 (PDT)	[thread overview]
Message-ID: <cb2c23b0-a41a-bbf6-1440-69bbc58f8e8b@linux.intel.com> (raw)
In-Reply-To: <CAADnVQJ8V-B0GvOsQg1m37ij2nGJbzemB9p46o1PG4VSnf0kSg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]

On Tue, 17 May 2022, Alexei Starovoitov wrote:

> On Mon, May 16, 2022 at 10:26 PM Geliang Tang <geliangtang@gmail.com> wrote:
>>
>> Martin KaFai Lau <kafai@fb.com> 于2022年5月17日周二 09:07写道:
>>>
>>> On Fri, May 13, 2022 at 03:48:21PM -0700, Mat Martineau wrote:
>>> [ ... ]
>>>
>>>> diff --git a/include/net/mptcp.h b/include/net/mptcp.h
>>>> index 8b1afd6f5cc4..2ba09de955c7 100644
>>>> --- a/include/net/mptcp.h
>>>> +++ b/include/net/mptcp.h
>>>> @@ -284,4 +284,10 @@ static inline int mptcpv6_init(void) { return 0; }
>>>>  static inline void mptcpv6_handle_mapped(struct sock *sk, bool mapped) { }
>>>>  #endif
>>>>
>>>> +#if defined(CONFIG_MPTCP) && defined(CONFIG_BPF_SYSCALL)
>>>> +struct mptcp_sock *bpf_mptcp_sock_from_subflow(struct sock *sk);
>>> Can this be inline ?
>>
>> This function can't be inline since it uses struct mptcp_subflow_context.
>>
>> mptcp_subflow_context is defined in net/mptcp/protocol.h, and we don't
>> want to export it to user space in net/mptcp/protocol.h.
>
> The above function can be made static inline in a header file.
> That doesn't automatically expose it to user space.
>

True, it's not a question of userspace exposure. But making this one 
function inline involves a bunch of churn in the (non-BPF) mptcp headers 
that I'd rather avoid. The definitions in protocol.h are there because 
they aren't relevant outside of the mptcp subsystem code.

Does making this one function inline benefit BPF, specifically, in a 
meaningful way? If not, I'd like to leave it as-is.

--
Mat Martineau
Intel

  reply	other threads:[~2022-05-19  0:38 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 22:48 [PATCH bpf-next v4 0/7] bpf: mptcp: Support for mptcp_sock Mat Martineau
2022-05-13 22:48 ` [PATCH bpf-next v4 1/7] bpf: add bpf_skc_to_mptcp_sock_proto Mat Martineau
2022-05-17  1:07   ` Martin KaFai Lau
2022-05-17  5:26     ` Geliang Tang
2022-05-17 17:00       ` Alexei Starovoitov
2022-05-19  0:38         ` Mat Martineau [this message]
2022-05-19 17:58           ` Martin KaFai Lau
2022-05-13 22:48 ` [PATCH bpf-next v4 2/7] selftests/bpf: Enable CONFIG_IKCONFIG_PROC in config Mat Martineau
2022-05-13 22:48 ` [PATCH bpf-next v4 3/7] selftests/bpf: add MPTCP test base Mat Martineau
2022-05-16 22:43   ` Andrii Nakryiko
2022-05-17  5:30     ` Geliang Tang
2022-05-17  1:18   ` Martin KaFai Lau
2022-05-17  5:28     ` Geliang Tang
2022-05-13 22:48 ` [PATCH bpf-next v4 4/7] selftests/bpf: test bpf_skc_to_mptcp_sock Mat Martineau
2022-05-13 23:53   ` Geliang Tang
2022-05-16 22:47   ` Andrii Nakryiko
2022-05-17  1:20   ` Martin KaFai Lau
2022-05-17  5:29     ` Geliang Tang
2022-05-13 22:48 ` [PATCH bpf-next v4 5/7] selftests/bpf: verify token of struct mptcp_sock Mat Martineau
2022-05-16 22:45   ` Andrii Nakryiko
2022-05-17  1:32   ` Martin KaFai Lau
2022-05-17  5:19     ` Geliang Tang
2022-05-17 21:30       ` Martin KaFai Lau
2022-05-13 22:48 ` [PATCH bpf-next v4 6/7] selftests/bpf: verify ca_name " Mat Martineau
2022-05-13 22:48 ` [PATCH bpf-next v4 7/7] selftests/bpf: verify first " Mat Martineau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb2c23b0-a41a-bbf6-1440-69bbc58f8e8b@linux.intel.com \
    --to=mathew.j.martineau@linux.intel.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=geliang.tang@suse.com \
    --cc=geliangtang@gmail.com \
    --cc=kafai@fb.com \
    --cc=matthieu.baerts@tessares.net \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.rybowski@tessares.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox