From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.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 1580A1FAE for ; Fri, 4 Aug 2023 04:28:20 +0000 (UTC) Received: from out-82.mta0.migadu.com (out-82.mta0.migadu.com [IPv6:2001:41d0:1004:224b::52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 825BE4207 for ; Thu, 3 Aug 2023 21:28:18 -0700 (PDT) Message-ID: <9c0782dc-fdca-0d1c-cff4-ae1d6d719be8@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1691123297; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RbgBz/V1FEoSIgXNZpUefJzk9EepjHTLpSPYF/inviw=; b=VBGFNtfKWDJkAJ2SKUFiYOZh1haS80rSUi2y5XNqMSQZey40nygqXeA58PP85P37CaHihX LSXTA36qw/+YjWfW5UPZeU6vM0SReqMgwn7/i5DCWow8pjLQFcZQZM4cP4x/4UsufM8uhk 7tOZuRKCG8BRiB9czPaRkqG9qpRJGKs= Date: Thu, 3 Aug 2023 21:28:00 -0700 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-To: yonghong.song@linux.dev Subject: Re: [PATCH bpf-next v10 1/5] bpf: Add update_socket_protocol hook Content-Language: en-US To: Geliang Tang , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Florent Revest , Brendan Jackman , Matthieu Baerts , Mat Martineau , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , John Johansen , Paul Moore , James Morris , "Serge E. Hallyn" , Stephen Smalley , Eric Paris , Mykola Lysenko , Shuah Khan , Simon Horman Cc: bpf@vger.kernel.org, netdev@vger.kernel.org, mptcp@lists.linux.dev, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, selinux@vger.kernel.org, linux-kselftest@vger.kernel.org References: <079989b68ddded562b9f2149cc50642072575001.1691113640.git.geliang.tang@suse.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yonghong Song In-Reply-To: <079989b68ddded562b9f2149cc50642072575001.1691113640.git.geliang.tang@suse.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT 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, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net On 8/3/23 6:55 PM, Geliang Tang wrote: > Add a hook named update_socket_protocol in __sys_socket(), for bpf > progs to attach to and update socket protocol. One user case is to > force legacy TCP apps to create and use MPTCP sockets instead of > TCP ones. > > Define a mod_ret set named bpf_mptcp_fmodret_ids, add the hook > update_socket_protocol into this set, and register it in > bpf_mptcp_kfunc_init(). > > Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/79 > Acked-by: Matthieu Baerts > Signed-off-by: Geliang Tang Acked-by: Yonghong Song