From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id CF21F1B72A for ; Fri, 8 Feb 2019 04:44:17 +0100 (CET) Received: by mail-pl1-f196.google.com with SMTP id s1so1022886plp.9 for ; Thu, 07 Feb 2019 19:44:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uMqeantR8Ftre/8j9Xjj08VOQ73Tz922ZlVc0wpVmgk=; b=gKU9f1W2NY1MhUr4JTvnKyhx1m+VjljreMkdIMezxcbibpYrMLwm5f4HFe9CXHo15J aNFS03O0YJ9h9fgKNeN1ifZFfl1YmptIoGXh1KyxghBZNo3l/FWO990X1aghQ2wZ3gKJ KUfQyXguz6mkH8nq3aCIIGHt4bpS3JkVsYXyrjz42t3TrfNL0+OWgjUFTEcFJKALlrcV ZaNE26WXegyJe5Qu5o2+tvZ39kL3vGkNrmAnHjTG+Z3yMzzekuB+01z3JJGWVrD1HEbh K8YbimWGhU63OLx4PvWpFS670Kf2yAFCgpovDpBIMAVwucQDQiNKCPhiset+2BhPDn72 bnQw== 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:mime-version:content-transfer-encoding; bh=uMqeantR8Ftre/8j9Xjj08VOQ73Tz922ZlVc0wpVmgk=; b=LDbigaVZV4vSuIDYP2kyQ0ZATPM9i4khlEdtcltQdWhQaQd+z0qRd6OeS4TWuy+tRX FOuqqkCHTU34d7VEJNPMiisByudqya1r2QeK3yogK+jm2k1IgYEvJ9vUVBcAcBs8+wc1 4Los00zxejKx2xriedFBJsFXRNWc4tN+Vxxwpmg3AUG4DkUPW6J/L0mN5xRiQoRvDFFV 0aNZZxCN2A1gm+n1zlFQR7gkcM1GL6tobHBLMNC9Ou12FsOES/MMS/TA6qCQfmuOQI+1 kjJUYttUe3d1nf0VvtPziRoBJWOALGSyw2F5g5XEelZEpY39nxVgBUCsBMZ2W5EoEzvt IFBg== X-Gm-Message-State: AHQUAuYVY2NXwhQtNxsvHFB86EejJy1EC1QTZhRryzmBzzXjS1NFKyCn y8A9bClXgM2oaiwmeZrVYojOdFEUY34= X-Google-Smtp-Source: AHgI3IbUqVKV5v9hE9XNh9futEQhNd0VbRuhxnhfBS1lS+qNmqFdwsrtJEzYe+wkQKTCqjbbisy6ag== X-Received: by 2002:a17:902:9885:: with SMTP id s5mr20625188plp.52.1549597456661; Thu, 07 Feb 2019 19:44:16 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id i4sm873275pfj.82.2019.02.07.19.44.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Feb 2019 19:44:15 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: stable@dpdk.org, Stephen Hemminger Date: Thu, 7 Feb 2019 19:44:01 -0800 Message-Id: <20190208034407.7865-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190208034407.7865-1-stephen@networkplumber.org> References: <20190208034407.7865-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/7] bus/vmbus: fix secondary process setup X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 03:44:18 -0000 From: Stephen Hemminger The secondary process doesn't correctly map the second and later resources because it doesn't change the offset. Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support") Signed-off-by: Stephen Hemminger --- drivers/bus/vmbus/vmbus_common_uio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bus/vmbus/vmbus_common_uio.c b/drivers/bus/vmbus/vmbus_common_uio.c index 5ddd36ab62d2..46e233d9fac3 100644 --- a/drivers/bus/vmbus/vmbus_common_uio.c +++ b/drivers/bus/vmbus/vmbus_common_uio.c @@ -47,9 +47,10 @@ vmbus_uio_map_secondary(struct rte_vmbus_device *dev) for (i = 0; i != uio_res->nb_maps; i++) { void *mapaddr; + off_t offset = i * PAGE_SIZE; mapaddr = vmbus_map_resource(uio_res->maps[i].addr, - fd, 0, + fd, offset, uio_res->maps[i].size, 0); if (mapaddr == uio_res->maps[i].addr) -- 2.20.1