Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3048198pxb; Mon, 25 Jan 2021 05:47:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzxf6e1ITIPtAA3dRWAc5AY4l5mlf9sIgU7BLE0fCbI8MMWnAvtEsMi5oE6Y4qAdso99zb1 X-Received: by 2002:aa7:d0d4:: with SMTP id u20mr486291edo.203.1611582445328; Mon, 25 Jan 2021 05:47:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611582445; cv=none; d=google.com; s=arc-20160816; b=v79F5J5zs9WhSFB/YrR4fjUvw5gQ9wdjx0KOr7HcMxHfnC4Q0Q8uQgqlKhjb9QsRQ4 b2JQmJXtdJl05338c9zyuzQPOHADW5eQ7HZjnXKh/YrfzpHm7vMN4ELQNv7hEbzuNsN1 eHKco/6zF5Mb2AR0aFnLd9lPU1bpUBV/fW/JiDnfxG6qDRMvjZhpzG7j1t1t5q3y0BG6 Xph5PxRRz2ixuDUGvFpZyWl1BTBY0SSMv6CcKLrfbCaZOhMqtaqHRvuDM5+cRyjrfgMx O38oasYjL4Ce317ccnoSs/H8TW4FSIcfmMeicxm/nsZKBEbl2xvb7694QjijMakuUpZo ZVuQ== 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:date:subject:cc:to:from :dkim-signature; bh=UPNFqHG5wPwqpeODsx7bt2vrEjJNylHGQj1GcgZ4j7U=; b=y+aGbtG0KMhoApiyMSkKP6j/+x/CeqRzUhnHu4ZYZz/hH4h+IHyuyA+/yk6ALKbalG HztxP2Bx5vTAMPLoLnZelTZe7WWWWLUE3uPNXGzUG4zJPSw5jOJCt0FuW7NPT6jQp3L4 VJPdxmlUP/BX7PCxWfiKohxlrSiX17h9u+gi+wIYF0IMdVMbmFWm9Gigl/RTd24rrVhS MOFAwWP3vMHx7hHkJDMlhqYIp3JSzMgCG8WObadByQZN1GfHcnv9QrZ1yzIuN2Iw3tGn uo+q4UUEYa+0tuNjt3NB1tjl0RM3XsFBZNeNuoE5684cHqb4XAsBdnPMYTuD7yu2mpYa i2Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kaspersky.com header.s=mail header.b=Eq06FGc+; 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=REJECT sp=REJECT dis=NONE) header.from=kaspersky.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr1si5934898ejc.438.2021.01.25.05.47.01; Mon, 25 Jan 2021 05:47:25 -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=@kaspersky.com header.s=mail header.b=Eq06FGc+; 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=REJECT sp=REJECT dis=NONE) header.from=kaspersky.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729027AbhAYNoM (ORCPT + 99 others); Mon, 25 Jan 2021 08:44:12 -0500 Received: from mx12.kaspersky-labs.com ([91.103.66.155]:13372 "EHLO mx12.kaspersky-labs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729037AbhAYNnz (ORCPT ); Mon, 25 Jan 2021 08:43:55 -0500 Received: from relay12.kaspersky-labs.com (unknown [127.0.0.10]) by relay12.kaspersky-labs.com (Postfix) with ESMTP id 8DFB57611F; Mon, 25 Jan 2021 14:16:40 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kaspersky.com; s=mail; t=1611573400; bh=UPNFqHG5wPwqpeODsx7bt2vrEjJNylHGQj1GcgZ4j7U=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Eq06FGc+bz3TLFf5WZEh+CvjRVSE8Kp/TF6Crr2MWMNaw2dTrUdU5/4rKz43z9Vmf UmTZymwB2O+5+0Vlx/j4fLXKXkIKkjV/jW6mwWc7fzcoeNENLykl7bGO2qKzWY3phT UdPQPgSJKZ7niTxA9Gzjw6c3WZRTEsePdRdD+Ob0= Received: from mail-hq2.kaspersky.com (unknown [91.103.66.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client CN "mail-hq2.kaspersky.com", Issuer "Kaspersky MailRelays CA G3" (verified OK)) by mailhub12.kaspersky-labs.com (Postfix) with ESMTPS id 5C9A476101; Mon, 25 Jan 2021 14:16:40 +0300 (MSK) Received: from arseniy-pc.avp.ru (10.64.68.128) by hqmailmbx3.avp.ru (10.64.67.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2044.4; Mon, 25 Jan 2021 14:16:39 +0300 From: Arseny Krasnov To: Stefan Hajnoczi , Stefano Garzarella , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Jakub Kicinski , Arseny Krasnov , Andra Paraschiv , Colin Ian King , Jeff Vander Stoep CC: , , , , , Subject: [RFC PATCH v3 12/13] vhost/vsock: setup SEQPACKET ops for transport Date: Mon, 25 Jan 2021 14:16:31 +0300 Message-ID: <20210125111634.599817-1-arseny.krasnov@kaspersky.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210125110903.597155-1-arseny.krasnov@kaspersky.com> References: <20210125110903.597155-1-arseny.krasnov@kaspersky.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.64.68.128] X-ClientProxiedBy: hqmailmbx2.avp.ru (10.64.67.242) To hqmailmbx3.avp.ru (10.64.67.243) X-KSE-ServerInfo: hqmailmbx3.avp.ru, 9 X-KSE-AntiSpam-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 5.9.16, Database issued on: 01/25/2021 10:59:54 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 10 X-KSE-AntiSpam-Info: Lua profiles 161363 [Jan 25 2021] X-KSE-AntiSpam-Info: LuaCore: 421 421 33a18ad4049b4a5e5420c907b38d332fafd06b09 X-KSE-AntiSpam-Info: Version: 5.9.16.0 X-KSE-AntiSpam-Info: Envelope from: arseny.krasnov@kaspersky.com X-KSE-AntiSpam-Info: {Prob_from_in_msgid} X-KSE-AntiSpam-Info: {Tracking_date, moscow} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;kaspersky.com:7.1.1;127.0.0.199:7.1.2;arseniy-pc.avp.ru:7.1.1 X-KSE-AntiSpam-Info: Rate: 10 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Deterministic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 01/25/2021 11:02:00 X-KSE-AttachmentFiltering-Interceptor-Info: no applicable attachment filtering rules found X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 1/25/2021 10:11:00 AM X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-KSE-AttachmentFiltering-Interceptor-Info: no applicable attachment filtering rules found X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-KLMS-Rule-ID: 52 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Status: not scanned, disabled by settings X-KLMS-AntiSpam-Interceptor-Info: not scanned X-KLMS-AntiPhishing: Clean, bases: 2021/01/25 10:04:00 X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30, bases: 2021/01/25 10:14:00 #16023936 X-KLMS-AntiVirus-Status: Clean, skipped Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This also removes ignore of non-stream type of packets. Signed-off-by: Arseny Krasnov --- drivers/vhost/vsock.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index 5e78fb719602..4d60a99aed14 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -354,8 +354,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) @@ -424,6 +423,10 @@ 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, + .seqpacket_dequeue = virtio_transport_seqpacket_dequeue, + .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