From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from demumfd002.nsn-inter.net (demumfd002.nsn-inter.net [93.183.12.31]) by dpdk.org (Postfix) with ESMTP id 64D3F591E for ; Tue, 10 Nov 2015 03:24:34 +0100 (CET) Received: from demuprx016.emea.nsn-intra.net ([10.150.129.55]) by demumfd002.nsn-inter.net (8.15.2/8.15.2) with ESMTPS id tAA2OXD5023464 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 10 Nov 2015 02:24:34 GMT Received: from SGSIHTC002.nsn-intra.net ([10.159.225.19]) by demuprx016.emea.nsn-intra.net (8.12.11.20060308/8.12.11) with ESMTP id tAA2OTRN026456 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 10 Nov 2015 03:24:32 +0100 Received: from SGSIHTC005.nsn-intra.net (10.159.225.22) by SGSIHTC002.nsn-intra.net (10.159.225.19) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 10 Nov 2015 10:24:30 +0800 Received: from SGSIMBX004.nsn-intra.net ([169.254.4.80]) by SGSIHTC005.nsn-intra.net ([10.159.225.22]) with mapi id 14.03.0248.002; Tue, 10 Nov 2015 10:24:30 +0800 From: "Chi, Xiaobo (Nokia - CN/Hangzhou)" To: EXT Yuanhan Liu Thread-Topic: [dpdk-dev] [PATCH] vhost: eventfd_link's minor number shall be specified Thread-Index: AQHRGqXKVBBMxc15BECbjG1IeCMy8p6TdZcwgAAD/sD//6engIABZubg Date: Tue, 10 Nov 2015 02:24:29 +0000 Message-ID: References: <1446789877-11656-1-git-send-email-xiaobo.chi@nokia.com> <20151109042237.GK2326@yliu-dev.sh.intel.com> <20151109125825.GP2326@yliu-dev.sh.intel.com> In-Reply-To: <20151109125825.GP2326@yliu-dev.sh.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.159.225.121] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: 5016 X-purgate-ID: 151667::1447122274-00006110-87CD75AF/0/0 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: Tue, 10 Nov 2015 02:24:34 -0000 Hi, Liu, thanks for your comments and guide. I will send a v2 soon.=20 Brgs, Xiaobo Chi -----Original Message----- From: EXT Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com]=20 Sent: Monday, November 09, 2015 8:58 PM To: Chi, Xiaobo (Nokia - CN/Hangzhou) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] vhost: eventfd_link's minor number shall be= specified On Mon, Nov 09, 2015 at 10:19:54AM +0000, Chi, Xiaobo (Nokia - CN/Hangzhou)= wrote: > Hi, >=20 > And following is a test by me, we can see that if I firstly insert my kmo= d_test.ko, then insert eventfd_link.ko, error will happen with hint " Devic= e or resource busy". This is because the default minor device number, 0, ha= s 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 =3D log -1 --abbrev=3D12 --format=3D'Fixes: %h (\"%s\")' So, would you please send v2? --yliu >=20 > root@distro:~/test$ lsmod > Module Size Used by > kmod_test 927 0=20 > vboxsf 35930 4=20 > vboxguest 222130 1 vboxsf > microcode 10315 0=20 > autofs4 25051 0=20 > 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: =20 > vermagic: 3.18.9-pc64-distro.git-v1.7 SMP mod_unload=20 > 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=20 > insmod: ERROR: could not insert module ./eventfd_link.ko: Device or resou= rce busy > root@distro:~/test$ dmesg -c >=20 > brgs, > Xiaobo Chi >=20 >=20 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of EXT Chi, Xiaobo (Nok= ia - 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 >=20 > Hi, > For miscdevices, the major device_no is same, so the minor device_no shou= ld be set to ditinguish different misc devices; if not set the minor, it m= ay fail while insmod due to the default minor value, 0, has been used by ot= her miscdevice. MISC_DYNAMIC_MINOR means to let Linux kernel dynamically as= sign one minor devide number while loading. > You can refer to the kni_misc.c >=20 > Brgs, > Chi Xiaobo >=20 > -----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 >=20 > 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 Li= nux kernel dynamically assign one while loading. >=20 > For such (fix) patch, I'd like to see what exact issue your patch fixes. >=20 > 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. >=20 > --yliu >=20 > >=20 > > Signed-off-by: Xiaobo Chi > > --- > > lib/librte_vhost/eventfd_link/eventfd_link.c | 1 + > > 1 file changed, 1 insertion(+) > >=20 > > 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_fo= ps =3D { > > =20 > > =20 > > static struct miscdevice eventfd_link_misc =3D { > > + .minor =3D MISC_DYNAMIC_MINOR, > > .name =3D "eventfd-link", > > .fops =3D &eventfd_link_fops, > > }; > > --=20 > > 1.9.4.msysgit.2