[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/7] migration/rdma: Fix save_page method to fail on polling error
- To: Markus Armbruster <armbru@xxxxxxxxxx>, "qemu-devel@xxxxxxxxxx" <qemu-devel@xxxxxxxxxx>
- From: "Zhijian Li (Fujitsu)" <lizhijian@xxxxxxxxxxx>
- Date: Wed, 6 Sep 2023 03:48:05 +0000
- Accept-language: en-US, zh-CN
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fujitsu.com; dmarc=pass action=none header.from=fujitsu.com; dkim=pass header.d=fujitsu.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bpBP0SCNVBN2dnjUTUDUlSjAYUO+VNOZmIXw3uJFKBw=; b=cbbZ4XNHrP9Ero922b8ykV/kRLzFavw1YF5jnCINfGV30ZT6yg/Gpvx/XRSklMIxhc4ifSkuh3+CtNQqbXB2RO/kHJyXxArgIl1sNtheZWNv+L+MgGW4L6/aUv/OC8AM+rj/6jnkxOmMLj98HxJu5b0dZcqN7KhIUU9TsOb8VIqaH94B5zS/9xP5fYF/q91p9FlUofX5u3gAGvo6DhRyBQ+LyWTshkgDROE4agu/GdGoEBH+lKtXBqhZnUV/2Li8do6EcnMpBeuuho2c48dQr3vmTe5nEN1KjlIueqfXuKbTHxlR8tPUWjUVQ6+eDIIYkX0d4X5wBxJihYzEz5i87g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KtwHCt2h5m5qLpPP/0fgyouDOPRJQ/aHZRDl1twllczK6onlfuLgvzll8ZwgkhUPC+2n/YURa1VrVlRtXgoMTM1NEMaQuLsHaiTLlEB7LNM1g0sOMAjq8FwQnzMe8QOAS9de/54D+lgrtePTbuOFUKbwjF6p6W6vrS1+xLOpKF09dVwGHe5PzfWJYL5uhAg95MBn/WzIATDPZ/YR+I2fL6DoiwSl10kgUgxfvTtdywGpCTnn4CxrMwIvtjfrPjbYkQHA6AEOyV8P8h9Fpd76+lZjJCEtu8/4292uARFY5QsjsMrRfjdwSqte2xnsXTQPBbOKKL4Ej8iP4fvFwZ+tVQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=fujitsu.com;
- Cc: "kwolf@xxxxxxxxxx" <kwolf@xxxxxxxxxx>, "hreitz@xxxxxxxxxx" <hreitz@xxxxxxxxxx>, "eblake@xxxxxxxxxx" <eblake@xxxxxxxxxx>, "vsementsov@xxxxxxxxxxxxxx" <vsementsov@xxxxxxxxxxxxxx>, "jsnow@xxxxxxxxxx" <jsnow@xxxxxxxxxx>, "idryomov@xxxxxxxxx" <idryomov@xxxxxxxxx>, "pl@xxxxxxx" <pl@xxxxxxx>, "sw@xxxxxxxxxxx" <sw@xxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "anthony.perard@xxxxxxxxxx" <anthony.perard@xxxxxxxxxx>, "paul@xxxxxxx" <paul@xxxxxxx>, "pbonzini@xxxxxxxxxx" <pbonzini@xxxxxxxxxx>, "marcandre.lureau@xxxxxxxxxx" <marcandre.lureau@xxxxxxxxxx>, "berrange@xxxxxxxxxx" <berrange@xxxxxxxxxx>, "thuth@xxxxxxxxxx" <thuth@xxxxxxxxxx>, "philmd@xxxxxxxxxx" <philmd@xxxxxxxxxx>, "stefanha@xxxxxxxxxx" <stefanha@xxxxxxxxxx>, "fam@xxxxxxxxxx" <fam@xxxxxxxxxx>, "quintela@xxxxxxxxxx" <quintela@xxxxxxxxxx>, "peterx@xxxxxxxxxx" <peterx@xxxxxxxxxx>, "leobras@xxxxxxxxxx" <leobras@xxxxxxxxxx>, "kraxel@xxxxxxxxxx" <kraxel@xxxxxxxxxx>, "qemu-block@xxxxxxxxxx" <qemu-block@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "alex.bennee@xxxxxxxxxx" <alex.bennee@xxxxxxxxxx>, "peter.maydell@xxxxxxxxxx" <peter.maydell@xxxxxxxxxx>
- Delivery-date: Wed, 06 Sep 2023 04:48:37 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHZ3A7oCOHOGe53IUCQTH8HwpnDB7ANMcMA
- Thread-topic: [PATCH 1/7] migration/rdma: Fix save_page method to fail on polling error
On 31/08/2023 21:25, Markus Armbruster wrote:
> qemu_rdma_save_page() reports polling error with error_report(), then
> succeeds anyway. This is because the variable holding the polling
> status *shadows* the variable the function returns. The latter
> remains zero.
>
> Broken since day one, and duplicated more recently.
>
> Fixes: 2da776db4846 (rdma: core logic)
> Fixes: b390afd8c50b (migration/rdma: Fix out of order wrid)
Thanks for the fixes
> Signed-off-by: Markus Armbruster <armbru@xxxxxxxxxx>
Reviewed-by: Li Zhijian <lizhijian@xxxxxxxxxxx>
> ---
> migration/rdma.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/migration/rdma.c b/migration/rdma.c
> index ca430d319d..b2e869aced 100644
> --- a/migration/rdma.c
> +++ b/migration/rdma.c
> @@ -3281,7 +3281,8 @@ static size_t qemu_rdma_save_page(QEMUFile *f,
> */
> while (1) {
> uint64_t wr_id, wr_id_in;
> - int ret = qemu_rdma_poll(rdma, rdma->recv_cq, &wr_id_in, NULL);
> + ret = qemu_rdma_poll(rdma, rdma->recv_cq, &wr_id_in, NULL);
> +
> if (ret < 0) {
> error_report("rdma migration: polling error! %d", ret);
> goto err;
> @@ -3296,7 +3297,8 @@ static size_t qemu_rdma_save_page(QEMUFile *f,
>
> while (1) {
> uint64_t wr_id, wr_id_in;
> - int ret = qemu_rdma_poll(rdma, rdma->send_cq, &wr_id_in, NULL);
> + ret = qemu_rdma_poll(rdma, rdma->send_cq, &wr_id_in, NULL);
> +
> if (ret < 0) {
> error_report("rdma migration: polling error! %d", ret);
> goto err;
|