From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by dpdk.org (Postfix) with ESMTP id 05F0A1B642 for ; Fri, 8 Feb 2019 04:44:22 +0100 (CET) Received: by mail-pf1-f193.google.com with SMTP id c73so1012548pfe.13 for ; Thu, 07 Feb 2019 19:44:21 -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=MpiYCMsFaEOjli1KVAU43+G7aYNgTfotKzBILh6TIdk=; b=qizOtV0Ao/dBZXBBfe8fIJil5FMKXytavr1jSmtx4wWrdhZUDKVVChTBwsxTWr/CsQ eeBxPirSCjQ7RI8NfHl4Sb7noYS6JsplKmRYOwuwslKyDh2w8y3kRNdDHcPFcEUcnRgo j6W/IEMB2CNfOtj23QRnsX7UFUvxoYP7JyR4ZjtPY6QtUWEeJz0suqyYeNo3WEuaR0v2 d0aNTICBOPWnpya42rphs2KTMR4MlhZx6nQxl4CCbV0KHpfOCHZAuih6fb8prJGM1QM0 Si+L7fQb1arQx+zp4/FcltdDnZFsvvy/93PE6hBU91XhIQWiG/tjbxM7KaYOEuFOa0+M 4k9w== 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=MpiYCMsFaEOjli1KVAU43+G7aYNgTfotKzBILh6TIdk=; b=pDATjf/Mp6r357wKq/pd+SVfrk4M2u0WIyH36ODwMwflvaIUfSdLdW1gu5Ht+SYk1I tWzBlXkElhikkm6i/Guk38yWyu+iAUa3Gxqr0LGDkUkvk2AXW58erVmW9VgNcF8SZ/WS RlkpH8ZOrlSasZRG6lH2h/NVTioHw0F7TXMuwJ9q8jc+onbYx6mfZcG7gw0W4xrzzzeJ 1uq3tnZ9xy6IkSUchQ5I7FPa+F7uIESEDmsFw4THWeUgIGn6GayASGWE+GX/OTxDdl/l R1mxXUUFTjh7ehs07BTgnjHggqWR/vKDELBOKPAIZjRLgW82y0C9q1ifOt7+El6vYAL5 b3LA== X-Gm-Message-State: AHQUAuZAUVz97F+D1/0lnfDbVLF1kts6QSingtRzVxFCOsDIar2eWve9 PQS0+yTJ3AlVj2sQdtMKxMvoqg== X-Google-Smtp-Source: AHgI3IYdhRFGZ3644m3WvtCAiu6xBjt29VF8ZqL+f1iNdC/x3LvGNVvzY4qav1okVVa2ESq9r5UaRw== X-Received: by 2002:a62:5301:: with SMTP id h1mr19772218pfb.17.1549597461180; Thu, 07 Feb 2019 19:44:21 -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.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Feb 2019 19:44:19 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: stable@dpdk.org, Stephen Hemminger Date: Thu, 7 Feb 2019 19:44:04 -0800 Message-Id: <20190208034407.7865-5-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-stable] [PATCH 4/7] bus/vmbus: stop mapping if empty resource found X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2019 03:44:22 -0000 From: Stephen Hemminger If vmbus is run on older kernel (without all the uio mappings), then the bus driver should stop when it hits the missing mappings rather than recording the empty values. Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support") Signed-off-by: Stephen Hemminger --- drivers/bus/vmbus/vmbus_common_uio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/bus/vmbus/vmbus_common_uio.c b/drivers/bus/vmbus/vmbus_common_uio.c index 46e233d9fac3..a6545b758e36 100644 --- a/drivers/bus/vmbus/vmbus_common_uio.c +++ b/drivers/bus/vmbus/vmbus_common_uio.c @@ -98,9 +98,9 @@ vmbus_uio_map_primary(struct rte_vmbus_device *dev) /* Map the resources */ for (i = 0; i < VMBUS_MAX_RESOURCE; i++) { - /* skip empty BAR */ + /* stop at empty BAR */ if (dev->resource[i].len == 0) - continue; + break; ret = vmbus_uio_map_resource_by_index(dev, i, uio_res, 0); if (ret) -- 2.20.1