From patchwork Mon Jan 16 15:52:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: stephen hemminger X-Patchwork-Id: 136284 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 26F081007D2 for ; Tue, 17 Jan 2012 02:53:09 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755347Ab2APPwo (ORCPT ); Mon, 16 Jan 2012 10:52:44 -0500 Received: from mail.vyatta.com ([76.74.103.46]:42215 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753372Ab2APPwn (ORCPT ); Mon, 16 Jan 2012 10:52:43 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.vyatta.com (Postfix) with ESMTP id 9E76B1410017; Mon, 16 Jan 2012 07:52:42 -0800 (PST) X-Virus-Scanned: amavisd-new at tahiti.vyatta.com Received: from mail.vyatta.com ([127.0.0.1]) by localhost (mail.vyatta.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bE7PMQS5rLtP; Mon, 16 Jan 2012 07:52:37 -0800 (PST) Received: from nehalam.linuxnetplumber.net (static-50-53-80-93.bvtn.or.frontiernet.net [50.53.80.93]) by mail.vyatta.com (Postfix) with ESMTPSA id 7676D1410003; Mon, 16 Jan 2012 07:52:37 -0800 (PST) Date: Mon, 16 Jan 2012 07:52:36 -0800 From: Stephen Hemminger To: Alan Cox Cc: "Michael S. Tsirkin" , David Miller , zwu.kernel@gmail.com, device@lanana.org, netdev@vger.kernel.org, virtualization@lists.linux-foundation.org, kay.sievers@vrfy.org, kvm@vger.kernel.org Subject: Re: [PATCH] vhost-net: add module alias (v2.1) Message-ID: <20120116075236.110cc4b4@nehalam.linuxnetplumber.net> In-Reply-To: <20120116122645.2257b40b@bob.linux.org.uk> References: <20120111091653.188b24ab@nehalam.linuxnetplumber.net> <20120111213038.39213819@nehalam.linuxnetplumber.net> <20120112.200701.1473475851890804136.davem@davemloft.net> <20120115124236.GA31012@redhat.com> <20120116122645.2257b40b@bob.linux.org.uk> Organization: Vyatta X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.8; x86_64-pc-linux-gnu) Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, 16 Jan 2012 12:26:45 +0000 Alan Cox wrote: > > > ACKs, NACKs? What is happening here? > > > > I would like an Ack from Alan Cox who switched vhost-net > > to a dynamic minor in the first place, in commit > > 79907d89c397b8bc2e05b347ec94e928ea919d33. > > Sorry device@lanana.org isn't yet back from the kernel hack incident. > > I don't read netdev so someone needs to summarise the issue and send me > a copy of the patch to look at. > > Alan Subject: vhost-net: add module alias (v2.1) By adding some module aliases, programs (or users) won't have to explicitly call modprobe. Vhost-net will always be available if built into the kernel. It does require assigning a permanent minor number for depmod to work. Also: - use C99 style initialization. - add missing entry in documentation for loop-control Signed-off-by: Stephen Hemminger Acked-by: Alan Cox --- 2.1 - add missing documentation for loop control as well Documentation/devices.txt | 3 +++ drivers/vhost/net.c | 8 +++++--- include/linux/miscdevice.h | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/vhost/net.c 2012-01-12 14:14:25.681815487 -0800 +++ b/drivers/vhost/net.c 2012-01-12 18:09:56.810680816 -0800 @@ -856,9 +856,9 @@ static const struct file_operations vhos }; static struct miscdevice vhost_net_misc = { - MISC_DYNAMIC_MINOR, - "vhost-net", - &vhost_net_fops, + .minor = VHOST_NET_MINOR, + .name = "vhost-net", + .fops = &vhost_net_fops, }; static int vhost_net_init(void) @@ -879,3 +879,5 @@ MODULE_VERSION("0.0.1"); MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("Michael S. Tsirkin"); MODULE_DESCRIPTION("Host kernel accelerator for virtio net"); +MODULE_ALIAS_MISCDEV(VHOST_NET_MINOR); +MODULE_ALIAS("devname:vhost-net"); --- a/include/linux/miscdevice.h 2012-01-12 14:14:25.725815981 -0800 +++ b/include/linux/miscdevice.h 2012-01-12 18:09:56.810680816 -0800 @@ -42,6 +42,7 @@ #define AUTOFS_MINOR 235 #define MAPPER_CTRL_MINOR 236 #define LOOP_CTRL_MINOR 237 +#define VHOST_NET_MINOR 238 #define MISC_DYNAMIC_MINOR 255 struct device; --- a/Documentation/devices.txt 2012-01-12 14:14:25.701815712 -0800 +++ b/Documentation/devices.txt 2012-01-12 18:09:56.814680860 -0800 @@ -447,6 +447,9 @@ Your cooperation is appreciated. 234 = /dev/btrfs-control Btrfs control device 235 = /dev/autofs Autofs control device 236 = /dev/mapper/control Device-Mapper control device + 237 = /dev/loop-control Loopback control device + 238 = /dev/vhost-net Host kernel accelerator for virtio net + 240-254 Reserved for local use 255 Reserved for MISC_DYNAMIC_MINOR