From patchwork Tue Aug 4 09:30:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chixiaobo X-Patchwork-Id: 6695 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 18AECC35A; Tue, 4 Aug 2015 11:30:56 +0200 (CEST) Received: from demumfd001.nsn-inter.net (demumfd001.nsn-inter.net [93.183.12.32]) by dpdk.org (Postfix) with ESMTP id 24EE5C350 for ; Tue, 4 Aug 2015 11:30:54 +0200 (CEST) Received: from demuprx017.emea.nsn-intra.net ([10.150.129.56]) by demumfd001.nsn-inter.net (8.15.1/8.15.1) with ESMTPS id t749UrHE024363 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 4 Aug 2015 09:30:53 GMT Received: from localhost ([10.140.178.105]) by demuprx017.emea.nsn-intra.net (8.12.11.20060308/8.12.11) with ESMTP id t749Up71009054; Tue, 4 Aug 2015 11:30:52 +0200 From: chixiaobo To: dev@dpdk.org Date: Tue, 4 Aug 2015 17:30:51 +0800 Message-Id: <1438680651-19940-1-git-send-email-xiaobo.chi@nokia.com> X-Mailer: git-send-email 1.9.4.msysgit.2 X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-size: 981 X-purgate-ID: 151667::1438680653-000058E2-487B7BD9/0/0 Cc: chixiaobo Subject: [dpdk-dev] [PATCH] set eventfd_link_misc.minor=MISC_DYNAMIC_MINOR X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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, };