Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4270795rwb; Tue, 16 Aug 2022 18:35:16 -0700 (PDT) X-Google-Smtp-Source: AA6agR4z4r7YReYc+rq1ZjI+Zx4ds+qUYMhSG5PwI0VlGMoTW+CfljtgdBAICneuav1n/6Z6GZn2 X-Received: by 2002:a05:6a00:855:b0:52e:f01d:723a with SMTP id q21-20020a056a00085500b0052ef01d723amr23420275pfk.31.1660700116531; Tue, 16 Aug 2022 18:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660700116; cv=none; d=google.com; s=arc-20160816; b=NG6wMkYLAp3mDpTuVhzDUqcYbyze/cLTSn321ZPSLBnWGLjRe3ELt0bUsZZFyYryZ2 38IbOymRRRJTyZT3DRPEPDG5PZwaHHQyGNsWnxQpK8DA2CbbKRAORiLBwKT44ZuhmDIa j9O3+UgVbMmD/FzCJt+VU1V9eSM6t9zehIcBJK/khAnLKY11cyi9CgUBv3kX1b0f58kF glzppiDsauKf5A5bm4L13ONL8vo2+lZ+JrXyXh2iPbdzoD7wg6aBf+fj5odyHSfWgxO9 l2b4UgboqW1A5FLOnln3iBtb4MZ06J+kh29ELzNeUfvmOkSOUNKGicppXuyLv3aJ/U5o F3LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Misl/B06841rsdf51Aa+ttnbhsZR7d3YzAIKfH1afCM=; b=J9lHrxOqLqp/nqrLppPYeVLNhGPWhsXyR7xDqFIG84cyQbrqE+nrG7HY0s9Q32ObUw NUifIAo+gBQurOTh6qTQDy5Agd6ZI2W+hraG7QqjAwvwQ9KjBoV5Zvp5qAZO5d9QBgw/ NYJVXjkLdYta0vZa4hnTG/RRYiIc73uh5muBbwkhUtzJZbxa0SR1eTtDFNbfRIY1aohv kOchVhvPUvyUY57YHfw6KN1nY/Fn6JPy0agPbzNgH3rlDJpcPV66fm0SPfUJK3I+v66s 64TrsGfeH1+Gj/aS0SVUg6razWihGinuY0GbZHRgpf6cONBWyaWIb5tlVXqWzcN19Eez RZRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=MG0YgAX5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 26-20020a63135a000000b0041da5a05f4csi200039pgt.526.2022.08.16.18.35.05; Tue, 16 Aug 2022 18:35:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=MG0YgAX5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238086AbiHQBXb (ORCPT + 99 others); Tue, 16 Aug 2022 21:23:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237673AbiHQBXX (ORCPT ); Tue, 16 Aug 2022 21:23:23 -0400 Received: from mail-ua1-x92e.google.com (mail-ua1-x92e.google.com [IPv6:2607:f8b0:4864:20::92e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 668C31081 for ; Tue, 16 Aug 2022 18:23:21 -0700 (PDT) Received: by mail-ua1-x92e.google.com with SMTP id cd25so4669491uab.8 for ; Tue, 16 Aug 2022 18:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=Misl/B06841rsdf51Aa+ttnbhsZR7d3YzAIKfH1afCM=; b=MG0YgAX5i1o7sBUDQM1NCnFgnxkQaaQm8ZOK13l79EOrXwG3hxCVCuxw53YmF/GPmG BotdAEanspQc99c8od7et+xJJfH666g+PKM2nqgz3aozMVwIaZpREipg9SXYXgriDnmG gd/gkMlKOf8PYpghcO3mkXIF7SKNqJjlKBYT913vJf9YESWgf8pX2vYoNDz1IqpbTxV3 ey8qpYsAzqcukQgw/XSXbpnh4iqMa5QXp6N0QLpAN0eT/f7DTXgLZh1huFFG57VyQyzn 6HWrAgsd8srbQ2yyjWgBYeijyKZyB2lbk+DexhRKJ/HbmCuh55PZoJ2SmQL/CWZeRD8m GOyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=Misl/B06841rsdf51Aa+ttnbhsZR7d3YzAIKfH1afCM=; b=GP8PR72sqUQeR2OAMVjYCZahWeeYUb+oW7szLy3pzVjQiiG84x7tL6cdB82SPyTqIU D168TMTD/cDhU2pzSHV/17GYPILowCKkU1L0YMfEGjgmoglPqy2YNdzIyNBuUKk2YK6w 8JTFlnGjSR8rGMPQgBNNUaYr7ItE4ClVLMiZ7A3+vw230B5E1XlSK8hwMtZpDeLlhiIJ TF62bL1Hrejeo2IE5CpV3DbclE64FkXnyCAaYxpyrjmk1ra9+02ZFq6hZQWbABtKX4P/ Uu/uwJoT8Ctz1NJCPQ+VpdS+iReS9jDkONCeFbcJPHqfQ2tHtFZI3wFcPI4kn7efJBK0 niQw== X-Gm-Message-State: ACgBeo3uIXgY3PXmn+uiLUevg3vyLf0LJQowtEPMKoZ+la52Co/F6PCf K/1SVNb4bck1yMAMObcUZwGl0qdw5xEivm55cwOl8A== X-Received: by 2002:ab0:785a:0:b0:386:d33c:d636 with SMTP id y26-20020ab0785a000000b00386d33cd636mr10128457uaq.87.1660699400464; Tue, 16 Aug 2022 18:23:20 -0700 (PDT) MIME-Version: 1.0 References: <5a93c5aad99d79f028d349cb7e3c128c65d5d7e2.1660362668.git.bobby.eshleman@bytedance.com> <20220816123701-mutt-send-email-mst@kernel.org> <20220816110717.5422e976@kernel.org> <20220816160755.7eb11d2e@kernel.org> In-Reply-To: <20220816160755.7eb11d2e@kernel.org> From: "Cong Wang ." Date: Tue, 16 Aug 2022 18:23:09 -0700 Message-ID: Subject: Re: [External] Re: [PATCH 3/6] vsock: add netdev to vhost/virtio vsock To: Jakub Kicinski Cc: Bobby Eshleman , Bobby Eshleman , "Michael S. Tsirkin" , Bobby Eshleman , Jiang Wang , Stefan Hajnoczi , Stefano Garzarella , Jason Wang , "David S. Miller" , Eric Dumazet , Paolo Abeni , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 16, 2022 at 4:07 PM Jakub Kicinski wrote: > > On Tue, 16 Aug 2022 07:02:33 +0000 Bobby Eshleman wrote: > > > From a cursory look (and Documentation/ would be nice..) it feels > > > very wrong to me. Do you know of any uses of a netdev which would > > > be semantically similar to what you're doing? Treating netdevs as > > > buildings blocks for arbitrary message passing solutions is something > > > I dislike quite strongly. > > > > The big difference between vsock and "arbitrary message passing" is that > > vsock is actually constrained by the virtio device that backs it (made > > up of virtqueues and the underlying protocol). That virtqueue pair is > > acting like the queues on a physical NIC, so it actually makes sense to > > manage the queuing of vsock's device like we would manage the queueing > > of a real device. > > > > Still, I concede that ignoring the netdev state is a probably bad idea. > > > > That said, I also think that using packet scheduling in vsock is a good > > idea, and that ideally we can reuse Linux's already robust library of > > packet scheduling algorithms by introducing qdisc somehow. > > We've been burnt in the past by people doing the "let me just pick > these useful pieces out of netdev" thing. Makes life hard both for > maintainers and users trying to make sense of the interfaces. I interpret this in a different way: we just believe "one size does not fit all", as most Linux kernel developers do. I am very surprised you don't. Feel free to suggest any other ways, eventually you will need to reimplement TC one way or the other. If you think about it in another way, vsock is networking too, its name contains a "sock", do I need to say more? :) > > What comes to mind if you're just after queuing is that we already > bastardized the CoDel implementation (include/net/codel_impl.h). > If CoDel is good enough for you maybe that's the easiest way? > Although I suspect that you're after fairness not early drops. > Wireless folks use CoDel as a second layer queuing. (CC: Toke) What makes you believe CoDel fits all cases? If it really does, you probably have to convince Toke to give up his idea on XDP map as it would no longer make any sense. I don't see you raise such an argument there... What makes you treat this differently with XDP map? I am very curious about your thought process here. ;-) Thanks.