DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: stable@dpdk.org, Stephen Hemminger <sthemmin@microsoft.com>
Subject: [dpdk-dev] [PATCH 4/7] bus/vmbus: stop mapping if empty resource found
Date: Thu,  7 Feb 2019 19:44:04 -0800	[thread overview]
Message-ID: <20190208034407.7865-5-stephen@networkplumber.org> (raw)
In-Reply-To: <20190208034407.7865-1-stephen@networkplumber.org>

From: Stephen Hemminger <sthemmin@microsoft.com>

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 <sthemmin@microsoft.com>
---
 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

  parent reply	other threads:[~2019-02-08  3:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08  3:44 [dpdk-dev] [PATCH 0/7] vmbus/netvsc: fix multi-process support Stephen Hemminger
2019-02-08  3:44 ` [dpdk-dev] [PATCH 1/7] bus/vmbus: fix secondary process setup Stephen Hemminger
2019-02-08  3:44 ` [dpdk-dev] [PATCH 2/7] net/netvsc: fix VF support with secondary process Stephen Hemminger
2019-02-08  3:44 ` [dpdk-dev] [PATCH 3/7] bus/vmbus: fix check for mmap failure Stephen Hemminger
2019-02-08  3:44 ` Stephen Hemminger [this message]
2019-02-08  3:44 ` [dpdk-dev] [PATCH 5/7] bus/vmbus: map ring in secondary Stephen Hemminger
2019-02-08  3:44 ` [dpdk-dev] [PATCH 6/7] bus/vmbus: refactor secondary mapping Stephen Hemminger
2019-02-08  3:44 ` [dpdk-dev] [PATCH 7/7] net/netvsc: remove unnecessary format of ether address Stephen Hemminger
2019-03-29  9:51 ` [dpdk-dev] [dpdk-stable] [PATCH 0/7] vmbus/netvsc: fix multi-process support Thomas Monjalon
2019-03-29  9:51   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190208034407.7865-5-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).