From: Xiao Wang <xiao.w.wang@intel.com>
To: maxime.coquelin@redhat.com
Cc: dev@dpdk.org, tiwei.bie@intel.com, lei.a.yao@intel.com,
Xiao Wang <xiao.w.wang@intel.com>
Subject: [dpdk-dev] [PATCH] net/virtio-user: fix dev_init in legacy-mem mode
Date: Thu, 17 May 2018 15:35:25 +0800 [thread overview]
Message-ID: <20180517073525.103984-1-xiao.w.wang@intel.com> (raw)
In legacy-mem mode, memory event callback registering is not supported,
we should not return error in dev_init on this case.
Fixes: 12ecb2f63b12 ("net/virtio-user: support memory hotplug")
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Suggested-by: Tiwei Bie <tiwei.bie@intel.com>
---
drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 992a68757..bd16fbb60 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -445,8 +445,11 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
if (rte_mem_event_callback_register(VIRTIO_USER_MEM_EVENT_CLB_NAME,
virtio_user_mem_event_cb, dev)) {
- PMD_INIT_LOG(ERR, "Failed to register mem event callback\n");
- return -1;
+ if (rte_errno != ENOTSUP) {
+ PMD_INIT_LOG(ERR, "Failed to register mem event"
+ " callback\n");
+ return -1;
+ }
}
return 0;
--
2.15.1
next reply other threads:[~2018-05-17 7:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 7:35 Xiao Wang [this message]
2018-05-17 8:03 ` Maxime Coquelin
2018-05-17 8:07 ` Wang, Xiao W
2018-05-17 8:28 ` Maxime Coquelin
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=20180517073525.103984-1-xiao.w.wang@intel.com \
--to=xiao.w.wang@intel.com \
--cc=dev@dpdk.org \
--cc=lei.a.yao@intel.com \
--cc=maxime.coquelin@redhat.com \
--cc=tiwei.bie@intel.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).