netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: David Miller <davem@davemloft.net>,
	LKML <linux-kernel@vger.kernel.org>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] CONNECTOR: add a proc entry to list connectors
Date: Tue, 24 Jun 2008 10:49:53 +0400	[thread overview]
Message-ID: <20080624064953.GA1736@2ka.mipt.ru> (raw)
In-Reply-To: <48604E44.5040402@cn.fujitsu.com>

Hi.

On Tue, Jun 24, 2008 at 09:30:44AM +0800, Li Zefan (lizf@cn.fujitsu.com) wrote:
> I got a problem when I wanted to check if the kernel supports process
> event connector, and It seems there's no way to do this check.
> 
> At best I can check if the kernel supports connector or not, by looking
> into /proc/net/netlink, or maybe checking the return value of bind() to
> see if it's ENOENT.
> 
> So how about add /proc/net/connector to list all supported connectors?
>  # cat /proc/net/connector
>  Name      ID
>  connector 4294967295:4294967295
>  cn_proc   1:1
>  w1        3:1

I like the idea, but if it is not appropriate way, I can extend
connector core itself so it will support not only add/remove
notification of added/removed users, but will also allow to query if
given user exists.

> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>

Ack.

> +static int cn_proc_show(struct seq_file *m, void *v)
> +{
> +	struct cn_queue_dev *dev = cdev.cbdev;
> +	struct cn_callback_entry *cbq;
> +	unsigned long flags;
> +
> +	seq_printf(m, "Name      ID\n");
> +
> +	spin_lock_irqsave(&dev->queue_lock, flags);

It can be BH lock only.

-- 
	Evgeniy Polyakov

      parent reply	other threads:[~2008-06-24  6:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-24  1:30 [PATCH] CONNECTOR: add a proc entry to list connectors Li Zefan
2008-06-24  1:45 ` David Miller
2008-06-24  1:57   ` Li Zefan
2008-06-24  6:49 ` Evgeniy Polyakov [this message]

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=20080624064953.GA1736@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=netdev@vger.kernel.org \
    /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).