Received: by 2002:ab2:7104:0:b0:1f7:f6c3:9cb1 with SMTP id z4csp55080lql; Tue, 7 May 2024 09:33:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXSpKW+T+Xy1bYbzVIDS39ob6tmXoHbW9ubMbEOnZS/L4VFcf1Eee2zRjEOwEhYjtWnqZ/HuO8veX1BIcU1NgePU3MUYMmGyu4aZB5rOQ== X-Google-Smtp-Source: AGHT+IEpU63pL1MrldY8ctgEPOYIcYfSO+lvBpVUa9gIg3UWbourjzDiKF5zYL9BzRZT2a559PnU X-Received: by 2002:a17:903:18a:b0:1e7:e7ed:777e with SMTP id d9443c01a7336-1eeb018331dmr1893815ad.20.1715099599889; Tue, 07 May 2024 09:33:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715099599; cv=pass; d=google.com; s=arc-20160816; b=ZZU84m+JC6X1toiXJYTiOypEkloilg9vUxbuzycIrRFDnU5BqNzlXXlgCaBlzG6ZXM Kk2z7kyi2EmZpfCkmpzOrHMW7KpK1S/JIzHjIQgeydT1h23PlOwfugXpY5HRXNqqGX/A sfniuRmLR2Q9VC7YcDTteZ91ROzDPEevbkgq0vBxDjt9SUeK0F6xvGOPcpkY95Kc7zWV t7uJTvD+yoj6+HrYw4NQOqVfdLH1uAhc3woTycjfQv95Rkp5GBY9fuUeWY7Qj7D1R1rV w0WPNsUXoqzdsqJjKTHwgO2z8gCPEFwr8UhJbW8+/I+oD8YODnEfXdpiIoMw575aqcy6 N7/g== 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=0Wz/Ege9eRo/e0LQOJbGtALV9yan+pGDc9OOD6Gcr3s=; fh=Phk3TTgFNdd1N32B4Yv01TsQSBeYc8VMoFRK5Qit3kM=; b=Pqcn68I8Y8gLvMosaodI0fRI4QCi4uUzZCPK7hbqEYUpE9b+ok9TPD9rQYLUtbEGPQ 6Tc9PPX7zM8+zn+OCeCRzH4mh/Kaf7WkNYb5Xp7mRUhUBap/FMK0XMVMgzXaIvTZR3eo WhOfxHKtcBelFaGJvHs4tu0ZIsawJguuzA127bzaEXXsTcz4hONJgJXk+qxAMROGseCB A7BwmkaSOCRLCJ8vXI16bYdCwlGOGRbBejEkn4SVp89XiSpfRGrV7ojA7NqML62+reWN jXutpQjvpTJNhLlNrSLZn5sIlSelx959nqEwodLGmEFo3B/oedW8j9/zeuxD1nzcWfZC 2JgQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t2jzKdWd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171766-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171766-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n2-20020a170902d2c200b001e24253c115si10859173plc.335.2024.05.07.09.33.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:33:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171766-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t2jzKdWd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171766-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171766-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 1186328DD10 for ; Tue, 7 May 2024 16:07:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A09E16DEB0; Tue, 7 May 2024 16:03:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="t2jzKdWd" 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 441DF16D9CF; Tue, 7 May 2024 16:03:37 +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=1715097818; cv=none; b=Mw5QWZEzC/vj6OjGm3Xu2LdHdJjfrofkDkEEViOMPngl+2h/yxP1/Rjyjco1xHNHEgJgfcgIkkeQjdRsvwKOUl08CtIfCBFt0usStKNYEoGwDcVt/iZQTksz3UCOMqKniaVVqQJOqNWpQj1E7KTPjjV78xfCguTuzojDIJNcBo0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715097818; c=relaxed/simple; bh=tEFjrCieMjm2RotPaLaRVTqyTzHezBaUP3F1ZeAvDuU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OL4xYlqkI3K7D8gk51mBdcMgq1aQhG3tLkWmXYy8OG/31j+sjnc87BPyHKVBygZt0tYrYCkl/X83xo1m1pJsXGt6O3lb/TY6FCfK2TLqGqmJmzLexWLlWC0fcaB7tXYa4ZpB/zd+fbIaOorOxN+1TrS3D7+eHMNAOoIJy5qqBe8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=t2jzKdWd; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA7E7C2BBFC; Tue, 7 May 2024 16:03:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715097817; bh=tEFjrCieMjm2RotPaLaRVTqyTzHezBaUP3F1ZeAvDuU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=t2jzKdWdugZLz2Smc7O4LIwtwUzMO8DV1a2IngrSTrLMfVRRPtLYtP3bAxXzVerOB 9yMe16bHeeq+/U3WNruqlt9mSFaah8NJnCHVwl0/cpEWcauNTlWzAwOuBswpcQF0He pI9INS0BQFPx22S/J0MvryS9gqm28cxzppU2T6SQ4ely1Daf0MxEVWH2Ih1igCpdqk RJhT0+8W8NSXTkaEitkHK7ql+K1xoMDGxkyzjcMV+DTUqYxeTbB1h9nCdZZ7UC188I udNIs6pnOcY+KtW47K1eD3c1PfAZy6I/zcuVS0MjBgx+zPV1tBtQJqWrrc8qT6wvkS oV/344fKdTg3g== Message-ID: <843ea6eb-a28d-437c-9c98-0b8c8816c518@kernel.org> Date: Tue, 7 May 2024 18:03:30 +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> 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 YWVydHMgPG1hdHR0YmVAa2VybmVsLm9yZz7CwZEEEwEIADsCGwMFCwkIBwIGFQoJCAsCBBYC AwECHgECF4AWIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZ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I0 Core In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. > pw-bot: cr Cheers, Matt -- Sponsored by the NGI0 Core fund.