From patchwork Mon Aug 6 13:29:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: 858585 jemmy X-Patchwork-Id: 953868 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="guz/MirT"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41kdq96DQfz9s0n for ; Mon, 6 Aug 2018 23:32:05 +1000 (AEST) Received: from localhost ([::1]:34121 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmfcB-0004yN-FI for incoming@patchwork.ozlabs.org; Mon, 06 Aug 2018 09:32:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmfaH-0003Rl-12 for qemu-devel@nongnu.org; Mon, 06 Aug 2018 09:30:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fmfaE-0008Ja-PZ for qemu-devel@nongnu.org; Mon, 06 Aug 2018 09:30:05 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:38965) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fmfaE-0008JF-Iy for qemu-devel@nongnu.org; Mon, 06 Aug 2018 09:30:02 -0400 Received: by mail-pg1-x542.google.com with SMTP id a11-v6so6234614pgw.6 for ; Mon, 06 Aug 2018 06:30:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WDpE7Whx2w0dBjEFqd4GAu9cy4lWySzxy6UXPm/z6eY=; b=guz/MirTCDKgHst5RGll/pVMMuyE16X4yEyOc/h5LuqONqhNpTVhFwHjMyqzKtN18c JZRbilHqvWIanfGXW38OwTdi8zi1tno3e8pN2D2oHrgzKSgBH7Eob2mI/82y2BUXLrhj dgkjnv6SeMXAQvdbxWEBLNvBC91aLy7ZbpclNMvQpx4FvtgdDOSaoOSJkmK6VgS+yU2C 6t/8NsknVrH277ZY7gpXuca9jX+LMbzM/NiVBV4Vp++QF6NJoOtmgee8VT8kD5zrs/Rz 0wwGlN3DFCnA+fY9oto5ItGXx9IXsoeARmqmcBaiY1oeCuhJiLryfFfo72O+pCn5pFN6 Kfqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WDpE7Whx2w0dBjEFqd4GAu9cy4lWySzxy6UXPm/z6eY=; b=LeUjM/8L92GVMMG7bW+YPD4uD/GLNP4R68btW3+N56qY2W9eCMW1bibOkKJM/AbYiI 0dNiRh05ES3EbcM99oq5zhuWuWStYbf+GSg/BAxZk8Qh6jWU16GZnOq3Ux9klc5T+J/W R1Iu8ZqHdeGegCl+rlY3Y1qLLyvkUrKSkymPYFt3c2xgWLAOLiuKndRSr6X8mHpdzXG8 teXlkm5R5o4rtOzhLX/C5fD/Ou62GQHafTeRId2Gp/VE07ytjHUMVNUa3j4N7r6Rrt2V F6CDFAtJlkvjgslfYMvtDv5pVu6tUS9y8MuDkrY+5xpQ4V+XY1hOSpR3XQ7GFqez08nt VE3g== X-Gm-Message-State: AOUpUlHAg8YaIuJIZNFKsu0Jcs1aHLNGhHeGz3quX/d7ub0mIdXgXoY2 JhbfllXLmvdOlWO07Nl1Ql0= X-Google-Smtp-Source: AAOMgpcF5zT3kxb86VrFTSNuDcjjiAuucLp7mQYGbj03j7UegpdTH87M5Aw6KSmYYBk/3cBaKzrg6g== X-Received: by 2002:a63:1644:: with SMTP id 4-v6mr14873284pgw.103.1533562201877; Mon, 06 Aug 2018 06:30:01 -0700 (PDT) Received: from VM_120_46_centos.localdomain ([119.28.87.64]) by smtp.gmail.com with ESMTPSA id f11-v6sm11756302pfa.131.2018.08.06.06.30.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Aug 2018 06:30:01 -0700 (PDT) From: Lidong Chen X-Google-Original-From: Lidong Chen To: zhang.zhanghailiang@huawei.com, quintela@redhat.com, dgilbert@redhat.com Date: Mon, 6 Aug 2018 21:29:36 +0800 Message-Id: <1533562177-16447-11-git-send-email-lidongchen@tencent.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1533562177-16447-1-git-send-email-lidongchen@tencent.com> References: <1533562177-16447-1-git-send-email-lidongchen@tencent.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::542 Subject: [Qemu-devel] [PATCH v6 10/11] migration: remove the unnecessary RDMA_CONTROL_ERROR message X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, Lidong Chen Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" It's not necessary to send RDMA_CONTROL_ERROR when clean up rdma resource. If rdma->error_state is ture, the message may not send successfully. and the cm event can also notify the peer qemu. Signed-off-by: Lidong Chen --- migration/rdma.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index ae07515..e1498f2 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -2305,17 +2305,6 @@ static void qemu_rdma_cleanup(RDMAContext *rdma) int idx; if (rdma->cm_id && rdma->connected) { - if ((rdma->error_state || - migrate_get_current()->state == MIGRATION_STATUS_CANCELLING) && - !rdma->received_error) { - RDMAControlHeader head = { .len = 0, - .type = RDMA_CONTROL_ERROR, - .repeat = 1, - }; - error_report("Early error. Sending error."); - qemu_rdma_post_send_control(rdma, NULL, &head); - } - rdma_disconnect(rdma->cm_id); trace_qemu_rdma_cleanup_disconnect(); rdma->connected = false;