From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B85DC433E0 for ; Mon, 22 Feb 2021 14:18:24 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C516664DB1 for ; Mon, 22 Feb 2021 14:18:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C516664DB1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5F064871C8; Mon, 22 Feb 2021 14:18:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YciPbqjzCCJw; Mon, 22 Feb 2021 14:18:22 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 78DC4871C3; Mon, 22 Feb 2021 14:18:22 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 53DD1C000B; Mon, 22 Feb 2021 14:18:22 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3A61EC0001 for ; Mon, 22 Feb 2021 14:18:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 124F06F52F for ; Mon, 22 Feb 2021 14:18:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id alkZZ6Nsm_BR for ; Mon, 22 Feb 2021 14:18:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id B223C6F51A for ; Mon, 22 Feb 2021 14:18:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614003498; 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=4dczqn3yvtGdaJ4ItxeNsO6mMvqpqPNPelEeJ/DM0z8=; b=iWq5VyMYa3YMcNumVycNHRm3vrQcS00SRTsH5TyeItS+9V1/CoHD/bFC1YugA4eR8YjBDq 9GAoyM0PRkeivF19heQZhTnf4ijF3YQapZURwuBqtwosjXA55/VMkbrDWOSPoLC3rDBPAK z856ZMeLiDy+iQiKVw09MH5XmJ55DOQ= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-598-8n5RqEWKNxS1g7CESV0_yQ-1; Mon, 22 Feb 2021 09:18:14 -0500 X-MC-Unique: 8n5RqEWKNxS1g7CESV0_yQ-1 Received: by mail-wr1-f69.google.com with SMTP id c16so4318883wro.21 for ; Mon, 22 Feb 2021 06:18:14 -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=4dczqn3yvtGdaJ4ItxeNsO6mMvqpqPNPelEeJ/DM0z8=; b=rD5yf1EwHFDHRo80gVrf/a/or7fmfTMuVrgE2QK7JFHtwDCRPRcp/k/QG78ZqweCkE 9Xc+kZgNrXL15taaNfASKybPtczvnvF/wt2/3LqK7/XS9t0iZN+L/fRfKuePS4HuhOJ8 fERR/QL2GyLmFhArnY2cbsCHgGGoexFT4Sz5YBqbQaktSUW62pNkxfGHvoKCnlEqEjUw Mn+1N4h0xG2Kqn0ClH3nOHA49JJGs3Laol60FDLBesUW1n7TjXs2yJ2kfocpj3s/u9Np FozVmr45PZpKpmCFWzQjbABOLiUYsAJGhBP6izxwuEYNdk9a9sOesvi3tSVgZzKJG/B0 6woA== X-Gm-Message-State: AOAM53232RpupCKUzig39miO9G+THR5Q+x1WvwAzeb28LxXnj+mOOEGB fqsg02ycS1qHOhRnH7C6sI/UToOLh/8xXaO/XsUqeRZHxl+YaDHXpviUPeheFSxncUBRS1kBWZW eJT72sQxya4XchNzY5YRbJ2dwfR1mhqbLGNMhcWHNcg== X-Received: by 2002:adf:9031:: with SMTP id h46mr22072620wrh.19.1614003493371; Mon, 22 Feb 2021 06:18:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3ZEW5m0LD2K3iKZRRGxx+XdzwaUrxqdU5eFOuJolpSBSUTb9lIA0xW6yKMdbESnoC8aNNjw== X-Received: by 2002:adf:9031:: with SMTP id h46mr22072591wrh.19.1614003493149; Mon, 22 Feb 2021 06:18:13 -0800 (PST) Received: from steredhat (host-79-34-249-199.business.telecomitalia.it. [79.34.249.199]) by smtp.gmail.com with ESMTPSA id q25sm20813231wmq.15.2021.02.22.06.18.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Feb 2021 06:18:12 -0800 (PST) Date: Mon, 22 Feb 2021 15:18:09 +0100 From: Stefano Garzarella To: Arseny Krasnov Subject: Re: [RFC PATCH v5 08/19] af_vsock: update comments for stream sockets Message-ID: <20210222141809.6wcvglet4cpmcjlg@steredhat> References: <20210218053347.1066159-1-arseny.krasnov@kaspersky.com> <20210218053852.1067811-1-arseny.krasnov@kaspersky.com> MIME-Version: 1.0 In-Reply-To: <20210218053852.1067811-1-arseny.krasnov@kaspersky.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=sgarzare@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: Andra Paraschiv , kvm@vger.kernel.org, "Michael S. Tsirkin" , netdev@vger.kernel.org, stsp2@yandex.ru, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, oxffffaa@gmail.com, Norbert Slusarek , Stefan Hajnoczi , Colin Ian King , Jakub Kicinski , "David S. Miller" , Jorgen Hansen X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Thu, Feb 18, 2021 at 08:38:48AM +0300, Arseny Krasnov wrote: >This replaces 'stream' to 'connect oriented' in comments as SEQPACKET is ^ connection You forgot to update the commit message :-) With that fixed: Reviewed-by: Stefano Garzarella >also connect oriented. > >Signed-off-by: Arseny Krasnov >--- > net/vmw_vsock/af_vsock.c | 31 +++++++++++++++++-------------- > 1 file changed, 17 insertions(+), 14 deletions(-) > >diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c >index f4b02c6d35d1..f1bf6a5ad15e 100644 >--- a/net/vmw_vsock/af_vsock.c >+++ b/net/vmw_vsock/af_vsock.c >@@ -415,8 +415,8 @@ static void vsock_deassign_transport(struct vsock_sock *vsk) > > /* Assign a transport to a socket and call the .init transport callback. > * >- * Note: for stream socket this must be called when vsk->remote_addr is set >- * (e.g. during the connect() or when a connection request on a listener >+ * Note: for connection oriented socket this must be called when vsk->remote_addr >+ * is set (e.g. during the connect() or when a connection request on a listener > * socket is received). > * The vsk->remote_addr is used to decide which transport to use: > * - remote CID == VMADDR_CID_LOCAL or g2h->local_cid or VMADDR_CID_HOST if >@@ -470,10 +470,10 @@ int vsock_assign_transport(struct vsock_sock *vsk, struct vsock_sock *psk) > return 0; > > /* transport->release() must be called with sock lock acquired. >- * This path can only be taken during vsock_stream_connect(), >- * where we have already held the sock lock. >- * In the other cases, this function is called on a new socket >- * which is not assigned to any transport. >+ * This path can only be taken during vsock_connect(), where we >+ * have already held the sock lock. In the other cases, this >+ * function is called on a new socket which is not assigned to >+ * any transport. > */ > vsk->transport->release(vsk); > vsock_deassign_transport(vsk); >@@ -658,9 +658,10 @@ static int __vsock_bind_connectible(struct vsock_sock *vsk, > > vsock_addr_init(&vsk->local_addr, new_addr.svm_cid, new_addr.svm_port); > >- /* Remove stream sockets from the unbound list and add them to the hash >- * table for easy lookup by its address. The unbound list is simply an >- * extra entry at the end of the hash table, a trick used by AF_UNIX. >+ /* Remove connection oriented sockets from the unbound list and add them >+ * to the hash table for easy lookup by its address. The unbound list >+ * is simply an extra entry at the end of the hash table, a trick used >+ * by AF_UNIX. > */ > __vsock_remove_bound(vsk); > __vsock_insert_bound(vsock_bound_sockets(&vsk->local_addr), vsk); >@@ -951,10 +952,10 @@ static int vsock_shutdown(struct socket *sock, int mode) > if ((mode & ~SHUTDOWN_MASK) || !mode) > return -EINVAL; > >- /* If this is a STREAM socket and it is not connected then bail out >- * immediately. If it is a DGRAM socket then we must first kick the >- * socket so that it wakes up from any sleeping calls, for example >- * recv(), and then afterwards return the error. >+ /* If this is a connection oriented socket and it is not connected then >+ * bail out immediately. If it is a DGRAM socket then we must first >+ * kick the socket so that it wakes up from any sleeping calls, for >+ * example recv(), and then afterwards return the error. > */ > > sk = sock->sk; >@@ -1783,7 +1784,9 @@ static int vsock_connectible_sendmsg(struct socket *sock, struct msghdr *msg, > > transport = vsk->transport; > >- /* Callers should not provide a destination with stream sockets. */ >+ /* Callers should not provide a destination with connection oriented >+ * sockets. >+ */ > if (msg->msg_namelen) { > err = sk->sk_state == TCP_ESTABLISHED ? -EISCONN : -EOPNOTSUPP; > goto out; >-- >2.25.1 > _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization