From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79861C25B08 for ; Wed, 17 Aug 2022 17:20:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234805AbiHQRUj (ORCPT ); Wed, 17 Aug 2022 13:20:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241175AbiHQRUa (ORCPT ); Wed, 17 Aug 2022 13:20:30 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1B359C53D for ; Wed, 17 Aug 2022 10:20:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660756827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=E1x5LNrRWuvWgMZzul66wIPkfRn59vrBUCTEKqLPjoU=; b=e/wEZ4bSPTeqfDwVfvMOo0Fcl6vCUj65YM9CWMM0ssLpQdqcgWQL4dJvIF2FYHZ+oJb6cj 7ZEts7Z8x9QrOWCulah5BojSmIc23ukXOm3vR6UPZxlsj3xaIIz43LoKJiCezREgjhSFER B+xRLQFZILrMgtVMaf+A8yta1GfzzUw= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-541-g-35-EmzOm22nb8lkTAWVg-1; Wed, 17 Aug 2022 13:20:26 -0400 X-MC-Unique: g-35-EmzOm22nb8lkTAWVg-1 Received: by mail-wm1-f70.google.com with SMTP id c66-20020a1c3545000000b003a5f6dd6a25so1354699wma.1 for ; Wed, 17 Aug 2022 10:20:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=E1x5LNrRWuvWgMZzul66wIPkfRn59vrBUCTEKqLPjoU=; b=2Uoyn3MIeQmtQR5b0JGiTJCjiYBjh39yjX4/jiFWspg4OkP3iFchcpDhEXK59hPivK eF3PIsqjyzggSksbw7g2OQjrpPJjshoQwXuQ6MpPc6dt7GSS79up5do3D4V+e68fKLqG 0V+owdxYlyE3U8XeBaaDfoBfH6shZyJkxUCrBF0Nuyl7WKBO3Zdm802sVyHc+MlJy/kC 6NlVJp5j+0MvvL/pris+IyR3oqHG53FUlgG3xoU4tWfT4s8EZ9bbrwEgguxLPLiLI0/U ctq3/feIbSFLnN93iR7oFikeWcETDKQ5d5QJbA9Eq48u2fl6pJ2iS3/xq0rOv3Ca14W4 3FJA== X-Gm-Message-State: ACgBeo2Je3F3azG58pSG38AJZs2b/3hoRRnd4bjZyewau3Cw0mSDdZBW xD2W7u1Sn1kNAaXgTjba02cC7RqQXF8X322pXNXj/YP+L19orArs14euNOAOiO8a0mev0f0sNkr 4FcUDr+ArufUxYqESZddSgXCL X-Received: by 2002:a1c:19c2:0:b0:3a5:168e:a918 with SMTP id 185-20020a1c19c2000000b003a5168ea918mr2792762wmz.31.1660756825528; Wed, 17 Aug 2022 10:20:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR4cDOhH9gb57ZgsmemV6RwBgg2yGkmkUplYW2gdzH3YejzjL5WNaW6YF8Ruh007bts4KbJ2Bw== X-Received: by 2002:a1c:19c2:0:b0:3a5:168e:a918 with SMTP id 185-20020a1c19c2000000b003a5168ea918mr2792746wmz.31.1660756825315; Wed, 17 Aug 2022 10:20:25 -0700 (PDT) Received: from redhat.com ([2.55.4.37]) by smtp.gmail.com with ESMTPSA id h82-20020a1c2155000000b003a319bd3278sm2862407wmh.40.2022.08.17.10.20.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 10:20:24 -0700 (PDT) Date: Wed, 17 Aug 2022 13:20:19 -0400 From: "Michael S. Tsirkin" To: Bobby Eshleman Cc: Jakub Kicinski , Bobby Eshleman , Bobby Eshleman , Cong Wang , 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, Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= Subject: Re: [PATCH 3/6] vsock: add netdev to vhost/virtio vsock Message-ID: <20220817131437-mutt-send-email-mst@kernel.org> References: <5a93c5aad99d79f028d349cb7e3c128c65d5d7e2.1660362668.git.bobby.eshleman@bytedance.com> <20220816123701-mutt-send-email-mst@kernel.org> <20220816110717.5422e976@kernel.org> <20220816160755.7eb11d2e@kernel.org> <20220816181528.5128bc06@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 16, 2022 at 10:50:55AM +0000, Bobby Eshleman wrote: > > > > Eh, I was hoping it was a side channel of an existing virtio_net > > > > which is not the case. Given the zero-config requirement IDK if > > > > we'll be able to fit this into netdev semantics :( > > > > > > It's certainly possible that it may not fit :/ I feel that it partially > > > depends on what we mean by zero-config. Is it "no config required to > > > have a working socket" or is it "no config required, but also no > > > tuning/policy/etc... supported"? > > > > The value of tuning vs confusion of a strange netdev floating around > > in the system is hard to estimate upfront. > > I think "a strange netdev floating around" is a total > mischaracterization... vsock is a networking device and it supports > vsock networks. Sure, it is a virtual device and the routing is done in > host software, but the same is true for virtio-net and VM-to-VM vlan. > > This patch actually uses netdev for its intended purpose: to support and > manage the transmission of packets via a network device to a network. > > Furthermore, it actually prepares vsock to eliminate a "strange" use of > a netdev. The netdev in vsockmon isn't even used to transmit > packets, it's "floating around" for no other reason than it is needed to > support packet capture, which vsock couldn't support because it didn't > have a netdev. > > Something smells when we are required to build workaround kernel modules > that use netdev for ciphoning packets off to userspace, when we could > instead be using netdev for its intended purpose and get the same and > more benefit. So what happens when userspace inevitably attempts to bind a raw packet socket to this device? Assign it an IP? Set up some firewall rules? These things all need to be addressed before merging since they affect UAPI. > > > > The nice thing about using a built-in fq with no user visible knobs is > > that there's no extra uAPI. We can always rip it out and replace later. > > And it shouldn't be controversial, making the path to upstream smoother. > > The issue is that after pulling in fq for one kind of flow management, > then as users observe other flow issues, we will need to re-implement > pfifo, and then TBF, and then we need to build an interface to let users > select one, and to choose queue sizes... and then after awhile we've > needlessly re-implemented huge chunks of the tc system. > > I don't see any good reason to restrict vsock users to using suboptimal > and rigid queuing. > > Thanks.