Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3118961pxa; Tue, 25 Aug 2020 11:57:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxH3kdI6lt8HdBo59J9OnHQZDUGBnSXEvI20xJcqB5ZiqyTZYkv9fBgqE4j8S6iHAhUtUS2 X-Received: by 2002:a17:906:2e08:: with SMTP id n8mr8762668eji.222.1598381852319; Tue, 25 Aug 2020 11:57:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598381852; cv=none; d=google.com; s=arc-20160816; b=YuaH+99z8fROrErOXe4xucJNivG49hJw6TlCqE1Eg57iEWvSMd+grZlGfTe3j0aDlK kzJkBn8YSvpF+iNXVm0GqbS4cGsVBrsveuRBSmoQR/oc56wz9bfNlUyUqTgVeQSFecfC lzkhYJEYvtc2i1BfiUCBt476ikNTFfAqQR/CIwnVNIA6LX3jCst08ag8SKXR0iNa7Z2f flNjnjAQoXqAQ0Wvj8jinrHp/WwuRVSmikFLkHFnZtm4viqQ+YBv/3LwQAEDbk410+jE Hg5Gz7kdW3m+Fp+UkFgmViTbKEykZJ8Qsj+CIZAnMWUuKtH2NhBEnTLTTXkmOMMvnV72 ILdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=w9uk4AMLpvzRAgzq0rqHpsTXVWbRiA2GeYuDtu/sc0s=; b=viaBbOeqPqdiL2RVGF0quDxc4RSzHbFPfGnFmDD8KfGp9Fv5yOtcHRp5PlLLc14v6/ 7VY7EthBzO9GYKObhlRb9BfYyi8vnUpMAlc92xr3tivtB8hkzbumKm+/nTx+KGxC13T2 kLGi9LMw9s91s6RfW5kPYGRBjd33mwDUpVMBGUCj1+icjl9HXDkAmRHxEDQk3yids+Xn xnpaCMddvdqq0j0dSf0gxseiabMEieygI8Itdem7DU2mqZgEe4qbjBdnaCW+gsNBdhOi Hnx9r/Debo8J89L6ARFfaPaj03+WsZ+vGLpTFFf4lu78QRAAqEtUARbV0FZ0UYQFaCwy awpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares-net.20150623.gappssmtp.com header.s=20150623 header.b=uUs54mDs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w6si9202367ejb.150.2020.08.25.11.57.08; Tue, 25 Aug 2020 11:57:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@tessares-net.20150623.gappssmtp.com header.s=20150623 header.b=uUs54mDs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726599AbgHYSz7 (ORCPT + 99 others); Tue, 25 Aug 2020 14:55:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726119AbgHYSz5 (ORCPT ); Tue, 25 Aug 2020 14:55:57 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44C99C061755 for ; Tue, 25 Aug 2020 11:55:56 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id u126so13561213iod.12 for ; Tue, 25 Aug 2020 11:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=w9uk4AMLpvzRAgzq0rqHpsTXVWbRiA2GeYuDtu/sc0s=; b=uUs54mDsCzNMq6oM+OHwokxMNdLcMeL723VOZvI9OBiLh6Uganid+kexMgqvabfxm5 icbGpodVRZgsqpBW8/ccZxX9Xwoq1+J+7ar/QWmxgjKhTUR96ejFDrEjy/aO15wNZglD XxGIV7rCwfG4Sw3IrnyC3l7AVwlITjxNZDKaXet5eogwSjqgcheDVZeunE+xopwwyOnf wzQLgYrJ0kZ5XZHgJwLyJUVvA/UwHztMVYDso7KZSlFUsFBYJKN7wPZXFIEOD8g6n6f6 ClETrR+hQVjbWIdTrzvUxKcn7BG8eiVhydS1prRnL6BXJam6k1gu1SiIKXt6rc3hv5me VfeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=w9uk4AMLpvzRAgzq0rqHpsTXVWbRiA2GeYuDtu/sc0s=; b=d2669ms1fQp7CdcZ/O/j0D6oE4gX3YVvZX97wB2FYIT2TuTFG8iGz1m4U1Rzsety2u WPFZFOrAmJ+8YW40Av5w95i6HXnveuQX8c9OtetBPfyYaL1lYu7NbMtWCm31wBQsNO5E +ALvNDz7vr7SauS8mJqN8h6YpaJIx2JHVz5LSMBxzJLKh0fsWWRUICff26dIfI+I5isi Zs+/bI4dgwJ0xPeRfurFSeg4oF5dvKnW81zvj+QZlZbdRi/kJJVsxbVfBKytyEJ/LEhP C4QPfwvSf7tfjNRrZd5iYnaZ3qgc/OfV0WmAh8zSNBey+vmBmsDqP3yLzyzjiDg8jrh6 X0Pg== X-Gm-Message-State: AOAM530Xa4Ikw4SzsHOq522BI+mR8P9mbdhH3O2tvTxbxF3/vXYRKJ1s idqo7NrKxfeuSeZvJgDmsn0s9MfJpeLesOBwJtZD3A== X-Received: by 2002:a6b:6204:: with SMTP id f4mr9990861iog.56.1598381755631; Tue, 25 Aug 2020 11:55:55 -0700 (PDT) MIME-Version: 1.0 References: <20200821151544.1211989-1-nicolas.rybowski@tessares.net> <20200824220100.y33yza2sbd7sgemh@ast-mbp.dhcp.thefacebook.com> In-Reply-To: <20200824220100.y33yza2sbd7sgemh@ast-mbp.dhcp.thefacebook.com> From: Nicolas Rybowski Date: Tue, 25 Aug 2020 20:55:43 +0200 Message-ID: Subject: Re: [PATCH bpf-next 0/3] bpf: add MPTCP subflow support To: Alexei Starovoitov Cc: Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , "David S. Miller" , Jakub Kicinski , John Fastabend , KP Singh , Martin KaFai Lau , Mat Martineau , Matthieu Baerts , Song Liu , Yonghong Song , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, mptcp@lists.01.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alexei, Thanks for the feedback! On Tue, Aug 25, 2020 at 12:01 AM Alexei Starovoitov wrote: > > On Fri, Aug 21, 2020 at 05:15:38PM +0200, Nicolas Rybowski wrote: > > Previously it was not possible to make a distinction between plain TCP > > sockets and MPTCP subflow sockets on the BPF_PROG_TYPE_SOCK_OPS hook. > > > > This patch series now enables a fine control of subflow sockets. In its > > current state, it allows to put different sockopt on each subflow from a > > same MPTCP connection (socket mark, TCP congestion algorithm, ...) using > > BPF programs. > > > > It should also be the basis of exposing MPTCP-specific fields through BPF. > > Looks fine, but I'd like to see the full picture a bit better. > What's the point of just 'token' ? What can be done with it? The idea behind exposing only the token at the moment is that it is the strict minimum required to identify all subflows linked to a single MPTCP connection. Without that, each subflow is seen as a "normal" TCP connection and it is not possible to find a link between each other. In other words, it allows the collection of all the subflows of a MPTCP connection in a BPF map and then the application of per subflow specific policies. More concrete examples of its usage are available at [1]. We try to avoid exposing new fields without related use-cases, this is why it is the only one currently. And this one is very important to identify MPTCP connections and subflows. > What are you thinking to add later? The next steps would be the exposure of additional subflow context data like the backup bit or some path manager fields to allow more flexible / accurate BPF decisions. We are also looking at implementing Packet Schedulers [2] and Path Managers through BPF. The ability of collecting all the paths available for a given MPTCP connection - identified by its token - at the BPF level should help for such decisions but more data will need to be exposed later to take smart decisions or to analyse some situations. I hope it makes the overall idea clearer. > Also selftest for new feature is mandatory. I will work on the selftests to add them in a v2. I was not sure a new selftest was required when exposing a new field but now it is clear, thanks! [1] https://github.com/multipath-tcp/mptcp_net-next/tree/scripts/bpf/examples [2] https://datatracker.ietf.org/doc/draft-bonaventure-iccrg-schedulers/