netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Remi Denis-Courmont <remi.denis-courmont@nokia.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH 1/6] Phonet: transport protocol auto-loading
Date: Wed, 01 Oct 2008 17:01:15 +0200	[thread overview]
Message-ID: <1222873275.11272.13.camel@violet.holtmann.net> (raw)
In-Reply-To: <20081001124543.GD970@ghostprotocols.net>

Hi,

> > Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> > ---
> >  net/phonet/af_phonet.c |    5 +++++
> >  1 files changed, 5 insertions(+), 0 deletions(-)
> > 
> > diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c
> > index 1d8df6b..06627d3 100644
> > --- a/net/phonet/af_phonet.c
> > +++ b/net/phonet/af_phonet.c
> > @@ -64,6 +64,11 @@ static int pn_socket_create(struct net *net, struct socket *sock, int protocol)
> >  	}
> >  
> >  	pnp = phonet_proto_get(protocol);
> > +#ifdef CONFIG_KMOD
> > +	if (pnp == NULL
> > +	 && request_module("net-pf-%d-proto-%d", PF_PHONET, protocol) == 0)
> 
> && at the end of previous line, please.
> 
> I wonder if we shouldn't have:
> 
> net_pf_request_module(PF_PHONET, protocol)
> 
> [acme@doppio linux-2.6]$ grep "net-pf-%d-proto-%d" net/*/*.c
> net/ipv4/af_inet.c: request_module("net-pf-%d-proto-%d-type-%d",
> net/ipv4/af_inet.c: request_module("net-pf-%d-proto-%d",
> net/ipv4/inet_diag.c: request_module("net-pf-%d-proto-%d-type-%d", PF_NETLINK,
> net/ipv6/af_inet6.c: request_module("net-pf-%d-proto-%d-type-%d",
> net/ipv6/af_inet6.c: request_module("net-pf-%d-proto-%d",
> net/netlink/af_netlink.c: request_module("net-pf-%d-proto-%d", PF_NETLINK, protocol);
> [acme@doppio linux-2.6]$
> 
> Nah, perhaps not...

maybe it is not such a bad idea. Every protocol seems to have its own
code in it. I am using this:

#if defined(CONFIG_KMOD)
        if (!bt_proto[proto]) {
                request_module("bt-proto-%d", proto);
        }
#endif

Regards

Marcel



  reply	other threads:[~2008-10-01 15:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-01 10:12 [PATCH 0/6] [RFC] Phonet pipes protocol (v2) Rémi Denis-Courmont
2008-10-01 10:13 ` [PATCH 1/6] Phonet: transport protocol auto-loading Remi Denis-Courmont
2008-10-01 12:45   ` Arnaldo Carvalho de Melo
2008-10-01 15:01     ` Marcel Holtmann [this message]
2008-10-03 13:49     ` Rémi Denis-Courmont
2008-10-01 10:13 ` [PATCH 2/6] Phonet: connected sockets glue Remi Denis-Courmont
2008-10-01 12:48   ` Arnaldo Carvalho de Melo
2008-10-01 10:13 ` [PATCH 3/6] Phonet: Pipe End Point for Phonet Pipes protocol Remi Denis-Courmont
2008-10-01 13:18   ` Arnaldo Carvalho de Melo
2008-10-02 10:50     ` Rémi Denis-Courmont
2008-10-02 13:41       ` Arnaldo Carvalho de Melo
2008-10-01 10:13 ` [PATCH 4/6] Phonet: receive pipe control requests as out-of-band data Remi Denis-Courmont
2008-10-01 10:13 ` [PATCH 5/6] Phonet: implement GPRS virtual interface over PEP socket Remi Denis-Courmont
2008-10-01 13:32   ` Arnaldo Carvalho de Melo
2008-10-01 10:13 ` [PATCH 6/6] Phonet: pipe end-point protocol documentation Remi Denis-Courmont
2008-10-01 15:19   ` Randy Macleod
2008-10-10 18:24   ` Randy Macleod
2008-10-11 19:30     ` David Miller
2008-10-14 15:06       ` Randy Macleod
2008-10-14 20:49         ` David Miller
2008-10-14 15:11       ` Randy Macleod

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1222873275.11272.13.camel@violet.holtmann.net \
    --to=marcel@holtmann.org \
    --cc=acme@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=remi.denis-courmont@nokia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).