From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 5923D5F2A for ; Thu, 4 Oct 2018 07:46:59 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181004054658euoutp017155db63f4aa741cdc385749523b0373~aUasmDQHc0563205632euoutp01p for ; Thu, 4 Oct 2018 05:46:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181004054658euoutp017155db63f4aa741cdc385749523b0373~aUasmDQHc0563205632euoutp01p DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1538632018; bh=z7phqWNwDqr8kfTjL4npwleiO06vlQRQ193hac+lE3Q=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=TMG4LDu4b9OLXcO5uBwlLTWVmjFR4EcIi26Ip4hnGmG1Xk+nNv1cFoRvmPaCjC4OY 8m587IajGP98wjyyuYdxCzu1wK1XdCBGAi+UTh4/f3lYuD7XlYYal2nNHzR2RekK8U Z4Zo7U/u5K3AsYOqcPJNPHGdoAx7g/G4ZpesUEPQ= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181004054657eucas1p229184d1a6221034a239a1ed9ebe2f0dd~aUasKVhm32707827078eucas1p2t; Thu, 4 Oct 2018 05:46:57 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 9D.AA.04441.159A5BB5; Thu, 4 Oct 2018 06:46:57 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20181004054656eucas1p252be07faa7dab41e09c7133e223f4f6c~aUarRVz0w2351423514eucas1p2B; Thu, 4 Oct 2018 05:46:56 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20181004054656eusmtrp19281798ff7b976d16d465235535d0343~aUarAVAi-2805028050eusmtrp1Y; Thu, 4 Oct 2018 05:46:56 +0000 (GMT) X-AuditID: cbfec7f2-5c9ff70000001159-c9-5bb5a951a5ab Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 22.D9.04128.059A5BB5; Thu, 4 Oct 2018 06:46:56 +0100 (BST) Received: from [106.109.129.180] (unknown [106.109.129.180]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20181004054655eusmtip12be50e099a63dd3b73e6d8b47bade907~aUaqTCfVF2026020260eusmtip1_; Thu, 4 Oct 2018 05:46:55 +0000 (GMT) To: Maxime Coquelin , dev@dpdk.org, tiwei.bie@intel.com, zhihong.wang@intel.com, jfreimann@redhat.com, nicknickolaev@gmail.com, bruce.richardson@intel.com, alejandro.lucero@netronome.com Cc: dgilbert@redhat.com, stable@dpdk.org From: Ilya Maximets Date: Thu, 4 Oct 2018 08:49:15 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <9ab6a638-f89d-5509-fd99-7d4be219aa04@redhat.com> Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCKsWRmVeSWpSXmKPExsWy7djP87qBK7dGG6y6LGZx7tMyJosbq+wt 3n3azmTRu+0eu8WV9p/sFufWLGWxONa5h8Xi9MJrLBb/Ov6wW2xt+M9ksfniJCYHbo9fC5ay euycdZfdY/Gel0we07sfMnu833eVzaNvyyrGALYoLpuU1JzMstQifbsErozG3TvYC74JVjxq n87awNjJ38XIySEhYCIxufs7YxcjF4eQwApGiTc71jFBOF8YJS43NbNAOJ8ZJY6fnQ9UxgHW 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SQhLBAiceTbJCaQ hIjAHUaJLbPOMIIkmAU0JNZffcII0fGKSWLOx1Ngo9gEdCROrT4CVsQrYCfReaCBCcRmEVCR WLf4EliNqECExOrlL1ghagQlTs58wgJicwLVX/v5jxligbrEn3mXoGxxiaYvK1khbHmJ5q2z mScwCs1C0j4LScssJC2zkLQsYGRZxSiSWlqcm55bbKRXnJhbXJqXrpecn7uJERin24793LKD setd8CFGAQ5GJR7ejndbooVYE8uKK3MPMUpwMCuJ8Bou2BotxJuSWFmVWpQfX1Sak1p8iNEU 6LmJzFKiyfnAFJJXEm9oamhuYWlobmxubGahJM573qAySkggPbEkNTs1tSC1CKaPiYNTqoFx z/un9U6lGiqr3d97sEmp9GgfEb8j9F/jg4ykgQ2zVKnhJrkXvx7vfJxY9mVv2XH7yHDOdZvc n77qPHX2feqmLUyZHlZ/1ZyXzTgSG2FlFvw6j7eIu8b2+AvF3/dtVureTPbm7LG03t9+X/rK 7satl0pnzgnL+WneX3hIyuJc2nIlvg8G1+KVWIozEg21mIuKEwFEKSyl6QIAAA== Message-Id: <20181004054656eucas1p252be07faa7dab41e09c7133e223f4f6c~aUarRVz0w2351423514eucas1p2B@eucas1p2.samsung.com> X-CMS-MailID: 20181004054656eucas1p252be07faa7dab41e09c7133e223f4f6c X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20181002093714epcas1p2152f47240f9d18bea5f3da7b695b5037 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181002093714epcas1p2152f47240f9d18bea5f3da7b695b5037 References: <20181002093651.24795-1-maxime.coquelin@redhat.com> <20181002093651.24795-3-maxime.coquelin@redhat.com> <20181003132429eucas1p195b034c06ad265826eee360abc775cd8~aHA4HDRm11505315053eucas1p1U@eucas1p1.samsung.com> <9ab6a638-f89d-5509-fd99-7d4be219aa04@redhat.com> Subject: Re: [dpdk-dev] [PATCH v2 02/17] vhost: fix return code of messages requiring replies X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2018 05:46:59 -0000 On 03.10.2018 17:49, Maxime Coquelin wrote: > > > On 10/03/2018 03:26 PM, Ilya Maximets wrote: >> On 02.10.2018 12:36, Maxime Coquelin wrote: >>> VHOST_USER_GET_PROTOCOL_FEATURES, VHOST_USER_GET_VRING_BASE >>> and VHOST_USER_SET_LOG_BASE require replies, so their handlers >>> should return VH_RESULT_REPLY, not VH_RESULT_OK. >>> >>> Fixes: 2cfbbb86c62a ("vhost: unify message handling function signature") >>> >>> Signed-off-by: Maxime Coquelin >>> --- >>>   lib/librte_vhost/vhost_user.c | 6 +++--- >>>   1 file changed, 3 insertions(+), 3 deletions(-) >>> >>> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c >>> index 060b41893..ce0ac0098 100644 >>> --- a/lib/librte_vhost/vhost_user.c >>> +++ b/lib/librte_vhost/vhost_user.c >>> @@ -1161,7 +1161,7 @@ vhost_user_get_vring_base(struct virtio_net **pdev, >>>         msg->size = sizeof(msg->payload.state); >>>   -    return VH_RESULT_OK; >>> +    return VH_RESULT_REPLY; >>>   } >>>     /* >>> @@ -1218,7 +1218,7 @@ vhost_user_get_protocol_features(struct virtio_net **pdev, >>>       msg->payload.u64 = protocol_features; >>>       msg->size = sizeof(msg->payload.u64); >>>   -    return VH_RESULT_OK; >>> +    return VH_RESULT_REPLY; >>>   } >>>     static int >>> @@ -1298,7 +1298,7 @@ vhost_user_set_log_base(struct virtio_net **pdev, struct VhostUserMsg *msg) >>>         msg->size = sizeof(msg->payload.u64); >> >> Maybe we need to set size to zero? This message should not have >> "Slave payload" according to docs and QEMU does not check it. > > I agree with the fix, but it's here since the beginning, not related to > this series. I will add it at the beginning of the series though. OK. > > I think the spec could also be updated, to clarify what payload is > expected when VHOST_USER_PROTOCOL_F_LOG_SHMFD is negotiated. Yeah. There was an attempt few years ago, but it wasn't merged because of code changes, I guess: https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg03526.html > >> >>>   -    return VH_RESULT_OK; >>> +    return VH_RESULT_REPLY; >>>   } >>>     static int vhost_user_set_log_fd(struct virtio_net **pdev __rte_unused, >>>