From: Greg KH <gregkh@linuxfoundation.org>
To: "D. Starke" <daniel.starke@siemens.com>
Cc: linux-serial@vger.kernel.org, jirislaby@kernel.org,
ilpo.jarvinen@linux.intel.com, felix-haase@siemens.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 09/10] tty: n_gsm: expose configuration and statistics via proc fs
Date: Tue, 30 May 2023 12:23:46 +0100 [thread overview]
Message-ID: <2023053053-cider-canopy-36ae@gregkh> (raw)
In-Reply-To: <20230517155704.5701-9-daniel.starke@siemens.com>
On Wed, May 17, 2023 at 05:57:03PM +0200, D. Starke wrote:
> From: Daniel Starke <daniel.starke@siemens.com>
>
> The n_gsm mux collects various statistics about the mux and its channels.
> These are currently not exposed to the user. There exists already a proc fs
> path for tty ldiscs (/proc/tty/ldisc).
>
> Extend this path by an 'n_gsm' node and create a proc file for each mux
> instance if active. The file exposes protocol statistics and channel states
> and configuration to the user. Mutex based locks are introduced to avoid
> inconsistent states.
>
> The following shows an example output:
> tty:ttyS1 flags:
> initiator:1 mode:1 mru:64 mtu:64 t1:10 t2:34 t3:10 n2:3 k:2 wc:0 ka:100
> bad_fcs:0 malformed:0 io_error:0 open_error:0 bad_size:0 unsupported:0
>
> dlci:0 state:OPEN cl:2 prio:0 i:UIH k:2 mtu:64 tx:35 rx:35
>
> Description:
> tty: The underlying device used by this mux.
> flags: Tty flags relevant to the mux protocol.
> initiator: 0 for responder, 1 for initiator.
> mode: 0 for basic option mode, 1 for advanced option mode
> mru: Maximum receive unit size.
> mtu: Maximum transmission unit size.
> t1: Acknowledgment timer.
> t2: Response timer for multiplexer control channel.
> t3: Response timer for wake-up procedure.
> n2: Maximum number of retransmissions.
> k: Window size.
> wc: Wait for configuration before starting parameter negotiation?
> ka: Control channel keep-alive timer (0 if disabled).
> bad_fcs: Number of bad FCS.
> malformed: Number of malformed frames.
> io_error: Number of I/O errors on the underlying tty.
> open_error: Number of failed DLCI open attempts.
> bad_size: Number of n_gsm frames with bad size.
> unsupported: Number of malformed control frames.
> dlci: Related channel number.
> state: Current channel state. Possible values are CLOSED,
> WAITING_CONFIG, CONFIGURE, OPENING, OPEN and CLOSING.
> cl: Convergence layer type.
> prio: Priority.
> i: Framing. Possible values are UI and UIH.
> k: Window size.
> mtu: Maximum transmission unit size.
> tx: Transmitted payload size in bytes (incl. convergence layer
> type header).
> rx: Received payload size in bytes (incl. convergence layer type
> header).
>
> All timers are in 1/100th of a second units.
Please no, procfs is NOT for driver/device statistics like this, that's
what sysfs is for if you really need/want it.
What userspace tool is going to read/parse this thing? Where does it
live?
And what about the security issues involved with all of this new data
that you are now exposing to all users? Has it been audited to verify
that it is safe to do so?
thanks,
greg k-h
next prev parent reply other threads:[~2023-05-30 11:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-17 15:56 [PATCH v5 01/10] tty: n_gsm: add restart flag to DLC specific ioctl config D. Starke
2023-05-17 15:56 ` [PATCH v5 02/10] tty: n_gsm: add missing description to structs in gsmmux.h D. Starke
2023-05-17 15:56 ` [PATCH v5 03/10] tty: n_gsm: remove unneeded initialization of ret in gsm_dlci_config D. Starke
2023-05-17 15:56 ` [PATCH v5 04/10] tty: n_gsm: add open_error counter to gsm_mux D. Starke
2023-05-17 15:56 ` [PATCH v5 05/10] tty: n_gsm: increase malformed counter for malformed control frames D. Starke
2023-05-17 15:57 ` [PATCH v5 06/10] tty: n_gsm: increase gsm_mux unsupported counted where appropriate D. Starke
2023-05-17 15:57 ` [PATCH v5 07/10] tty: n_gsm: cleanup gsm_control_command and gsm_control_reply D. Starke
2023-05-17 15:57 ` [PATCH v5 08/10] tty: n_gsm: add DLCI specific rx/tx statistics D. Starke
2023-05-17 15:57 ` [PATCH v5 09/10] tty: n_gsm: expose configuration and statistics via proc fs D. Starke
2023-05-30 11:23 ` Greg KH [this message]
2023-08-16 4:51 ` Starke, Daniel
2023-08-16 6:03 ` Greg KH
2023-05-17 15:57 ` [PATCH v5 10/10] tty: n_gsm: add restart flag to extended ioctl config D. Starke
2023-05-30 11:21 ` [PATCH v5 01/10] tty: n_gsm: add restart flag to DLC specific " Greg KH
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=2023053053-cider-canopy-36ae@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=daniel.starke@siemens.com \
--cc=felix-haase@siemens.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@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).