From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 0FC13378E for ; Mon, 9 Nov 2015 13:54:50 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 09 Nov 2015 04:54:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,266,1444719600"; d="scan'208";a="596866118" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.66.49]) by FMSMGA003.fm.intel.com with ESMTP; 09 Nov 2015 04:54:49 -0800 Date: Mon, 9 Nov 2015 20:58:25 +0800 From: Yuanhan Liu To: "Chi, Xiaobo (Nokia - CN/Hangzhou)" Message-ID: <20151109125825.GP2326@yliu-dev.sh.intel.com> References: <1446789877-11656-1-git-send-email-xiaobo.chi@nokia.com> <20151109042237.GK2326@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] vhost: eventfd_link's minor number shall be specified 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: , X-List-Received-Date: Mon, 09 Nov 2015 12:54:51 -0000 On Mon, Nov 09, 2015 at 10:19:54AM +0000, Chi, Xiaobo (Nokia - CN/Hangzhou) wrote: > Hi, > > And following is a test by me, we can see that if I firstly insert my kmod_test.ko, then insert eventfd_link.ko, error will happen with hint " Device or resource busy". This is because the default minor device number, 0, has been occupied by my kmod_test.ko . Good to know and thanks for the explanation. It's well explained, and you should put them (including below example) to commit log. With the detailed issue explanation, and steps to reproduce, it just gives your patch more chance to get reviewed (and merged). And, don't forget to title your patch with "vhost: fix ..." preifx. FYI, there is another custom for a fix patch in DPDK community: adding an extra line like following to indicate the latest commit introduces such bug: Fixes: 62dbd2ffea9a ("ethdev: add more flow director modes") Which is generated with following git alias (check http://dpdk.org/dev for more information): [alias] fixline = log -1 --abbrev=12 --format='Fixes: %h (\"%s\")' So, would you please send v2? --yliu > > root@distro:~/test$ lsmod > Module Size Used by > kmod_test 927 0 > vboxsf 35930 4 > vboxguest 222130 1 vboxsf > microcode 10315 0 > autofs4 25051 0 > root@distro:~/test$ modinfo kmod_test > modinfo: ERROR: Module kmod_test not found. > root@distro:~/test$ modinfo kmod_test.ko > filename: /root/test/kmod_test.ko > alias: devname:test > description: my test > author: Xiaobo Chi > license: GPL v2 > version: 0.0.1 > srcversion: C2BDEBC81A17F8197C7C44A > depends: > vermagic: 3.18.9-pc64-distro.git-v1.7 SMP mod_unload > root@distro:~/test$ dmesg -c > root@distro:~/test$ ls > eventfd_link.ko kmod_test.ko kmod_test.mod.o main Makefile Module.symvers > kmod_test.c kmod_test.mod.c kmod_test.o main.c modules.order > root@distro:~/test$ insmod ./eventfd_link.ko > insmod: ERROR: could not insert module ./eventfd_link.ko: Device or resource busy > root@distro:~/test$ dmesg -c > > brgs, > Xiaobo Chi > > > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of EXT Chi, Xiaobo (Nokia - CN/Hangzhou) > Sent: Monday, November 09, 2015 6:03 PM > To: EXT Yuanhan Liu > Cc: dev@dpdk.org; changchun.ouyang@intel.com > Subject: Re: [dpdk-dev] [PATCH] vhost: eventfd_link's minor number shall be specified > > Hi, > 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. > You can refer to the kni_misc.c > > Brgs, > Chi Xiaobo > > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of EXT Yuanhan Liu > Sent: Monday, November 09, 2015 12:23 PM > To: Chi, Xiaobo (Nokia - CN/Hangzhou) > Cc: dev@dpdk.org; changchun.ouyang@intel.com > Subject: Re: [dpdk-dev] [PATCH] vhost: eventfd_link's minor number shall be specified > > On Fri, Nov 06, 2015 at 02:04:37PM +0800, Xiaobo Chi wrote: > > eventfd_link_misc's minor number shall be MISC_DYNAMIC_MINOR to let Linux kernel dynamically assign one while loading. > > For such (fix) patch, I'd like to see what exact issue your patch fixes. > > And if it fixes an issue, you'd better title your patch with something > like "vhost: fix ...", so that it's likely Thomas will put it into > high priority. > > --yliu > > > > > Signed-off-by: Xiaobo Chi > > --- > > 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 c54a938..4b05b5a 100644 > > --- a/lib/librte_vhost/eventfd_link/eventfd_link.c > > +++ b/lib/librte_vhost/eventfd_link/eventfd_link.c > > @@ -249,6 +249,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