Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp331787lqo; Wed, 8 May 2024 00:37:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWvMHm3VYjTLlrDqQJ1S5eF1H1KvaoXoXisH830yJqn52Gz9eeDlqo+nZM0Eu0oiAWDv7bIV4YVPHBKpGAdDCMq7ov648dsFBxgIu4qtA== X-Google-Smtp-Source: AGHT+IH4GjchoBS0XVUg8dDf1SMXe1D2TbtnfF38UsFrl9BwvAkV8+MdnpQg+5XdJC3nJvFaNcBg X-Received: by 2002:a05:620a:2990:b0:78e:eb70:c7aa with SMTP id af79cd13be357-792b282902bmr230144985a.56.1715153834091; Wed, 08 May 2024 00:37:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715153834; cv=pass; d=google.com; s=arc-20160816; b=AhjMD5PXF0V3K0BqCCA3DidqU4q05bUY0rFb2kSTc+DpLZefHJSa8Z+4wsqS6xeH9E EhBOPXkYqVVekkMLhKPq/e6He+cprJc4JGj4+uTGLL+qO0YaysJ+GXDCGndbZBH3AJpO d4GUe0W98yN3WuxN56GU896zUd7GUbW9tdp5ZaHDV1UN91jZnpkUJd+c/RqJxvIwjqaH F4Ld04q28Tv+MLnfay3Mrx7cuOV9ENcplloyjVWXmlsfb6Wj/Ef6g4JbJwI3lfLEhe/I BHEaU++4u+VK679LsMqzu1yzSEK3GaL1z4TI1dlzhxdoAQEiz6NN1sLhRKBQ+WZwuM55 YOwA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt:from :references:cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=Z10+F+18xYXqKDguo2M0z0DQU1ejbp6BgapDeVSvbfQ=; fh=Phk3TTgFNdd1N32B4Yv01TsQSBeYc8VMoFRK5Qit3kM=; b=VPGRnGD/Gla2Oqonf2ZRGu4MG0yPPp2DejYljcvGAcvLwXZMQo7lUSqITNzkjXDeB6 U9mDqiS7u7LxxYs8OlzwKApvPpvtT+DNCemTR33OcGP/fPMXULev1AEDoKJGFnRwE9mL zLbtYPLQ/Wx5K+q24Vc3Cf8KGWqwWvplo9EP+WopmsGLf7tPZ8LYUhFguMN6Yoi7b6ke zA+xqAxXlv4JrFZ+gsX+9E2++dzCxII8qHetErTJG2gc7iB17boSl8H75zmnnK+gbkAY XqHOGqsk/EUpZDbu6GM9WfcXGzyU1cYvU6g8ctBTNkHIz+5EKn+dAFQLZT6IioO0f1E5 FuJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vMrBsgr5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-172818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172818-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id pa26-20020a05620a831a00b0079293cee1e0si6974020qkn.773.2024.05.08.00.37.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 00:37:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vMrBsgr5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-172818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172818-linux.lists.archive=gmail.com@vger.kernel.org"; 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E3FC01C228C1 for ; Wed, 8 May 2024 07:37:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AB373DB97; Wed, 8 May 2024 07:36:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vMrBsgr5" 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 676DE3B298; Wed, 8 May 2024 07:36:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715153789; cv=none; b=EGqcGGM/g8DueLiwaWqHOJoGDjg2bPRgPKoWpQ6uo1wDVyS0KksbrJTSLilG9JUUpqrGatnhOL2vEdIOfP25TuklN2VfXfD8HDhOdJUSosFO1IfAEhHxzN6eiIlR/Qn1pseCAr68LP66kTcUZkXBv214mQ/iEBuf+7lOjDXaa6w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715153789; c=relaxed/simple; bh=uSc6/F8e+7rFoVsQ6llcJbirZ3srNGLSdVcX9PY6dFw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Nl7S56goMjkuyQxjZvgHqzbkNOacTbzjtZ7FK2UqQsIPWIawpKVqQG/p1XEi7RyAtyh7gVPf3LGgmcB1gEItNhFM1LLdLlPTTf4xs9qh++41W55EIDFrAyzAt8bIBoprQwzX6/g0dJaWbhGPv2q8Xa6s+UfxfynZO4fv7pPzWOs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vMrBsgr5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63B71C4AF17; Wed, 8 May 2024 07:36:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715153789; bh=uSc6/F8e+7rFoVsQ6llcJbirZ3srNGLSdVcX9PY6dFw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=vMrBsgr5Ntv8vEb5Wf0oFCiz716SpRC1/cH+4HxjtkIgjPFEIAT43XIMOJiyFEV8r 5H3aIdkSo4cG1A5cHNsAzsntRKz5oaV4iZ7eD7oZsqbWz0Npd0LXE2iDgI8Kc/O71A uGaMvrdpY48GXT9ITcCqJuv8BdiS0ZOJLUMnp5Bv6oI1zSQDEeT2dWiASpMknsfdkw ZSgJ6AMgjRs18bCuHCg1cqauasvhGhEcFfHzZuxI92+qOUG3Tmn7Z0uQO8LNkZvmib YApL6r57WmT3/skOS8opW6JZr8b6BOZMNMWYerEB/XEGaClFz0mNAnyI72JwssSeQv N2GtCx40jfi/w== Message-ID: <42d0718f-296d-48ca-a21a-b4708e9bd6e9@kernel.org> Date: Wed, 8 May 2024 09:36:18 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH bpf-next 3/4] selftests/bpf: Add mptcp subflow example Content-Language: en-GB To: Alexei Starovoitov Cc: MPTCP Upstream , Mat Martineau , Geliang Tang , Andrii Nakryiko , Eduard Zingerman , Mykola Lysenko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan , LKML , Network Development , bpf , "open list:KERNEL SELFTEST FRAMEWORK" , Geliang Tang References: <20240507-upstream-bpf-next-20240506-mptcp-subflow-test-v1-0-e2bcbdf49857@kernel.org> <20240507-upstream-bpf-next-20240506-mptcp-subflow-test-v1-3-e2bcbdf49857@kernel.org> <843ea6eb-a28d-437c-9c98-0b8c8816c518@kernel.org> From: Matthieu Baerts Autocrypt: addr=matttbe@kernel.org; keydata= xsFNBFXj+ekBEADxVr99p2guPcqHFeI/JcFxls6KibzyZD5TQTyfuYlzEp7C7A9swoK5iCvf YBNdx5Xl74NLSgx6y/1NiMQGuKeu+2BmtnkiGxBNanfXcnl4L4Lzz+iXBvvbtCbynnnqDDqU c7SPFMpMesgpcu1xFt0F6bcxE+0ojRtSCZ5HDElKlHJNYtD1uwY4UYVGWUGCF/+cY1YLmtfb WdNb/SFo+Mp0HItfBC12qtDIXYvbfNUGVnA5jXeWMEyYhSNktLnpDL2gBUCsdbkov5VjiOX7 CRTkX0UgNWRjyFZwThaZADEvAOo12M5uSBk7h07yJ97gqvBtcx45IsJwfUJE4hy8qZqsA62A nTRflBvp647IXAiCcwWsEgE5AXKwA3aL6dcpVR17JXJ6nwHHnslVi8WesiqzUI9sbO/hXeXw TDSB+YhErbNOxvHqCzZEnGAAFf6ges26fRVyuU119AzO40sjdLV0l6LE7GshddyazWZf0iac nEhX9NKxGnuhMu5SXmo2poIQttJuYAvTVUNwQVEx/0yY5xmiuyqvXa+XT7NKJkOZSiAPlNt6 VffjgOP62S7M9wDShUghN3F7CPOrrRsOHWO/l6I/qJdUMW+MHSFYPfYiFXoLUZyPvNVCYSgs 3oQaFhHapq1f345XBtfG3fOYp1K2wTXd4ThFraTLl8PHxCn4ywARAQABzSRNYXR0aGlldSBC YWVydHMgPG1hdHR0YmVAa2VybmVsLm9yZz7CwZEEEwEIADsCGwMFCwkIBwIGFQoJCAsCB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xdzQoHaz lzVbFe7fduHbABmYz9cefQpO7wDE/Q== Organization: NGI0 Core In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Alexei, Thank you for your reply! On 07/05/2024 22:54, Alexei Starovoitov wrote: > On Tue, May 7, 2024 at 9:03 AM Matthieu Baerts wrote: >> >> Hi Alexei, >> >> Thank you for the review! >> >> On 07/05/2024 16:49, Alexei Starovoitov wrote: >>> On Tue, May 7, 2024 at 3:53 AM Matthieu Baerts (NGI0) >>> wrote: >>>> >>>> From: Nicolas Rybowski >>>> >>>> Move Nicolas's patch into bpf selftests directory. This example added a >>>> test that was adding a different mark (SO_MARK) on each subflow, and >>>> changing the TCP CC only on the first subflow. >>>> >>>> This example shows how it is possible to: >>>> >>>> Identify the parent msk of an MPTCP subflow. >>>> Put different sockopt for each subflow of a same MPTCP connection. >>>> >>>> Here especially, we implemented two different behaviours: >>>> >>>> A socket mark (SOL_SOCKET SO_MARK) is put on each subflow of a same >>>> MPTCP connection. The order of creation of the current subflow defines >>>> its mark. >>> >>>> The TCP CC algorithm of the very first subflow of an MPTCP >>>> connection is set to "reno". >>> >>> why? >>> What does it test? >>> That bpf_setsockopt() can actually do it? >> >> Correct. >> >> Here is a bit of context: from the userspace, an application can do a >> setsockopt() on an MPTCP socket, and typically the same value will be >> set on all subflows (paths). If someone wants to have different values >> per subflow, the recommanded way is to use BPF. >> >> We can indeed restrict this test to changing the MARK only. I think the >> CC has been modified just not to check one thing, but also to change >> something at the TCP level, because it is managed differently on MPTCP >> side -- but only when the userspace set something, or when new subflows >> are created. The result of this operation is easy to check with 'ss', >> and it was to show an exemple where this is set only on one subflow. >> >>> But the next patch doesn't check that it's reno. >> >> No, I think it is checked: 'reno' is not hardcoded, but 'skel->data->cc' >> is used instead: >> >> run_subflow(skel->data->cc); >> >>> It looks to me that dropping this "set to reno" part >>> won't change the purpose of the rest of selftest. >> >> Yes, up to you. If you still think it is better without it, we can >> remove the modification of the CC in patch 3/4, and the validation in >> patch 4/4. > > The concern with picking reno is extra deps to CI and every developer. > Currently in selftests/bpf/config we do: > CONFIG_TCP_CONG_DCTCP=y > CONFIG_TCP_CONG_BBR=y > > I'd like to avoid adding reno there as well. > Will bpf_setsockopt("dctcp") work? We picked Reno because this is an inlined kernel module that is always built: there is no kernel config to set, no extra deps. Also, it is usually not used as default, mostly used as fallback, so the verification should not be an issue. We can switch to DCTCP or BBR if you prefer, but I think it is "safer" with Reno, no? Cheers, Matt -- Sponsored by the NGI0 Core fund.