From: James Chapman <jchapman@katalix.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v3 04/12] l2tp: Add ppp device name to L2TP ppp session data
Date: Thu, 01 Apr 2010 08:19:43 +0100 [thread overview]
Message-ID: <4BB4490F.8090406@katalix.com> (raw)
In-Reply-To: <20100331160811.16351eb7@s6510>
Stephen Hemminger wrote:
> On Wed, 31 Mar 2010 08:43:09 +0100
> James Chapman <jchapman@katalix.com> wrote:
>
>> Stephen Hemminger wrote:
>>> On Tue, 30 Mar 2010 17:17:46 +0100
>>> James Chapman <jchapman@katalix.com> wrote:
>>>
>>>> When dumping L2TP PPP sessions using /proc/net/l2tp, get
>>>> the assigned PPP device name from PPP using ppp_dev_name().
>>>>
>>>> Signed-off-by: James Chapman <jchapman@katalix.com>
>>>> Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
>>>>
>>> Why is this a necessary API?
>>> Why not put it in debugfs if just a debugging tool?
>> With the original driver (merged in 2.6.23), some people use horrible
>> hacks in scripts to derive info about their L2TP connections from /proc.
>> So I was reluctant to move it to debugfs in the new driver. If it is ok
>> to move an existing /proc file to debugfs, I'm happy to do so. People
>> should obtain such info from their L2TP userspace daemon, or through
>> netlink anyway.
>>
>>
> Sounds like a good use of sysfs either with attribute or symlink
> back to underlying device
>
There might be thousands of L2TP sessions in some setups. Populating
sysfs with a link for each of those sessions isn't practical. The
existing /proc file dumps its info as a single text file for this
reason. I'd also like to provide the device name in the session netlink
message, which is the interface used by l2tp userspace, so I need a
kernel API to retrieve the device name from ppp.
I like the suggestion of using debugfs for access to driver debug info
though. I propose leaving the /proc file for L2TPv2 only, removing the
L2TPv3 data that I added to the proc file in this patch series, to
retain compatibility with the existing driver. This would show only
L2TPv2 sessions and tunnels. For new driver functionality (L2TPv3 etc),
use debugfs. The debugfs files would dump lists in a similar form to the
current code, listing all tunnels (L2TPv2 and L2TPv3) in a single file.
Using debugfs gives more flexibility for adding additional info later,
as required. How does that sound?
--
James Chapman
Katalix Systems Ltd
http://www.katalix.com
Catalysts for your Embedded Linux software development
next prev parent reply other threads:[~2010-04-01 7:20 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-30 16:17 [PATCH v3 00/12] l2tp: Introduce L2TPv3 support James Chapman
2010-03-30 16:17 ` [PATCH v3 01/12] l2tp: Relocate pppol2tp driver to new net/l2tp directory James Chapman
2010-03-30 16:17 ` [PATCH v3 02/12] l2tp: Split pppol2tp patch into separate l2tp and ppp parts James Chapman
2010-03-30 16:17 ` [PATCH v3 03/12] ppp: Add ppp_dev_name() exported function James Chapman
2010-03-30 16:17 ` [PATCH v3 04/12] l2tp: Add ppp device name to L2TP ppp session data James Chapman
2010-03-30 16:29 ` Stephen Hemminger
2010-03-31 7:43 ` James Chapman
2010-03-31 8:46 ` David Miller
2010-03-31 23:08 ` Stephen Hemminger
2010-04-01 7:19 ` James Chapman [this message]
2010-04-01 7:30 ` Eric Dumazet
2010-04-01 8:55 ` James Chapman
2010-04-01 7:34 ` David Miller
2010-04-01 8:59 ` James Chapman
2010-04-01 9:04 ` David Miller
2010-03-30 16:17 ` [PATCH v3 05/12] l2tp: Add L2TPv3 protocol support James Chapman
2010-03-30 16:17 ` [PATCH v3 06/12] l2tp: Update PPP-over-L2TP driver to work over L2TPv3 James Chapman
2010-03-30 16:18 ` [PATCH v3 07/12] l2tp: Add L2TPv3 IP encapsulation (no UDP) support James Chapman
2010-03-30 16:18 ` [PATCH v3 08/12] netlink: Export genl_lock() API for use by modules James Chapman
2010-03-30 16:18 ` [PATCH v3 09/12] l2tp: Add netlink control API for L2TP James Chapman
2010-03-31 8:59 ` Patrick McHardy
2010-03-30 16:18 ` [PATCH v3 10/12] l2tp: Add L2TP ethernet pseudowire support James Chapman
2010-03-30 16:30 ` Stephen Hemminger
2010-03-30 16:30 ` Stephen Hemminger
2010-03-30 16:32 ` Stephen Hemminger
2010-03-31 9:35 ` James Chapman
2010-03-31 17:38 ` Paul E. McKenney
2010-04-02 15:24 ` Paul E. McKenney
2010-04-02 15:58 ` Eric Dumazet
2010-04-02 16:21 ` Paul E. McKenney
2010-03-30 16:18 ` [PATCH v3 11/12] l2tp: Add support for static unmanaged L2TPv3 tunnels James Chapman
2010-03-30 16:18 ` [PATCH v3 12/12] l2tp: Update documentation James Chapman
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=4BB4490F.8090406@katalix.com \
--to=jchapman@katalix.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.