Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp440072ybi; Fri, 26 Jul 2019 12:22:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzpPlTXcUehGKh90ah2i/jcnDce1CJPazAFOEQiyCKMSOkYk/P7vxvp29gqgcymx7SNVpmf X-Received: by 2002:a17:902:2aea:: with SMTP id j97mr85484852plb.153.1564168947167; Fri, 26 Jul 2019 12:22:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564168947; cv=none; d=google.com; s=arc-20160816; b=zq3II/7w4olWrWCN1ZBJxTAkvMLM3zx49QLk8O6Kll/UeiQQsx+oqv0g65gd15MIDK LJ+O6LitYqB71RuQU+7XTagd9O1W2hiNmfprWDlRoyPq1IiT3OUR2neLSR7llRfRxJC7 vNw/UeaDS+lijVGRNYeLiLvyAR2f7w4324n7OtAo5QKRCDl3ilCX83XYcRQrYWW+KPrR SSRaZg+OFJ/wMmKnPb13Fr8SM1fwiKFflJtE8cJ8+w3cggPo/WqqRfwzuEm6EOXuZTt5 8uJ/+ExYon1YGOH9UTPcRMzY6RIeyADcEWXL3mSdgKYw7argsPggJjl+J8xupmyiz/cS nMfw== 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; bh=HHON1nH6ApNYulEeI4MQrYQT7JZ4z53kVY1K132PFRs=; b=eF5uNRzWyM9ihIdAocnfZvhnuEsmcL6swRXPiev8AVZhLp4t2rY7T1QnjX6kp1ep/O OyiOYUx7cBLopB3jTV9TZQkjfP1SY1Ig0WmgCqFkPabnSUGCZ2XPdhNjy50vdC9Vzxdf 92W3cdmwx63ROaRC0/pxFqEIHKN9JSkgfaRwLYCAmRefpz/zngFtjnvpw6xOafMnCz4f 9GXNK6ViZTQ0ceO83lyAhqYBorLfWeT3PW+RTr+XMxCI2GenD0R4lB18onlxljMUvv/p ViwJ5ml2/yi9sQmnHlmK5rHMuIcjCSVecJXmGTNq83d0z7ohlSuHrv7N+OwCI9yqqVxF njGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=Qiwh1Jd1; 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 b32si7688261pla.277.2019.07.26.12.22.12; Fri, 26 Jul 2019 12:22:27 -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=Qiwh1Jd1; 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 S1727124AbfGZQGP (ORCPT + 99 others); Fri, 26 Jul 2019 12:06:15 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:46153 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727070AbfGZQGO (ORCPT ); Fri, 26 Jul 2019 12:06:14 -0400 Received: by mail-pl1-f196.google.com with SMTP id c2so24901648plz.13 for ; Fri, 26 Jul 2019 09:06:14 -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=HHON1nH6ApNYulEeI4MQrYQT7JZ4z53kVY1K132PFRs=; b=Qiwh1Jd1kb/5Vlo9Rc8U7P/Tq79cqEo6XipidsPbuYcLD0EH+gnQicBMdS75tfBWF0 1tqzCB/vtph8QuGQv2VVHVbw+210vfXgXrI8RBKsSIK4P7eiU3s74k2Evg0vhn1NNYBG pbpKOLPc8yLdL52jRN5bfhIrAQAyJCcvhrg7dCbxIEuuQXeRhfMu/XvNEaGxcJQq6r2F VP4txtBb+MchTGX/0hk+U/HhkTGJWc4IHBJTv47k/YX7Y3jSHT6wpZL4fRJZjd302bKC zp2oSegrl5WsGMXndRDO3SIf/q2G3HV0+Y1hOcjNInPY541c9XgApE+MUBYCAjmg5JHN b4ww== 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=HHON1nH6ApNYulEeI4MQrYQT7JZ4z53kVY1K132PFRs=; b=jSypbynEjO93KVPOo5e1CVsWQDWyHJXrzxPfYUPHzok2HK2kqHEjvSJXntZ8UuVvBB 9mDqr2kuOmQPuYby1cGcvrPlR2ygj+CG1E/zKtWkpVsXd85qTQ13mfu0FdC0IJmut0De au0Mt+fu8OqP3YTTE+fBPqGe5FsOmVG58F83GtvEm9Bv5AU+U8v9c3nkLbdVWl2OXtAj m5mxo2c2Au7rsKiJNzuQmUNvYgi1qKFdL46vCVhQn4n/e/5s43zuH3vvnbjwiOfWl/e2 23p6+tXqSy6q7XoGVCHj+2vx/gZuW12Y5CIkzFa3QHc8aiJ0fDoFIJZPBnASDqfKLya+ swuQ== X-Gm-Message-State: APjAAAVTi5l6kC3UUvST5rtSNFUJsalnNhfjVpg39UYu3VEM17CNZnuU vk78WH9mwes81vN4IzGHHx0= X-Received: by 2002:a17:902:7d8b:: with SMTP id a11mr43603616plm.306.1564157174117; Fri, 26 Jul 2019 09:06:14 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id i124sm101011798pfe.61.2019.07.26.09.06.13 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 09:06:14 -0700 (PDT) Date: Fri, 26 Jul 2019 09:06:05 -0700 From: Stephen Hemminger To: "Himadri Pandya" Cc: "Michael Kelley" , "KY Srinivasan" , "Haiyang Zhang" , "Stephen Hemminger" , , , , "himadri18.07" Subject: Re: [PATCH 2/2] Drivers: hv: util: Specify ring buffer size using Hyper-V page size Message-ID: <20190726090605.5026de8c@hermes.lan> In-Reply-To: <20190725050315.6935-3-himadri18.07@gmail.com> References: <20190725050315.6935-1-himadri18.07@gmail.com> <20190725050315.6935-3-himadri18.07@gmail.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 Wed, 24 Jul 2019 22:03:15 -0700 "Himadri Pandya" wrote: > VMbus ring buffers are sized based on the 4K page size used by > Hyper-V. The Linux guest page size may not be 4K on all architectures > so use the Hyper-V page size to specify the ring buffer size. > > Signed-off-by: Himadri Pandya > --- > drivers/hv/hv_util.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c > index c2c08f26bd5f..766bd8457346 100644 > --- a/drivers/hv/hv_util.c > +++ b/drivers/hv/hv_util.c > @@ -413,8 +413,9 @@ static int util_probe(struct hv_device *dev, > > hv_set_drvdata(dev, srv); > > - ret = vmbus_open(dev->channel, 4 * PAGE_SIZE, 4 * PAGE_SIZE, NULL, > 0, > - srv->util_cb, dev->channel); > + ret = vmbus_open(dev->channel, 4 * HV_HYP_PAGE_SIZE, > + 4 * HV_HYP_PAGE_SIZE, NULL, 0, srv->util_cb, > + dev->channel); > if (ret) > goto error; > hv_util doesn't need lots of buffering. Why not define a fixed value across all architectures. Maybe with some roundup to HV_HYP_PAGE_SIZE.