Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2707868imj; Mon, 11 Feb 2019 07:18:18 -0800 (PST) X-Google-Smtp-Source: AHgI3IZceqiT8dbbhdWeWRJN+1sVDC2rr9oMXmKZpcODGbdJjAMohPVda7t4HcrHnC6SZDYzJgsA X-Received: by 2002:a62:fb07:: with SMTP id x7mr36914863pfm.71.1549898298391; Mon, 11 Feb 2019 07:18:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549898298; cv=none; d=google.com; s=arc-20160816; b=Xj69R2M9gmyWgYVhUlSa1FTxnu+fsgDIfz+8Uo7/POF5ePMtkpv5kBt5UF4AG+W7lt 6k2YWDI+Y4EFuGx6sMWTV8WQ8RLBqyagjcg061FBZvKhM8XnBRZ417bS0/a+t4a3mhtS FAntpxGKYk/An6q1s9XE2ZRsGLGI1RIAOo8Eekmd6c8PTlGtq0TRv90nQKylyA9JIGef J1TK/VozZ/am57/k09FTja8A+/gOZ87m6LdT+H5Nq5x3UbIsAk2dtlHtm+PFNIR69fM5 NkFdbKvf5GiueWuEYNS9W/x1axwxP2zxGJY8FXDGcEd/8F9uuGksxgchZ42i8FWVch8z WS5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xQqZlYHAY6HjAeSYpVOSflml6k7zg9teSdrJm8leEUk=; b=m+6oE9Z/QTbVI/lXBdVR0V7l2z/x7znF31eE3iSW4i6QXFd0VhPP7kcoR1mlg4y8dh QNdbEgnr55+a0f5zRyOz7Ntvg9DTsAIhnVx7XVp1Zm9adxNgSBJe608nYQnZOlKZlaxY KCfBGN483ib8qwr7ylzDSX95phM6MFchz/Pr3i3fcGuy5OQ+sfiyYKj2252KBBY38BXS BqmTvbjv8oWOQiceN1DHn+3qZBR6n3/BzsSkBpqIa3CnyywlNkjRn8c4ZBLeBwyhaosF 8tJxdzCR+Cg7F1234tlC2lyQzY5QUV/TY4Ct+G28Y93g5lgcdoGWfaNloEifcHDoAjnd fSvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HmExmgQN; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e129si9473449pgc.333.2019.02.11.07.18.01; Mon, 11 Feb 2019 07:18:18 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=HmExmgQN; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391325AbfBKPQA (ORCPT + 99 others); Mon, 11 Feb 2019 10:16:00 -0500 Received: from mail-it1-f194.google.com ([209.85.166.194]:35415 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391346AbfBKPH3 (ORCPT ); Mon, 11 Feb 2019 10:07:29 -0500 Received: by mail-it1-f194.google.com with SMTP id v72so2054560itc.0 for ; Mon, 11 Feb 2019 07:07:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xQqZlYHAY6HjAeSYpVOSflml6k7zg9teSdrJm8leEUk=; b=HmExmgQNH5IAGNs2+AgmsD+/8/vrqIeob15MBtVs/D3GSqX9h+b4Fyu8CZTUvGCPW6 9LdgclqoNgCNZgXqtpceGLrp76mk467FWtUyG59VEEkeS95SFmFm5F/KRwLbrG1Vu5DI vKcYi0M0ThTTT1KnPRF8l+L67yvAx/JaI0yKeljZVgrU70IiYHP0r9Z3SVQatMowOlK6 W9aPZQrw1EKMZcHDKUqYZ3SjYQs/o35gQ96cInVB/JB2xpL12M89H2p3ttcJTUjByjnJ VAEUhhTKd0dBi3Hulxq7nsq3ZzsLXtnLTnniyzgIB6k7gkkUnsJrrU963Jn9WKiC401r lgJw== 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:user-agent; bh=xQqZlYHAY6HjAeSYpVOSflml6k7zg9teSdrJm8leEUk=; b=H8su8ei+r9/U0GEHdrjzopzkDGQ1ai8eJq8EUknpr43kRIL0jgCzH3ZMjimBkpAXrx cILiokLi+FJ9svnEyPc+P/HHApjBy7RdqFxrDb1KeeMj5+0PD/0bFJLBK8vUDUZG8f2y OXd8S2nKREngnhUE9eNapsEp7okaU4Ya5UCrpj9oLi7+YTVuY1dEIb2rbNrJezM30JUH oRjnkSoQJIdsiu8AmVQpaGa8dWqwWujgOz6uzNDl908O6scBgZv8HF0AivpNqiZV2S+x nvQO9jnyBG5qwc0c2+SwqbKqveiGkZPJIu9LkNTeLRYv6fxGvbvxfQdFXaCXmlyGK2pA TtxQ== X-Gm-Message-State: AHQUAuY3NhjvpCkRYRdNQi6jeDftBgF94/FLmtF8l9NPf0Io+y0nGLyq y10g1XqLlACMhdd40X5R81E= X-Received: by 2002:a24:4653:: with SMTP id j80mr5381444itb.177.1549897648834; Mon, 11 Feb 2019 07:07:28 -0800 (PST) Received: from ubu-Virtual-Machine (66-188-57-61.dhcp.bycy.mi.charter.com. [66.188.57.61]) by smtp.gmail.com with ESMTPSA id y190sm4322446itb.26.2019.02.11.07.07.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Feb 2019 07:07:28 -0800 (PST) Date: Mon, 11 Feb 2019 02:01:18 -0500 From: Kimberly Brown To: Stephen Hemminger Cc: Michael Kelley , Long Li , Sasha Levin , Dexuan Cui , devel@linuxdriverproject.org, Haiyang Zhang , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set Message-ID: <20190211070118.GA2977@ubu-Virtual-Machine> References: <52d58fe5805f2ba2405c9091b4c86033d434d2b9.1549619051.git.kimbrownkd@gmail.com> <20190208143148.052c8d9c@hermes.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190208143148.052c8d9c@hermes.lan> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 08, 2019 at 02:32:09PM -0800, Stephen Hemminger wrote: > On Fri, 8 Feb 2019 05:01:12 -0500 > Kimberly Brown wrote: > > You are right, the current behavior is broken. > It would be good to add a description of under what conditions > monitor is not used. Is this some part of a project emulating > Hyper-V? > I'm not sure which conditions determine whether the monitor mechanism is used. I've searched the Hypervisor TLFS, and I couldn't find any information. If you have any suggestions for where I can find this information, please let me know. No, I'm not working on a project emulating Hyper-V. > > > + > > + if (!hv_dev->channel->offermsg.monitor_allocated) > > + return sprintf(buf, "\n"); > > If monitor is not used, why not return an error instead of empty > data. Any program (or user) would have to handle that already. I think that returning an error instead is fine. I'll make this change in the next version of the patch.