netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Keiichi KII <k-keiichi@bx.jp.nec.com>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	mpm@selenic.com, davem@davemloft.net,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [RFC][PATCH -mm take4 2/6] support multiple logging
Date: Thu, 26 Apr 2007 13:02:04 +0900	[thread overview]
Message-ID: <4630243C.4010402@bx.jp.nec.com> (raw)
In-Reply-To: <20070424082117.354341d3@oldman>

>>>> Well..  before you can finish this work we need to decide upon what the
>>>> interface to userspace will be.
>>>>
>>>> - The miscdev isn't appropriate
>>>>
>>> Why isn't miscdev appropriate? 
>>> We just shouldn't use miscdev for networking conventionally?
>>>
>> Yes it's rather odd, especially for networking.
>>
>> What does the miscdev _do_ anyway?  Is it purely a target for the ioctls?

Yes, I purely use miscdev for the ioctls.

I want to use sysfs and ioctl to implement the dynamic configurabillity.
The sysfs shows/changes netconsole configurations(IP address, port and so on).
A userland application using the ioctl adds/removes netconsole port.

I thought that the dynamic configurability could be realized without a 
userland application. in the kernel only.
(e.g. only sysfs, no userland application)
But I think we need the function to automatically resolve the destination 
MAC address from IP address because of the resolving cost and 
I should implement a userland application, not netconsole kernel module.
The netconsle will become more useful by implementing the above function.

> Some other speculations:
> 1. Would it be possible to add ioctl's to /dev/console? This would be more in
>     keeping with older Unix style model.
> 
> 2. Using sysfs makes sense if there is a device object that exists to
>    add the sysfs attributes to.
> 
> 3. Procfs is handy for summary type tables.
> 
> 4. Netlink does feel like overkill for this. Although newer generic netlink
>    makes it easier.

If I use sysfs, Is it proper location that adds each attributes of netconsole 
port in "/sys/class/misc/netconsole/port[0-9]*", or another locations in /sys/?

Stephen Hemminger said "The configuration of netconsole's looks like the 
configuration of routes".
I think so too.
So I think ioctl commands for adding/removing port and the following userland 
application like route(8) command by using the ioctl.

e.g.
1. add port
# netconfig add 192.168.0.10 6666

2. remove port
# netconfig remove 1

3. show port info
# netconfig
id status  Source IP   Source Port Destination IP Destination Port Destination MAC
1  enable  192.168.0.1 6665        192.168.0.10   6666             00:11:22:33:44:55
2  disable 192.168.0.1 6665        192.168.0.20   6666             00:11:22:33:44:66

route(8) command uses ioctl for Netlink.
But, I'm going to implement ioctl's to /dev/console because of the above comments.

Thank you for your comments.
Any comments very welcome.
-- 
Keiichi KII
NEC Corporation OSS Promotion Center
E-mail: k-keiichi@bx.jp.nec.com


  reply	other threads:[~2007-04-26  4:02 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-18 11:49 [RFC][PATCH -mm take4 0/6] proposal for dynamic configurable netconsole Keiichi KII
2007-04-18 12:05 ` [RFC][PATCH -mm take4 1/6] marking __init Keiichi KII
2007-04-18 12:06 ` [RFC][PATCH -mm take4 2/6] support multiple logging Keiichi KII
2007-04-18 14:40   ` Stephen Hemminger
2007-04-20  9:58     ` Keiichi KII
2007-04-20  4:08   ` Andrew Morton
2007-04-20  9:51     ` Keiichi KII
2007-04-20 18:15       ` Andrew Morton
2007-04-20 18:21         ` Matt Mackall
2007-04-20 19:00           ` Stephen Hemminger
2007-04-24  8:14             ` Keiichi KII
2007-04-24  8:14         ` Keiichi KII
2007-04-24  8:29           ` Andrew Morton
2007-04-24 15:21             ` Stephen Hemminger
2007-04-26  4:02               ` Keiichi KII [this message]
2007-04-26  4:45                 ` David Miller
2007-04-18 12:08 ` [RFC][PATCH -mm take4 3/6] add interface for netconsole using sysfs Keiichi KII
2007-04-20  4:06   ` Andrew Morton
2007-04-18 12:11 ` [RFC][PATCH -mm take4 4/6] using symlink for the net_device Keiichi KII
2007-04-20  4:12   ` Andrew Morton
2007-04-18 12:12 ` [RFC][PATCH -mm take4 5/6] switch function of netpoll Keiichi KII
2007-04-18 12:14 ` [RFC][PATCH -mm take4 6/6] add ioctls for adding/removing target Keiichi KII
2007-04-20  4:16   ` Andrew Morton
2007-04-20  5:39     ` Stephen Hemminger
2007-04-20  6:59       ` David Miller

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=4630243C.4010402@bx.jp.nec.com \
    --to=k-keiichi@bx.jp.nec.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.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).