Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3966208pxj; Mon, 21 Jun 2021 10:23:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzo9ILIBsOJBBYFXePNAVlifyXIirBJ9bqe3119t5d5JgOwKv9nw31c8g6RmDiR+8trNhMQ X-Received: by 2002:a05:6e02:1b8f:: with SMTP id h15mr19236007ili.151.1624296216370; Mon, 21 Jun 2021 10:23:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624296216; cv=none; d=google.com; s=arc-20160816; b=AU4lUa5XXjBsPAF7WjNbzgzoqqvraLD7uiRq6bZR6apXSbjTnPfvvQDuBnPslKyfhk Gx4hfMfiqMqPKiJkKrSi7ebrWh+L7MwII9OoOW+Kv/h8ynOm/drz8zlOTxAVWk3pavKA wFXcHxhUTfZ0zd/r8q+tmt6sEgmW3g7cU7z4rFTvSpQe1UBGulMPnd4MKb33V4mDP5gf fHHkNVLEsruKst2vncoH9ysF23jrLtTL8kqF5poK4bexaAWe0R1M3LDR9GvU+JA9p7QH AifxdMiEWRy90Dzmiiog7l2N18WChc+Tbjidh6dllnINn9tO7bHmbXhTcmQgEtHjlRx2 YzMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=paxY+fK5EQubdG5RnsC1ZjKOzBaYyvh9aKCTbSxMuIg=; b=VK2RURALVZ8MAN2nceqsmDV8SRpgAGHNOE8SOUWrLJBu5LvArLEDcOqlX1b8SrNrwc 8HK38YIO4Ksk2Kvlmy1li1Cx2Re5yoCNiSnp/Y6Bomw3Tv42HIX3Ln6hrHePISIuYkeO qkAR3kquVQPXXDGC8qJ5Ohm1JUUcsJ/2yeh7nl2om5WuucHnhySUZJ4/mTi/whsDY9tN l8VaOw+TsTI6A4BDpwXmgel9ofDnTNSt1HGkgGu6VA0GuuoKN842stjULR8NPKl/Mwwi VsKgU9xZJ9Gqr/jo43QWpa41eL4zOk5zvlYxws4QQsmDzvkoLLzeqR4q7tq/wAhWGODa C2Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=k9buZCcF; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z13si13527713ill.61.2021.06.21.10.23.24; Mon, 21 Jun 2021 10:23:36 -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=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=k9buZCcF; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231157AbhFURYL (ORCPT + 99 others); Mon, 21 Jun 2021 13:24:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231279AbhFURYK (ORCPT ); Mon, 21 Jun 2021 13:24:10 -0400 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CFE1C061574 for ; Mon, 21 Jun 2021 10:21:55 -0700 (PDT) Received: by mail-ot1-x32a.google.com with SMTP id f3-20020a0568301c23b029044ce5da4794so11879754ote.11 for ; Mon, 21 Jun 2021 10:21:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=paxY+fK5EQubdG5RnsC1ZjKOzBaYyvh9aKCTbSxMuIg=; b=k9buZCcFK0A+YKxBKhQDRwPnvJ6wigsxT9C6bDyDXq8dj2ynEUKWmKZFsOsnuA18HC rYtI+2h+b9ji7c8K5vFsn9QrHGveinDiGlw9eb0j4iN7qx8bALUWTTxIxQ1rHoDFZ4uO aAKW0fK9+VH3MzQtTPWra2jMjzTu1BqwU60/khH00QVSvbionUl1Xl/Ez9IPysCHWFa2 z+7HAdoi/U4x1jiCsR2cBXpAnNqJI+kGww19eWWa6UlY02Vhvu3ht1dE6TpsJuyaom20 bSn6Zd5WBhn8AFmhK43lJ+HKOpUnqEkZAj/pzO/7JD2m3CpX0cJWEWMP9a9s9yBsk/AX kG+g== 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:content-transfer-encoding; bh=paxY+fK5EQubdG5RnsC1ZjKOzBaYyvh9aKCTbSxMuIg=; b=ms4hoJdQ3pBvhtfTSP10oS69YCGklBDObLsccDJtdi6ChgJF+CBktNGFB1Vlq0lRx6 ZlNF1BOPQAlOUSFSAJXcIek3EsPLSlL21H1JGE3clC+3NuTUYT0cZv43Mh/ki5CPcjqV AvC2kGDk9cuVBSLVqbkgPn/1TSv8kO7pwKv1i3Sm5kmNwIRUv6bN3KAGcCppuskfltuY 6MJ5p1GkS83Ya0fOehQ2JXGd14v7Illozc92hxXgb+e8FdDxsnu8dULppmshD1luaFAS mOynpMg2fD8tPn8Ucn18vVlusXGb0INHGSIiqanlGfbl5EJ4OqrXcjJbbBABumoKcnbd +uFw== X-Gm-Message-State: AOAM531kUh77dgUbrH4pi4PHzoxnlI4ciUmOR718L7s8X/nv8y9P8HTA ajXKFR2fejRNiXsa18jvSSGWsaJQDcEGSPpR+BYopA== X-Received: by 2002:a05:6830:1e99:: with SMTP id n25mr21556467otr.279.1624296114776; Mon, 21 Jun 2021 10:21:54 -0700 (PDT) MIME-Version: 1.0 References: <20210609232501.171257-1-jiang.wang@bytedance.com> <20210618093529.bxsv4qnryccivdsd@steredhat.lan> In-Reply-To: <20210618093529.bxsv4qnryccivdsd@steredhat.lan> From: "Jiang Wang ." Date: Mon, 21 Jun 2021 10:21:44 -0700 Message-ID: Subject: Re: [External] Re: [RFC v1 0/6] virtio/vsock: introduce SOCK_DGRAM support To: Stefano Garzarella Cc: virtualization@lists.linux-foundation.org, Stefan Hajnoczi , "Michael S. Tsirkin" , Arseny Krasnov , cong.wang@bytedance.com, Xiongchun Duan , Yongji Xie , =?UTF-8?B?5p+056iz?= , Jason Wang , "David S. Miller" , Jakub Kicinski , Steven Rostedt , Ingo Molnar , Colin Ian King , Jorgen Hansen , Andra Paraschiv , Norbert Slusarek , Lu Wei , Alexander Popov , kvm@vger.kernel.org, Networking , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 18, 2021 at 2:35 AM Stefano Garzarella wr= ote: > > On Wed, Jun 09, 2021 at 11:24:52PM +0000, Jiang Wang wrote: > >This patchset implements support of SOCK_DGRAM for virtio > >transport. > > > >Datagram sockets are connectionless and unreliable. To avoid unfair cont= ention > >with stream and other sockets, add two more virtqueues and > >a new feature bit to indicate if those two new queues exist or not. > > > >Dgram does not use the existing credit update mechanism for > >stream sockets. When sending from the guest/driver, sending packets > >synchronously, so the sender will get an error when the virtqueue is ful= l. > >When sending from the host/device, send packets asynchronously > >because the descriptor memory belongs to the corresponding QEMU > >process. > > > >The virtio spec patch is here: > >https://www.spinics.net/lists/linux-virtualization/msg50027.html > > > >For those who prefer git repo, here is the link for the linux kernel=EF= =BC=9A > >https://github.com/Jiang1155/linux/tree/vsock-dgram-v1 > > > >qemu patch link: > >https://github.com/Jiang1155/qemu/tree/vsock-dgram-v1 > > > > > >To do: > >1. use skb when receiving packets > >2. support multiple transport > >3. support mergeable rx buffer > > Jiang, I'll do a fast review, but I think is better to rebase on > net-next since SEQPACKET support is now merged. > > Please also run ./scripts/checkpatch.pl, there are a lot of issues. > > I'll leave some simple comments in the patches, but I prefer to do a > deep review after the rebase and the dynamic handling of DGRAM. Hi Stefano, Sure. I will rebase and add dynamic handling of DGRAM. I run checkpatch.pl at some point but I will make sure to run it again before submitting. Thank= s. Regards, Jiang > Thanks, > Stefano >