From: chixiaobo <xiaobo.chi@nokia.com>
To: dev@dpdk.org
Cc: chixiaobo <xiaobo.chi@nokia.com>
Subject: [dpdk-dev] [PATCH] set eventfd_link_misc.minor=MISC_DYNAMIC_MINOR
Date: Tue, 4 Aug 2015 17:31:47 +0800 [thread overview]
Message-ID: <1438680707-16968-1-git-send-email-xiaobo.chi@nokia.com> (raw)
For miscdevices, the major device_no is same, so the minor device_no should be set to ditinguish different misc devices; if not set the minor, it may fail while insmod due to the default minor value, 0, has been used by other miscdevice. MISC_DYNAMIC_MINOR means to let Linux kernel dynamically assign one minor devide number while loading.
Signed-off-by: chixiaobo <xiaobo.chi@nokia.com>
---
lib/librte_vhost/eventfd_link/eventfd_link.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_vhost/eventfd_link/eventfd_link.c b/lib/librte_vhost/eventfd_link/eventfd_link.c
index 62c45c8..b023cdf 100644
--- a/lib/librte_vhost/eventfd_link/eventfd_link.c
+++ b/lib/librte_vhost/eventfd_link/eventfd_link.c
@@ -169,6 +169,7 @@ static const struct file_operations eventfd_link_fops = {
static struct miscdevice eventfd_link_misc = {
+ .minor = MISC_DYNAMIC_MINOR,
.name = "eventfd-link",
.fops = &eventfd_link_fops,
};
--
1.9.4.msysgit.2
next reply other threads:[~2015-08-04 9:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-04 9:31 chixiaobo [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-08-04 9:30 chixiaobo
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=1438680707-16968-1-git-send-email-xiaobo.chi@nokia.com \
--to=xiaobo.chi@nokia.com \
--cc=dev@dpdk.org \
/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).