Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3956191rwb; Tue, 16 Aug 2022 11:37:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR4+X2ktC9e1zh1FPQyViTa0nxAu47tniPp2HgyOJg3fMtEwFHxHmyZZf7dJOmlhfkJIyxTt X-Received: by 2002:a17:907:a0c6:b0:730:f081:6e8e with SMTP id hw6-20020a170907a0c600b00730f0816e8emr14158815ejc.479.1660675025567; Tue, 16 Aug 2022 11:37:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660675025; cv=none; d=google.com; s=arc-20160816; b=PtrA6eujXRrtRAiyUGHT4vfVl1/TOHE57SKUxj6+4VJlYwFZAz1oNASAueeyyTujc2 OHg/vpxylSAKLEBqQhQcfoSYzZbb3PuVaSnZxcuJ8FxMXsJjw5Tv6dSLYltiK1PhMRXK d+bJ8nUUHPqiY02MzI1q0SX7VqhOLeeVVZJPUq4fqVfLL2Oplco8ABKR7q/WnInAPsnq 8w3a2GG8EsS/jMMKwem6+Y8i56ChWaXWhuDQVo7wcGaON9ZtlwAKGzWma0l/0JLFXrcc wdhncANSwhnL0MVXhVLQs0z9k1l5qLboalWBHrt06Acs24uz07ynCK4BmG74pHc+sF9Q kRYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=SUloOCIhBpKkXmVWofoRHuvKydj5gLUFqrbAXtuUuho=; b=b8NXYmU4/X/teb51LlsUEFBeRBaxff3c+p9N96F8/XHeiSifJUKu6MUYw3fkClM/CR r3EaWf3QR77Sb1YhPkST8Dqmvm9DuuRLEGmpc6xfQt+XTSiOkFb+dPFxs+FgGwtskUQs E6ii0G01uWtMfNBgO6l8Z9DkfEzG5dQEl7A9bjzW74/HwoEaxLysUG6V5WqUcaKWoTR9 AP8NVciuV4MMr4jfgYlQRyjslHf8bB5eQ+vLBxCrcHAb/2vDLsBNjMwIxzBptKXj2QIH CiX6TJOaIlX4Fpl+QffY7A9eoZ8fdLH5Kcm1322PEyfzu3z8Xs3KL7PFCWB/1LbJUgc+ ZSYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sIAWpl0S; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hw19-20020a170907a0d300b007262ad8839esi7549990ejc.16.2022.08.16.11.36.39; Tue, 16 Aug 2022 11:37:05 -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=@kernel.org header.s=k20201202 header.b=sIAWpl0S; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236861AbiHPSH4 (ORCPT + 99 others); Tue, 16 Aug 2022 14:07:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236912AbiHPSHl (ORCPT ); Tue, 16 Aug 2022 14:07:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80FD185A82; Tue, 16 Aug 2022 11:07:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B644861384; Tue, 16 Aug 2022 18:07:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8882BC433D7; Tue, 16 Aug 2022 18:07:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660673239; bh=wdC60JNH+NYxDVMOzJ91ehWnODXNaR5QzNelPAKX9ls=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sIAWpl0S9Dol1xjrzZ7uMx84IAHw9Eqgp40WK17hroEzpOME8bkRYBTNWdBPkZKx/ 7J3H3tYgB4ycNm0VV7DA3PEWa7ULBhg9DOfdzY62rcOo9yNi71dbxNFM5bpONFI8OX /pTJnNg2PwZuGyQrWhp4XhYxBqSf+i4KBwAJjH8kumxLzpIqU5dIQTWP3zx1VLM3by EVBmvQGvARPfgLcdX5A6ebghntShyq4uF/t9Mp+MNW9i9TZFJugpZfrGfzmxiFSwKc L2/gB7+7b/3DcIeWOBQOjYG09UUKH724ulP97ljfJ6T752ShJ7qzYN+nBFu95tXOk3 lWRYS97zVVaxQ== Date: Tue, 16 Aug 2022 11:07:17 -0700 From: Jakub Kicinski To: Bobby Eshleman Cc: "Michael S. Tsirkin" , 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 Subject: Re: [PATCH 3/6] vsock: add netdev to vhost/virtio vsock Message-ID: <20220816110717.5422e976@kernel.org> In-Reply-To: <20220816123701-mutt-send-email-mst@kernel.org> References: <5a93c5aad99d79f028d349cb7e3c128c65d5d7e2.1660362668.git.bobby.eshleman@bytedance.com> <20220816123701-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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, 16 Aug 2022 12:38:52 -0400 Michael S. Tsirkin wrote: > On Mon, Aug 15, 2022 at 10:56:06AM -0700, Bobby Eshleman wrote: > > In order to support usage of qdisc on vsock traffic, this commit > > introduces a struct net_device to vhost and virtio vsock. > >=20 > > Two new devices are created, vhost-vsock for vhost and virtio-vsock > > for virtio. The devices are attached to the respective transports. > >=20 > > To bypass the usage of the device, the user may "down" the associated > > network interface using common tools. For example, "ip link set dev > > virtio-vsock down" lets vsock bypass the net_device and qdisc entirely, > > simply using the FIFO logic of the prior implementation. =20 >=20 > Ugh. That's quite a hack. Mark my words, at some point we will decide to > have down mean "down". Besides, multiple net devices with link up tend > to confuse userspace. So might want to keep it down at all times > even short term. Agreed! =46rom 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=20 be semantically similar to what you're doing? Treating netdevs as buildings blocks for arbitrary message passing solutions is something=20 I dislike quite strongly. Could you recommend where I can learn more about vsocks?