Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10832641pxu; Wed, 30 Dec 2020 13:01:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcJDhxOr795PCJlI39C9b1P2n/aCuTyt6bzRJXpcAfaEJoBBSfE2uk2YbFezpN6vdQXvS/ X-Received: by 2002:a17:906:7687:: with SMTP id o7mr51842743ejm.209.1609362075881; Wed, 30 Dec 2020 13:01:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609362075; cv=none; d=google.com; s=arc-20160816; b=U3Oh3/bEpGYU0YVOyy533hEOWAyPTjIEsK18RKRsyv1sRwAfA7AkT/tM6B3b3VVFQj N25YIh4yopY+A6l5f2zZQ3lhZGdxXhFLMRiUN+qHu9Fp3nlzPnw8XUSL8JUsxnx+geUs HdYpyZYiQ9m/uhfk3UOYpmj449+6KAvNmFFZvyJ9CeHIvrYCDBG5KHaB6wmCsClt+biF Koc3tcP5NyGIwdGbwmtgRyYB0iv97l0hXUSKWGf5/ozvIyGIwkrlq4I1OLTHABdG8sAR BnPK92fMf8OS2avOw5UclfkMC6CLuWUv9K5Y+pd45cvjJ/ZKrrgbX5P36KCpwN6W3zry FH9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lDaf9gK/5CMnrHmaEEdNBnavCV6ONasVpqtwDHwq9uQ=; b=lB7TGg4ptRljSnsXSU/4HwT0T7mDIAkkfiy5ht0P4FGQgRbAEzZQvuiQrk+eux/zWY GBceR00A3JwLLlWBk79Ryd6Km0tItloOjErrvg0jT+llgOmH6zwWF5KfBTpgWByyNgDJ AJR7m+xwyHy8OtT6r564bKPb45s1YzaWIK2hduBucs7UuX4Dc2xNKqbs+ewZKEAzYk3D HFqk8saoi/E4nL03DMJuWZ7IHxI41wTcFlgxVwXO9iCToNXpueuHQ3dcIuzqdgzCnqeM Evu8bvl12JnEAX71OT+cj2AwPykYUF4G5eaZw1r4ZQ+9JDoMMR2hQL2fsXIX3mY8et8Q a2DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SEz4riUp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq5si369462edb.200.2020.12.30.13.00.52; Wed, 30 Dec 2020 13:01:15 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=SEz4riUp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726420AbgL3U7l (ORCPT + 99 others); Wed, 30 Dec 2020 15:59:41 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:20760 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726323AbgL3U7l (ORCPT ); Wed, 30 Dec 2020 15:59:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609361894; 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=lDaf9gK/5CMnrHmaEEdNBnavCV6ONasVpqtwDHwq9uQ=; b=SEz4riUpY0XFouR1UUBnQISOrewKN0lqd6RBx9IXkyLBiMMBEKYGxY6vHWW/20+idShTDr iN5Tu5rstwvQ135NSbZYJquzixcYAJ2XjXeRORE4sufQZZAJ+OQYvMv3FDApZfKESdVE0m Y036NZ1PAbkg75jNO+sV98gki4ve1bs= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-375-7ZiwI4OhPjarpddsBsirpw-1; Wed, 30 Dec 2020 15:58:12 -0500 X-MC-Unique: 7ZiwI4OhPjarpddsBsirpw-1 Received: by mail-wm1-f71.google.com with SMTP id g82so2919221wmg.6 for ; Wed, 30 Dec 2020 12:58:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=lDaf9gK/5CMnrHmaEEdNBnavCV6ONasVpqtwDHwq9uQ=; b=rJydsMsO4+q26xkrvJWw1j82d5qIQ18und/Q60nag9CTr+PgZKmqTD7zIvNmjkjOKX j8MYBMXu1787UEIlCg/2u9BCtetLGZ3ns03x1vqTNQZrVuobMwUgK0mmhOnQcxYINmYH YItkPaLI1PtSHLnwWDSpj7lNeEvCvL3ipQAS9ZSdE0cH8TaoOwNW59cLcRdwsn1HJtBB MClep+IhZlFg+TsqVTHXb2tmag+n5fB749969LGwqFxBkmrpmFMJd7mBROgT2FgK8DJi U4iRLHkw+QPrvDQertTTdE70Durf4zAkzSG/kNfQ7YSDFbyQTrQYkvoDKWfn8I0qsNFy iA8Q== X-Gm-Message-State: AOAM533O3whKGgStEmQw+6rdLz2VfVJHBBLQnOhvqH5lAhCDrkH3GD1Q lxOq1TMwI6XQZxIlbNrNnrAX1M6NicO3bHZMgtVzv5UpUBPV4PLwaWF3+xXXxf1/3hNgZ9DvxSo aR8vPj2r/unQhqcFqmbW9r39D X-Received: by 2002:a1c:5447:: with SMTP id p7mr9088162wmi.116.1609361891275; Wed, 30 Dec 2020 12:58:11 -0800 (PST) X-Received: by 2002:a1c:5447:: with SMTP id p7mr9088150wmi.116.1609361891091; Wed, 30 Dec 2020 12:58:11 -0800 (PST) Received: from redhat.com (bzq-79-178-32-166.red.bezeqint.net. [79.178.32.166]) by smtp.gmail.com with ESMTPSA id s12sm8405138wmh.29.2020.12.30.12.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Dec 2020 12:58:10 -0800 (PST) Date: Wed, 30 Dec 2020 15:58:07 -0500 From: "Michael S. Tsirkin" To: Arseny Krasnov Cc: Stefan Hajnoczi , Stefano Garzarella , Jason Wang , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] vhost/vsock: support for SOCK_SEQPACKET socket. Message-ID: <20201230155742-mutt-send-email-mst@kernel.org> References: <20201229110634.275024-1-arseny.krasnov@kaspersky.com> <20201230155410-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201230155410-mutt-send-email-mst@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 30, 2020 at 03:56:03PM -0500, Michael S. Tsirkin wrote: > On Tue, Dec 29, 2020 at 02:06:33PM +0300, Arseny Krasnov wrote: > > This patch simply adds transport ops and removes > > ignore of non-stream type of packets. > > > > Signed-off-by: Arseny Krasnov > > How is this supposed to work? virtio vsock at the moment > has byte level end to end credit accounting at the > protocol level. I suspect some protocol changes involving > more than this tweak would > be needed to properly support anything that isn't a stream. oh this was not threaded correctly so I did not see rest of patches. ignore this pls will respond there. > > --- > > drivers/vhost/vsock.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c > > index a483cec31d5c..4a36ef1c52d0 100644 > > --- a/drivers/vhost/vsock.c > > +++ b/drivers/vhost/vsock.c > > @@ -346,8 +346,7 @@ vhost_vsock_alloc_pkt(struct vhost_virtqueue *vq, > > return NULL; > > } > > > > - if (le16_to_cpu(pkt->hdr.type) == VIRTIO_VSOCK_TYPE_STREAM) > > - pkt->len = le32_to_cpu(pkt->hdr.len); > > + pkt->len = le32_to_cpu(pkt->hdr.len); > > > > /* No payload */ > > if (!pkt->len) > > @@ -416,6 +415,9 @@ static struct virtio_transport vhost_transport = { > > .stream_is_active = virtio_transport_stream_is_active, > > .stream_allow = virtio_transport_stream_allow, > > > > + .seqpacket_seq_send_len = virtio_transport_seqpacket_seq_send_len, > > + .seqpacket_seq_get_len = virtio_transport_seqpacket_seq_get_len, > > + > > .notify_poll_in = virtio_transport_notify_poll_in, > > .notify_poll_out = virtio_transport_notify_poll_out, > > .notify_recv_init = virtio_transport_notify_recv_init, > > -- > > 2.25.1