Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3398082imm; Sun, 13 May 2018 10:25:08 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqMWWjmrYXuMpdOH4v7A5B14YhI2jHe+0dG5qcML6m9ws367BL5nW3WjxQ39nzKrxbTq9aw X-Received: by 2002:a17:902:d882:: with SMTP id b2-v6mr6388077plz.220.1526232308140; Sun, 13 May 2018 10:25:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526232308; cv=none; d=google.com; s=arc-20160816; b=wQcNiDaksHc/i+7Nv9kautrpvx7Jesl0IJTf8k6I+kCPSyohY5YLGo+vVm4W7+I9aZ ana7MD2Mks99MdIVqdD503o1Rks7QIKn1pnBj/tSrG+l9bdXhJXlbwYteKqpkbV7vtvS +AxlRVK0Jgm60uyoN+4QwceqTmtOfXkp0RGuceCnWyDXmzFsu03rF31XoeZ/6ZIUmdZT CV/ZcEmtqzir0WSz4H3neXe3MFg5hP+Uz8ZXZ/Pc0K4+/vz+7n2+pgB7mXAobL8IemQd 7qG+0+Os4Zxdt5eIxo7VMA/lFNNnajV27Kcz/rUUZubqdvsB3UyflKdRPzT5+EtNu9/W nLQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=vtvV9z1EZ0FDO0jUh21HzQ416C8XHHZyrSddEPu3AAc=; b=ocF+LZi8XOCNjJIiJo1da3p6TJq64AxjMDQbJ7/Pwe+zzBN5YKZSkqToP1k6YbLmgS N+ckFMxUtFU+dL5MzZhZRtFiYToV7jxJb65lUSECNwiQGMCjadTrYVJyproU7FbE2jNj mCl/GsjbW6VyarINecwJRkRkAXjkPSL8ebD2587mlS5dDHxFPCRgDCbqHqUVCjBvZ8IR N1Z2OjwtZWtVPRmkdqUAdVulG4bHml+vxwTa/jeCDnNHfy9Iz25JpwMUuJIbVBr6JoRZ GZDFQf3b4G+uKMdI5RFlHLScZ7rjiubPvHwzzLaApLiL3Kbp9a7oTVrfWDzghA+I9eCU hZ/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=qAq0tABJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c6-v6si7559833pfi.102.2018.05.13.10.24.19; Sun, 13 May 2018 10:25:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=qAq0tABJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751970AbeEMRYN (ORCPT + 99 others); Sun, 13 May 2018 13:24:13 -0400 Received: from mail-pg0-f41.google.com ([74.125.83.41]:45907 "EHLO mail-pg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751926AbeEMRYM (ORCPT ); Sun, 13 May 2018 13:24:12 -0400 Received: by mail-pg0-f41.google.com with SMTP id w3-v6so4473938pgv.12 for ; Sun, 13 May 2018 10:24:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vtvV9z1EZ0FDO0jUh21HzQ416C8XHHZyrSddEPu3AAc=; b=qAq0tABJnAdySzAFv418Hd0G4SKxQkJAWp4XuVHP0+rXAd/jWgOSuE1uvlhFAwmJH7 piMiE1D+TACWb/74t7lvW74FJGeI5qXcgNsCKkJXegG2aoPJMsuzR/W9gnCxkbh/brBP ykAWE0CoUJRYuNUSd4tQ9UCEP2V9/3o4LVLjfeoQkmzRu4xnRMdoeNXR5Z986s9hXjSo 2l3OBxrS1B3bbjXxQWPYsn29tv0Y01q3pjqMGLIrHBO0e4K+DLJ/ALXmHDgs/sf0AKkZ EzzRg3KCXTchCsBzspXxf99Z42ebAK+4/xdUncvOCI6tNhcL35rehtrjhcqeTo0tz5cL NWGg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=vtvV9z1EZ0FDO0jUh21HzQ416C8XHHZyrSddEPu3AAc=; b=R73CjaiWVf+r3LDssQUy59+sFqF21IVzn4Ung3wKKr4Du+3ekahXLorbeDOVOwIcMI vI6eHC4cBey6mJnVsQoBionCwR8tZyHUhWs88ZKcuHLeYYiYp2JeH9jbodZOI00m7owZ gcyGvchXGb18IxaLKM+KawezBfcCozLFtlUyH+9tJml8kQFZB7H006BVkbvjl+aPgmgz seLwZuqspnPkCmGfRnjzg4vKiQ+rbrUUqYAczfOwOu/Eer9iSnMjTovqu3zHe4PhYqT5 6hUNmD4uYy8d3PkxJp94Q5xm/JohrPg4ncBHgL7vJT3Iatovrop37Faeb70qJ4RXt+po l0pA== X-Gm-Message-State: ALKqPwfa655Ojr2kG+HEffHnCp/aurfIP6U0fZzqvnR+OZyvNUMFSEv7 p5HMYzPct9z4GZhkvdnM1+vueXMYAUI= X-Received: by 2002:a63:9711:: with SMTP id n17-v6mr5997606pge.431.1526232251574; Sun, 13 May 2018 10:24:11 -0700 (PDT) Received: from xeon-e3 (204-195-35-107.wavecable.com. [204.195.35.107]) by smtp.gmail.com with ESMTPSA id d15-v6sm14506528pfh.97.2018.05.13.10.24.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 13 May 2018 10:24:11 -0700 (PDT) Date: Sun, 13 May 2018 10:24:09 -0700 From: Stephen Hemminger To: kys@linuxonhyperv.com Cc: kys@microsoft.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, jasowang@redhat.com, vkuznets@redhat.com, Stephen Hemminger , Michael Kelley Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: enable VMBus protocol version 5.0 Message-ID: <20180513102409.4adc5200@xeon-e3> In-Reply-To: <20180512093033.12325-1-kys@linuxonhyperv.com> References: <20180512093033.12325-1-kys@linuxonhyperv.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 12 May 2018 02:30:33 -0700 kys@linuxonhyperv.com wrote: > int vmbus_post_msg(void *buffer, size_t buflen, bool can_sleep) > { > + struct vmbus_channel_message_header *hdr; > union hv_connection_id conn_id; > int ret = 0; > int retries = 0; > u32 usec = 1; > > conn_id.asu32 = 0; > - conn_id.u.id = VMBUS_MESSAGE_CONNECTION_ID; > + conn_id.u.id = vmbus_connection.msg_conn_id; > > /* > * hv_post_message() can have transient failures because of > @@ -372,6 +400,18 @@ int vmbus_post_msg(void *buffer, size_t buflen, bool can_sleep) > > switch (ret) { > case HV_STATUS_INVALID_CONNECTION_ID: > + /* > + * See vmbus_negotiate_version(): VMBus protocol 5.0 > + * requires that we must use > + * VMBUS_MESSAGE_CONNECTION_ID_4 for the Initiate > + * Contact message, but on old hosts that only > + * support VMBus protocol 4.0 or lower, here we get > + * HV_STATUS_INVALID_CONNECTION_ID and we should > + * return an error immediately without retrying. > + */ > + hdr = (struct vmbus_channel_message_header *)buffer; Hate to pick o the details, but buffer is void * so cast is not necessary here.