* [dpdk-dev] [PATCH] set eventfd_link_misc.minor=MISC_DYNAMIC_MINOR
@ 2015-08-04 9:31 chixiaobo
0 siblings, 0 replies; 2+ messages in thread
From: chixiaobo @ 2015-08-04 9:31 UTC (permalink / raw)
To: dev; +Cc: chixiaobo
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dpdk-dev] [PATCH] set eventfd_link_misc.minor=MISC_DYNAMIC_MINOR
@ 2015-08-04 9:30 chixiaobo
0 siblings, 0 replies; 2+ messages in thread
From: chixiaobo @ 2015-08-04 9:30 UTC (permalink / raw)
To: dev; +Cc: chixiaobo
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-04 9:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-04 9:31 [dpdk-dev] [PATCH] set eventfd_link_misc.minor=MISC_DYNAMIC_MINOR chixiaobo
-- strict thread matches above, loose matches on Subject: below --
2015-08-04 9:30 chixiaobo
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).