From patchwork Sun Jun 18 06:24:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arseniy Krasnov X-Patchwork-Id: 109571 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2318929vqr; Sat, 17 Jun 2023 23:33:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5HBhWvHg9fn/y8+QP5M3feNdH3NHCVnZGDHL4GclXZ1vreMo/2MBafpr15EESg+kMLMP2j X-Received: by 2002:a05:6808:10c3:b0:398:560c:a4c5 with SMTP id s3-20020a05680810c300b00398560ca4c5mr10333822ois.55.1687070026073; Sat, 17 Jun 2023 23:33:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687070026; cv=none; d=google.com; s=arc-20160816; b=NxNrw4j2nlkIcM87DyPBr1feodmnplC5tphzZcX1dmVdmBgaa7LFpxeT9mnGBoiBkU oy2AlxAt3GCUTLS83bHCnIvbW8cEhRuKeBGB2vNrjNmyua5qDb15/1nBNiigfzsA3aMT WQArSZEoFdTaoKM/OBOOPP4Q1rhz9Taw3VsAXiLVm+1z+gvMiNiddg3oh+5NNh87iMCc 6qtx3kimPUi0UGf3qAeJv2ngaioZkWzgEXdpx0LKcqHYGnrbHBLvX6/vy6ErEIOK1PjL DV/sOLhY1bXoJJ+Jd8l1zOTmX74SC+p04JbJPWLUZFEzxEjrPN08i8kmo6DRwMK9dBd4 ncxA== 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=4XeoB7uPdy2JNi6czfBT5EehboC5nIlTIqZ7j5KzL3A=; b=aDCBzjPOTYsvtkv4uBYI61TnHZF/yr8hKwBeZROyc9ljasPz4ApyOAfRge5K9QGXI5 bw43EmZEUfUmuIwFsg+e3f0zy10pJUZigSewDBCMNVf3LeDlAbNcW6jxtlwtyjghd02V bWcvqZPIOpnZEh4Ul9/bIUGFhbZTY9DwXSZrpVz6atajaJT9eVXsLFwLn4JwR6cseo7v g1hWIAFSltMyGXFVPS4J2QXaAnG2wvh5tjs8GTWgieeAqdd1UkkwkqVnxOtes4vkqreo NytGS/Erb0icePmsKpsec5HMLQhdxT1+qVTVdQn2P3qfAyGFuy0q8GGbEYr36YwLy5SO dacA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=Aq8WrdxG; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n17-20020a170902e55100b001b548730447si2487385plf.414.2023.06.17.23.33.32; Sat, 17 Jun 2023 23:33:46 -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=@sberdevices.ru header.s=mail header.b=Aq8WrdxG; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229619AbjFRGaO (ORCPT + 99 others); Sun, 18 Jun 2023 02:30:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229579AbjFRGaM (ORCPT ); Sun, 18 Jun 2023 02:30:12 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 703AC1719; Sat, 17 Jun 2023 23:30:06 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 529DE5FD24; Sun, 18 Jun 2023 09:30:02 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1687069802; bh=4XeoB7uPdy2JNi6czfBT5EehboC5nIlTIqZ7j5KzL3A=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Aq8WrdxGMlS1oZqdbVFXPRwGxTmxyQZvKzGkLtBRjN8QJLa1ZSxUnqn+2tnPZN0Uv P8UUJyNycKTAXUfHX9ba5Shg4Zcb1wfCcF0Qf1s45NE/QeGJ3On1Ql/WU2CPh8NbdZ IQrwxjQ6Fix4/zHUJz5Ox/sOuO96pU1T8q/5ibBL3N+8HyaSt6B+Hb3ba8G8ZhtYmX vmsrwKGxX/xTfn2vY1tWronMN3aOyKhzMpmTTwFVjz2+q2rJFKnXVl6MYdDt0teW5v yYvF4trBxsgSro5y1+YYImgLOTuJGK2ZMafoGfnnW/7unfWbJqfCIMiu7L+8waB2qp Jmazh8ElzIyJw== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) by mx.sberdevices.ru (Postfix) with ESMTP; Sun, 18 Jun 2023 09:30:02 +0300 (MSK) From: Arseniy Krasnov To: Stefan Hajnoczi , Stefano Garzarella , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Jason Wang , Bobby Eshleman CC: , , , , , , , Arseniy Krasnov Subject: [RFC PATCH v1 1/4] virtio/vsock: rework MSG_PEEK for SOCK_STREAM Date: Sun, 18 Jun 2023 09:24:48 +0300 Message-ID: <20230618062451.79980-2-AVKrasnov@sberdevices.ru> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20230618062451.79980-1-AVKrasnov@sberdevices.ru> References: <20230618062451.79980-1-AVKrasnov@sberdevices.ru> MIME-Version: 1.0 X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/06/18 01:53:00 #21507494 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769021139305267908?= X-GMAIL-MSGID: =?utf-8?q?1769021139305267908?= This reworks current implementation of MSG_PEEK logic: 1) Replaces 'skb_queue_walk_safe()' with 'skb_queue_walk()'. There is no need in the first one, as there are no removes of skb in loop. 2) Removes nested while loop - MSG_PEEK logic could be implemented without it: just iterate over skbs without removing it and copy data from each until destination buffer is not full. Signed-off-by: Arseniy Krasnov Reviewed-by: Bobby Eshleman --- net/vmw_vsock/virtio_transport_common.c | 41 ++++++++++++------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index b769fc258931..2ee40574c339 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -348,37 +348,34 @@ virtio_transport_stream_do_peek(struct vsock_sock *vsk, size_t len) { struct virtio_vsock_sock *vvs = vsk->trans; - size_t bytes, total = 0, off; - struct sk_buff *skb, *tmp; - int err = -EFAULT; + struct sk_buff *skb; + size_t total = 0; + int err; spin_lock_bh(&vvs->rx_lock); - skb_queue_walk_safe(&vvs->rx_queue, skb, tmp) { - off = 0; + skb_queue_walk(&vvs->rx_queue, skb) { + size_t bytes; - if (total == len) - break; + bytes = len - total; + if (bytes > skb->len) + bytes = skb->len; - while (total < len && off < skb->len) { - bytes = len - total; - if (bytes > skb->len - off) - bytes = skb->len - off; + spin_unlock_bh(&vvs->rx_lock); - /* sk_lock is held by caller so no one else can dequeue. - * Unlock rx_lock since memcpy_to_msg() may sleep. - */ - spin_unlock_bh(&vvs->rx_lock); + /* sk_lock is held by caller so no one else can dequeue. + * Unlock rx_lock since memcpy_to_msg() may sleep. + */ + err = memcpy_to_msg(msg, skb->data, bytes); + if (err) + goto out; - err = memcpy_to_msg(msg, skb->data + off, bytes); - if (err) - goto out; + total += bytes; - spin_lock_bh(&vvs->rx_lock); + spin_lock_bh(&vvs->rx_lock); - total += bytes; - off += bytes; - } + if (total == len) + break; } spin_unlock_bh(&vvs->rx_lock); From patchwork Sun Jun 18 06:24:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arseniy Krasnov X-Patchwork-Id: 109574 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2321894vqr; Sat, 17 Jun 2023 23:44:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4DF/V1TWR+PkD+6pgFM8icmenxQd3SZY3+vfnE2775EXVy+JGPJXhfKDERgmU2CprrQFET X-Received: by 2002:a05:6871:4417:b0:19e:c953:d854 with SMTP id nd23-20020a056871441700b0019ec953d854mr4815923oab.52.1687070657849; Sat, 17 Jun 2023 23:44:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687070657; cv=none; d=google.com; s=arc-20160816; b=ZRLJG3J2tjyQY7gMgDTf7X9kddW9pjovVeW1O/XCblgCellWjMIvABREBOZfXIA2B+ GTWhwbuHFd1FkxCcQiFVgena/XQ10sd+1XMsYyx9kR9LZOlK4rd1ifV/RZaoJki7rvkO 0KdDmtOcg+sT0GLMkhrwQ9JrohMpTsygitB75Ob6VPjUJsKMIhe7H9zkOY3hg2clasLM Xp9mMDny7gpK8KXQknFRilvMHD1RD4hz/0OFBfyE6V8S3qCVYiLUMrIBJcgCc4ED5UJt Wfjml/BqZH35VM96yaH4JT51HDrbHlUh29xF2x8TZQoMWj4ktucujsVqGwBLpZwBvLsQ jRVw== 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=9KIwX5m0AsbY8eFETkFbK8y/WZQO82su8tgmIiM0rvk=; b=VxoQtM4mXdYdFg7Ik6cs0aEgwXU6s6Y4Ur313kua6Y7QBfFrHvD3XPEL7yAXWHI4y6 EFU6IEwkEot9dLnkNv9grzshfA4NI1MbHHTXr1i4FY2H6cyHvuGI4kc3KqtJA2eaOuHq 74zhcY41/2oPC/IHRZGE7Ud2/EXDAZjRhuHO/TEF0REdB3iAOharw59vyWEhfAIwzmmU 7ILG8G6Irqep8BrB98wuUOsYZqzsSlNC9eOl/elaAdrcDdqSttRcPT+w8qGK8kJ5wtpn njnze/PvoGGxcfM0l65ER8Ud2N2apL9CvpAiDG0xNxSkmEr40SK4ds6SVaRenOgiriiR rihQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=oe5y8pf7; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a6552cb000000b00543fd615d2fsi14971545pgp.879.2023.06.17.23.44.01; Sat, 17 Jun 2023 23:44:17 -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=@sberdevices.ru header.s=mail header.b=oe5y8pf7; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229628AbjFRGaa (ORCPT + 99 others); Sun, 18 Jun 2023 02:30:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjFRGaM (ORCPT ); Sun, 18 Jun 2023 02:30:12 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6059B1710; Sat, 17 Jun 2023 23:30:06 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 7FA155FD25; Sun, 18 Jun 2023 09:30:02 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1687069802; bh=9KIwX5m0AsbY8eFETkFbK8y/WZQO82su8tgmIiM0rvk=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=oe5y8pf7qlvBMoNHAU3fzfQu1oOY315uLH+FTCBI1GZndpJn2SgvhR5uFxYqtsqFp 4OwWflv5kft8X4teM5xw8iUKlAOpm6SB2uUh2YF/G5/1a+1KiuI/ELi3Zz0nDnbyxi gnAmRZFV0JVVQb++XqBN/SePB4Yc2vDROIfRNKGHdb23Gf811ltG6TQSwu9soiIZgq ep7xvBWO9dhoF/CMfD1/oS9QKDQ4qR9MqxoOAxcBKOFaOihy+/iOPFNQ6TtxVDRhJC rxX1PjY7wgmgnb5w3UCibzbYHDPBx2UJXF0tjm/zr3WMuN+MNdLSuCeUDEWlVU+Wl+ 4CShUG/hIdP/A== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) by mx.sberdevices.ru (Postfix) with ESMTP; Sun, 18 Jun 2023 09:30:02 +0300 (MSK) From: Arseniy Krasnov To: Stefan Hajnoczi , Stefano Garzarella , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Jason Wang , Bobby Eshleman CC: , , , , , , , Arseniy Krasnov Subject: [RFC PATCH v1 2/4] virtio/vsock: support MSG_PEEK for SOCK_SEQPACKET Date: Sun, 18 Jun 2023 09:24:49 +0300 Message-ID: <20230618062451.79980-3-AVKrasnov@sberdevices.ru> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20230618062451.79980-1-AVKrasnov@sberdevices.ru> References: <20230618062451.79980-1-AVKrasnov@sberdevices.ru> MIME-Version: 1.0 X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/06/18 01:53:00 #21507494 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769021802130343498?= X-GMAIL-MSGID: =?utf-8?q?1769021802130343498?= This adds support of MSG_PEEK flag for SOCK_SEQPACKET type of socket. Difference with SOCK_STREAM is that this callback returns either length of the message or error. Signed-off-by: Arseniy Krasnov --- net/vmw_vsock/virtio_transport_common.c | 63 +++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index 2ee40574c339..352d042b130b 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -460,6 +460,63 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, return err; } +static ssize_t +virtio_transport_seqpacket_do_peek(struct vsock_sock *vsk, + struct msghdr *msg) +{ + struct virtio_vsock_sock *vvs = vsk->trans; + struct sk_buff *skb; + size_t total, len; + + spin_lock_bh(&vvs->rx_lock); + + if (!vvs->msg_count) { + spin_unlock_bh(&vvs->rx_lock); + return 0; + } + + total = 0; + len = msg_data_left(msg); + + skb_queue_walk(&vvs->rx_queue, skb) { + struct virtio_vsock_hdr *hdr; + + if (total < len) { + size_t bytes; + int err; + + bytes = len - total; + if (bytes > skb->len) + bytes = skb->len; + + spin_unlock_bh(&vvs->rx_lock); + + /* sk_lock is held by caller so no one else can dequeue. + * Unlock rx_lock since memcpy_to_msg() may sleep. + */ + err = memcpy_to_msg(msg, skb->data, bytes); + if (err) + return err; + + spin_lock_bh(&vvs->rx_lock); + } + + total += skb->len; + hdr = virtio_vsock_hdr(skb); + + if (le32_to_cpu(hdr->flags) & VIRTIO_VSOCK_SEQ_EOM) { + if (le32_to_cpu(hdr->flags) & VIRTIO_VSOCK_SEQ_EOR) + msg->msg_flags |= MSG_EOR; + + break; + } + } + + spin_unlock_bh(&vvs->rx_lock); + + return total; +} + static int virtio_transport_seqpacket_do_dequeue(struct vsock_sock *vsk, struct msghdr *msg, int flags) @@ -554,9 +611,9 @@ virtio_transport_seqpacket_dequeue(struct vsock_sock *vsk, int flags) { if (flags & MSG_PEEK) - return -EOPNOTSUPP; - - return virtio_transport_seqpacket_do_dequeue(vsk, msg, flags); + return virtio_transport_seqpacket_do_peek(vsk, msg); + else + return virtio_transport_seqpacket_do_dequeue(vsk, msg, flags); } EXPORT_SYMBOL_GPL(virtio_transport_seqpacket_dequeue); From patchwork Sun Jun 18 06:24:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arseniy Krasnov X-Patchwork-Id: 109573 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2320866vqr; Sat, 17 Jun 2023 23:40:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6kokZyAOGAwEY833VpYZLgHMkgN7PCPUT72KjQdDwfWPF7PEUGTmmKA/3xC5kIbhLH+SV/ X-Received: by 2002:a05:6870:44c1:b0:1a6:979f:2a2e with SMTP id t1-20020a05687044c100b001a6979f2a2emr4645913oai.13.1687070425651; Sat, 17 Jun 2023 23:40:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687070425; cv=none; d=google.com; s=arc-20160816; b=TUeiX2TYRFFVke2nLPTZVdv0vhM4LM4WCdihO5613qo9bmZ1MV/Lp0GEbJOKsjhKqw vNo6dkaX8cZ+G8pMxXtkboJN3e3WrDwGkMh6M15mzmk5kfq3fsUk5ot1SLOWTJnHNuR4 2kX8Qkk5ed6JJJmlhGcWWQzs6hykNlqCvEZYYVpKnG7ynaXJEyAZgtxP9h6LFiESvBUm WUTaGO28iykBvzQT7glbcs7VRbeDNKTrbCJmTLakchIl668XsPngwKLU0xIHeNDGB5i8 RdFOBQxN68Lf7trXmL6OMloSgrlaKAv6AgVBulPswdB1rWWZKEOCPyyyVQ8S7j2kz8IR jgaA== 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=C0ocaakdqj4G3FMGCAU0A4MaUUuY31aUi2qpmz1hgcU=; b=PaLV3NLuE0NcK9vyE5kGGreG04GC2faYMr3Z6+6+ofOFwlXG2LYHGtJRJ+fq2brztI B81p5qEALt9K84ckuynG51tr0/iDUCjMca0j63jfdmiGYVp/gw3iNu5nZZLEZ/h/C+tQ RL4ntPdUQhpuYiwqaxwif+hRIXr4f5tNUMqR1KpYpXus34iSz1/a9cKvZJU16MRr1qNp 1PKDdBcDjYQ4Hwnwdte0PMnIkU7CIVmjrSBbP3eZIqQRanwT1Abpc7ZEYAwuVt2MM4Ev bBT53P3rx2SFYzNOzCeEjs6ahLR4ZnasF6QRPrRC9wfpg2ClJAdRg8H7uLIIh855T4jF +rVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b="j2iKr/dS"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a6552cb000000b00543fd615d2fsi14971545pgp.879.2023.06.17.23.40.09; Sat, 17 Jun 2023 23:40:25 -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=@sberdevices.ru header.s=mail header.b="j2iKr/dS"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229480AbjFRGa1 (ORCPT + 99 others); Sun, 18 Jun 2023 02:30:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbjFRGaM (ORCPT ); Sun, 18 Jun 2023 02:30:12 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60538170F; Sat, 17 Jun 2023 23:30:06 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id ABF615FD26; Sun, 18 Jun 2023 09:30:02 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1687069802; bh=C0ocaakdqj4G3FMGCAU0A4MaUUuY31aUi2qpmz1hgcU=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=j2iKr/dSCjoUXGFex1Yk7pFgJmAUXTCmgO4d+ft9wjT/H2AYTr8TO174awZUKn+bB s6WR3ZK9xJAC5NTJxEjr7WUK26PkGMBf6YDJIKqyOVyhTb00qoNQLAI+Q/TWU2+NwA 2awTKu25ZBr5YpYM0SQyMYVbDy0OWRSeuckE+Ew9rljlU2fxgU+s1BjARX+NheEkK2 SBgQMU0/H/j7RRgdZiqLABMNGO8O+3UNaHHB8vf4KVTOUd8SfQ1Y+az+oLJbGnEhtw dP3vdPUXSld7BkukGxhR11sSdqCQ0yodgCd2dl7UdMgZ/cUltuHDutOT34LTQMXqLp 4pTW2oOcKIzkQ== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) by mx.sberdevices.ru (Postfix) with ESMTP; Sun, 18 Jun 2023 09:30:02 +0300 (MSK) From: Arseniy Krasnov To: Stefan Hajnoczi , Stefano Garzarella , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Jason Wang , Bobby Eshleman CC: , , , , , , , Arseniy Krasnov Subject: [RFC PATCH v1 3/4] vsock/test: rework MSG_PEEK test for SOCK_STREAM Date: Sun, 18 Jun 2023 09:24:50 +0300 Message-ID: <20230618062451.79980-4-AVKrasnov@sberdevices.ru> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20230618062451.79980-1-AVKrasnov@sberdevices.ru> References: <20230618062451.79980-1-AVKrasnov@sberdevices.ru> MIME-Version: 1.0 X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/06/18 01:53:00 #21507494 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769021558665504837?= X-GMAIL-MSGID: =?utf-8?q?1769021558665504837?= This new version makes test more complicated by adding empty read, partial read and data comparisons between MSG_PEEK and normal reads. Signed-off-by: Arseniy Krasnov --- tools/testing/vsock/vsock_test.c | 66 ++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 3 deletions(-) diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c index ac1bd3ac1533..104ac102e411 100644 --- a/tools/testing/vsock/vsock_test.c +++ b/tools/testing/vsock/vsock_test.c @@ -255,9 +255,13 @@ static void test_stream_multiconn_server(const struct test_opts *opts) close(fds[i]); } +#define MSG_PEEK_BUF_LEN 64 + static void test_stream_msg_peek_client(const struct test_opts *opts) { + unsigned char buf[MSG_PEEK_BUF_LEN]; int fd; + int i; fd = vsock_stream_connect(opts->peer_cid, 1234); if (fd < 0) { @@ -265,12 +269,21 @@ static void test_stream_msg_peek_client(const struct test_opts *opts) exit(EXIT_FAILURE); } - send_byte(fd, 1, 0); + for (i = 0; i < sizeof(buf); i++) + buf[i] = rand() & 0xFF; + + control_expectln("SRVREADY"); + + send(fd, buf, sizeof(buf), 0); close(fd); } static void test_stream_msg_peek_server(const struct test_opts *opts) { + unsigned char buf_half[MSG_PEEK_BUF_LEN / 2]; + unsigned char buf_normal[MSG_PEEK_BUF_LEN]; + unsigned char buf_peek[MSG_PEEK_BUF_LEN]; + ssize_t res; int fd; fd = vsock_stream_accept(VMADDR_CID_ANY, 1234, NULL); @@ -279,8 +292,55 @@ static void test_stream_msg_peek_server(const struct test_opts *opts) exit(EXIT_FAILURE); } - recv_byte(fd, 1, MSG_PEEK); - recv_byte(fd, 1, 0); + /* Peek from empty socket. */ + res = recv(fd, buf_peek, sizeof(buf_peek), MSG_PEEK | MSG_DONTWAIT); + if (res != -1) { + fprintf(stderr, "expected recv(2) failure, got %zi\n", res); + exit(EXIT_FAILURE); + } + + if (errno != EAGAIN) { + perror("EAGAIN expected"); + exit(EXIT_FAILURE); + } + + control_writeln("SRVREADY"); + + /* Peek part of data. */ + res = recv(fd, buf_half, sizeof(buf_half), MSG_PEEK); + if (res != sizeof(buf_half)) { + fprintf(stderr, "recv(2) + MSG_PEEK, expected %zu, got %zi\n", + sizeof(buf_half), res); + exit(EXIT_FAILURE); + } + + /* Peek whole data. */ + res = recv(fd, buf_peek, sizeof(buf_peek), MSG_PEEK); + if (res != sizeof(buf_peek)) { + fprintf(stderr, "recv(2) + MSG_PEEK, expected %zu, got %zi\n", + sizeof(buf_peek), res); + exit(EXIT_FAILURE); + } + + /* Compare partial and full peek. */ + if (memcmp(buf_half, buf_peek, sizeof(buf_half))) { + fprintf(stderr, "Partial peek data mismatch\n"); + exit(EXIT_FAILURE); + } + + res = recv(fd, buf_normal, sizeof(buf_normal), 0); + if (res != sizeof(buf_normal)) { + fprintf(stderr, "recv(2), expected %zu, got %zi\n", + sizeof(buf_normal), res); + exit(EXIT_FAILURE); + } + + /* Compare full peek and normal read. */ + if (memcmp(buf_peek, buf_normal, sizeof(buf_peek))) { + fprintf(stderr, "Full peek data mismatch\n"); + exit(EXIT_FAILURE); + } + close(fd); } From patchwork Sun Jun 18 06:24:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arseniy Krasnov X-Patchwork-Id: 109572 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2320174vqr; Sat, 17 Jun 2023 23:38:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6aKaR4j88NpzouXvIFgZG0qM6JfqgaKVFsVc+bO9rk1y3pI9yaKmwhR5m3DvzNYRbMlSg1 X-Received: by 2002:a05:6a20:1601:b0:11f:8a0e:e0cb with SMTP id l1-20020a056a20160100b0011f8a0ee0cbmr4938281pzj.15.1687070279814; Sat, 17 Jun 2023 23:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687070279; cv=none; d=google.com; s=arc-20160816; b=kCxDkTw8YoM24kUVhaYwC2WanIZW0cNfn/CCjIuhwRTk5v3goO9T2uef8iBVMBkrRP G0CD5LTnF26ukPpie/zomtiud9hGo8MWXXfeqRcT45u05qHQa28W1dNbPdRwiRmH8siV JcGA3W48zhvsiiOQDB5JmJIPZ7lVKadDq20hijqpjOyQ0+3QwRXqe3iokaok7703LliJ I/kgLn3+ZypjIjDM+EqR+N+47yQWlzPZBD7ua7xgmvEQu9hnx31U/v+IMNbO4ONpe2wV dHEUnf/Ix8pWGevGLiiY81qfNI4aP0e0HYHE6fSMd6TJFT/eROSM6SJr2kyPNSQbME8f 6cXg== 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=zgsAeO7ZZncpPTynVaz+VDbdNBDA85YSMh2T8X4pUbw=; b=vXTVUMu4dD/f+SdsmxMNoyDWEcDMOqcUMJd9wvjXYKIurc9ce/vaq0sinfVVV3PT7A i/tElV//K0QnmUUvLhf1+7oZAN4VGmBWfT6VxZ3VjPGJ6vdjm2YxmD11uSH+22/BmibQ wSJWyAIyS1+LSL4vGSHOPc1cfluhBgnMS7X265AoGXb6FpavFBJQLSU4RnvtGLfOS/ig NdfmUdVwRnpt1D9DVVly3TKNcVtpFuS7fiWtnBYDD9bp6yU7O3egAWC3E9sn0Exscc78 1uXI/cy5EFKnSD2xoopC/dULwBI5GAxRkKePvxKwNqD8AX72itxAyRayM2A82F4CownH VVzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=G0gbPFZR; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a6552cb000000b00543fd615d2fsi14971545pgp.879.2023.06.17.23.37.45; Sat, 17 Jun 2023 23:37:59 -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=@sberdevices.ru header.s=mail header.b=G0gbPFZR; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229671AbjFRGaW (ORCPT + 99 others); Sun, 18 Jun 2023 02:30:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229571AbjFRGaM (ORCPT ); Sun, 18 Jun 2023 02:30:12 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77EDB171B; Sat, 17 Jun 2023 23:30:06 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id D9DD95FD27; Sun, 18 Jun 2023 09:30:02 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1687069802; bh=zgsAeO7ZZncpPTynVaz+VDbdNBDA85YSMh2T8X4pUbw=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=G0gbPFZRqGQHbjLXDcfSz97/AlUdJ/hYlNUzaQc7QF10oG0HeEYx/zuqoqlV1jjET 648yw2Y70OznSk4NQPFE+NmBfcGeMd4p+gM0ym85lxvKeFID49HNSOvbTnlN6wQD4u otMX2uT/MQ4vl89kxgWLsXajiDqz4Jiey+gvyi14OU6CtKsEcHdFB4Y4R/3U4zqmCf xPJiQHiiylOGiBbV8t4OdMdFXXLPW0WTi5ZnTU7Y/xu/HWiszk++pHCjwvUJOvZ8rl RpGBhXKP19QYIi1D73SwjoeQdSZDhnKtcLhtMriNxsRMCgHNayA7JDw23UGDGJQeKh MAnBFBOE2FGCg== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) by mx.sberdevices.ru (Postfix) with ESMTP; Sun, 18 Jun 2023 09:30:02 +0300 (MSK) From: Arseniy Krasnov To: Stefan Hajnoczi , Stefano Garzarella , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Jason Wang , Bobby Eshleman CC: , , , , , , , Arseniy Krasnov Subject: [RFC PATCH v1 4/4] vsock/test: MSG_PEEK test for SOCK_SEQPACKET Date: Sun, 18 Jun 2023 09:24:51 +0300 Message-ID: <20230618062451.79980-5-AVKrasnov@sberdevices.ru> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20230618062451.79980-1-AVKrasnov@sberdevices.ru> References: <20230618062451.79980-1-AVKrasnov@sberdevices.ru> MIME-Version: 1.0 X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/06/18 01:53:00 #21507494 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769021406003233078?= X-GMAIL-MSGID: =?utf-8?q?1769021406003233078?= This adds MSG_PEEK test for SOCK_SEQPACKET. It works in the same way as SOCK_STREAM test, except it also tests MSG_TRUNC flag. Signed-off-by: Arseniy Krasnov --- tools/testing/vsock/vsock_test.c | 58 +++++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 4 deletions(-) diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c index 104ac102e411..2bacd0ea1195 100644 --- a/tools/testing/vsock/vsock_test.c +++ b/tools/testing/vsock/vsock_test.c @@ -257,13 +257,18 @@ static void test_stream_multiconn_server(const struct test_opts *opts) #define MSG_PEEK_BUF_LEN 64 -static void test_stream_msg_peek_client(const struct test_opts *opts) +static void __test_msg_peek_client(const struct test_opts *opts, + bool seqpacket) { unsigned char buf[MSG_PEEK_BUF_LEN]; int fd; int i; - fd = vsock_stream_connect(opts->peer_cid, 1234); + if (seqpacket) + fd = vsock_seqpacket_connect(opts->peer_cid, 1234); + else + fd = vsock_stream_connect(opts->peer_cid, 1234); + if (fd < 0) { perror("connect"); exit(EXIT_FAILURE); @@ -278,7 +283,8 @@ static void test_stream_msg_peek_client(const struct test_opts *opts) close(fd); } -static void test_stream_msg_peek_server(const struct test_opts *opts) +static void __test_msg_peek_server(const struct test_opts *opts, + bool seqpacket) { unsigned char buf_half[MSG_PEEK_BUF_LEN / 2]; unsigned char buf_normal[MSG_PEEK_BUF_LEN]; @@ -286,7 +292,11 @@ static void test_stream_msg_peek_server(const struct test_opts *opts) ssize_t res; int fd; - fd = vsock_stream_accept(VMADDR_CID_ANY, 1234, NULL); + if (seqpacket) + fd = vsock_seqpacket_accept(VMADDR_CID_ANY, 1234, NULL); + else + fd = vsock_stream_accept(VMADDR_CID_ANY, 1234, NULL); + if (fd < 0) { perror("accept"); exit(EXIT_FAILURE); @@ -328,6 +338,21 @@ static void test_stream_msg_peek_server(const struct test_opts *opts) exit(EXIT_FAILURE); } + if (seqpacket) { + /* This type of socket supports MSG_TRUNC flag, + * so check it with MSG_PEEK. We must get length + * of the message. + */ + res = recv(fd, buf_half, sizeof(buf_half), MSG_PEEK | + MSG_TRUNC); + if (res != sizeof(buf_peek)) { + fprintf(stderr, + "recv(2) + MSG_PEEK | MSG_TRUNC, exp %zu, got %zi\n", + sizeof(buf_half), res); + exit(EXIT_FAILURE); + } + } + res = recv(fd, buf_normal, sizeof(buf_normal), 0); if (res != sizeof(buf_normal)) { fprintf(stderr, "recv(2), expected %zu, got %zi\n", @@ -344,6 +369,16 @@ static void test_stream_msg_peek_server(const struct test_opts *opts) close(fd); } +static void test_stream_msg_peek_client(const struct test_opts *opts) +{ + return __test_msg_peek_client(opts, false); +} + +static void test_stream_msg_peek_server(const struct test_opts *opts) +{ + return __test_msg_peek_server(opts, false); +} + #define SOCK_BUF_SIZE (2 * 1024 * 1024) #define MAX_MSG_SIZE (32 * 1024) @@ -1113,6 +1148,16 @@ static void test_stream_virtio_skb_merge_server(const struct test_opts *opts) close(fd); } +static void test_seqpacket_msg_peek_client(const struct test_opts *opts) +{ + return __test_msg_peek_client(opts, true); +} + +static void test_seqpacket_msg_peek_server(const struct test_opts *opts) +{ + return __test_msg_peek_server(opts, true); +} + static struct test_case test_cases[] = { { .name = "SOCK_STREAM connection reset", @@ -1188,6 +1233,11 @@ static struct test_case test_cases[] = { .run_client = test_stream_virtio_skb_merge_client, .run_server = test_stream_virtio_skb_merge_server, }, + { + .name = "SOCK_SEQPACKET MSG_PEEK", + .run_client = test_seqpacket_msg_peek_client, + .run_server = test_seqpacket_msg_peek_server, + }, {}, };