mbox series

[RESEND,net-next,v2,0/4] WWAN debugfs tweaks

Message ID 20211207092140.19142-1-ryazanov.s.a@gmail.com (mailing list archive)
Headers show
Series WWAN debugfs tweaks | expand

Message

Sergey Ryazanov Dec. 7, 2021, 9:21 a.m. UTC
Resent after dependency [2] was merged to the net-next tree. Added
Leon's reviewed-by tag from the first V2 submission.

This is a follow-up series to just applied IOSM (and WWAN) debugfs
interface support [1]. The series has two main goals:
1. move the driver-specific debugfs knobs to a subdirectory;
2. make the debugfs interface optional for both IOSM and for the WWAN
   core.

As for the first part, I must say that it was my mistake. I suggested to
place debugfs entries under a common per WWAN device directory. But I
missed the driver subdirectory in the example, so it become:

/sys/kernel/debugfs/wwan/wwan0/trace

Since the traces collection is a driver-specific feature, it is better
to keep it under the driver-specific subdirectory:

/sys/kernel/debugfs/wwan/wwan0/iosm/trace

It is desirable to be able to entirely disable the debugfs interface. It
can be disabled for several reasons, including security and consumed
storage space. See detailed rationale with usage example in the 4th
patch.

The changes themselves are relatively simple, but require a code
rearrangement. So to make changes clear, I chose to split them into
preparatory and main changes and properly describe each of them.

IOSM part is compile-tested only since I do not have IOSM supported
device, so it needs Ack from the driver developers.

I would like to thank Johannes Berg and Leon Romanovsky. Their
suggestions and comments helped a lot to rework the initial
over-engineered solution to something less confusing and much more
simple. Thanks!

Changes since v1:
* 1st and 2nd patches were not changed
* add missed field description in the 3rd patch
* 4th and 5th patches have been merged into a single one with rework of
  the configuration options and and a few other fixes (see detailed
  changelog in the patch)

1. https://lore.kernel.org/netdev/20211120162155.1216081-1-m.chetan.kumar@linux.intel.com
2. https://patchwork.kernel.org/project/netdevbpf/patch/20211204174033.950528-1-arnd@kernel.org/

Cc: M Chetan Kumar <m.chetan.kumar@intel.com>
Cc: Intel Corporation <linuxwwan@intel.com>
Cc: Loic Poulain <loic.poulain@linaro.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Leon Romanovsky <leon@kernel.org>

Sergey Ryazanov (4):
  net: wwan: iosm: consolidate trace port init code
  net: wwan: iosm: allow trace port be uninitialized
  net: wwan: iosm: move debugfs knobs into a subdir
  net: wwan: make debugfs optional

 drivers/net/wwan/Kconfig                  | 13 +++++++++-
 drivers/net/wwan/iosm/Makefile            |  5 +++-
 drivers/net/wwan/iosm/iosm_ipc_debugfs.c  | 29 +++++++++++++++++++++++
 drivers/net/wwan/iosm/iosm_ipc_debugfs.h  | 17 +++++++++++++
 drivers/net/wwan/iosm/iosm_ipc_imem.c     | 13 ++++------
 drivers/net/wwan/iosm/iosm_ipc_imem.h     |  6 +++++
 drivers/net/wwan/iosm/iosm_ipc_imem_ops.c | 18 --------------
 drivers/net/wwan/iosm/iosm_ipc_imem_ops.h |  2 +-
 drivers/net/wwan/iosm/iosm_ipc_trace.c    | 23 ++++++++++++------
 drivers/net/wwan/iosm/iosm_ipc_trace.h    | 25 ++++++++++++++++++-
 drivers/net/wwan/wwan_core.c              | 17 +++++++++----
 include/linux/wwan.h                      |  7 ++++++
 12 files changed, 134 insertions(+), 41 deletions(-)
 create mode 100644 drivers/net/wwan/iosm/iosm_ipc_debugfs.c
 create mode 100644 drivers/net/wwan/iosm/iosm_ipc_debugfs.h

Comments

Loic Poulain Dec. 7, 2021, 9:54 a.m. UTC | #1
On Tue, 7 Dec 2021 at 10:21, Sergey Ryazanov <ryazanov.s.a@gmail.com> wrote:
>
> Resent after dependency [2] was merged to the net-next tree. Added
> Leon's reviewed-by tag from the first V2 submission.
>
> This is a follow-up series to just applied IOSM (and WWAN) debugfs
> interface support [1]. The series has two main goals:
> 1. move the driver-specific debugfs knobs to a subdirectory;
> 2. make the debugfs interface optional for both IOSM and for the WWAN
>    core.
>
> As for the first part, I must say that it was my mistake. I suggested to
> place debugfs entries under a common per WWAN device directory. But I
> missed the driver subdirectory in the example, so it become:
>
> /sys/kernel/debugfs/wwan/wwan0/trace
>
> Since the traces collection is a driver-specific feature, it is better
> to keep it under the driver-specific subdirectory:
>
> /sys/kernel/debugfs/wwan/wwan0/iosm/trace
>
> It is desirable to be able to entirely disable the debugfs interface. It
> can be disabled for several reasons, including security and consumed
> storage space. See detailed rationale with usage example in the 4th
> patch.
>
> The changes themselves are relatively simple, but require a code
> rearrangement. So to make changes clear, I chose to split them into
> preparatory and main changes and properly describe each of them.
>
> IOSM part is compile-tested only since I do not have IOSM supported
> device, so it needs Ack from the driver developers.
>
> I would like to thank Johannes Berg and Leon Romanovsky. Their
> suggestions and comments helped a lot to rework the initial
> over-engineered solution to something less confusing and much more
> simple. Thanks!

Looks good.

Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Kumar, M Chetan Dec. 7, 2021, 12:29 p.m. UTC | #2
> -----Original Message-----
> From: Sergey Ryazanov <ryazanov.s.a@gmail.com>
> Sent: Tuesday, December 7, 2021 2:52 PM
> To: David S . Miller <davem@davemloft.net>; Jakub Kicinski
> <kuba@kernel.org>
> Cc: netdev@vger.kernel.org; Kumar, M Chetan
> <m.chetan.kumar@intel.com>; linuxwwan <linuxwwan@intel.com>; Loic
> Poulain <loic.poulain@linaro.org>; Johannes Berg
> <johannes@sipsolutions.net>; Leon Romanovsky <leon@kernel.org>
> Subject: [PATCH RESEND net-next v2 0/4] WWAN debugfs tweaks
> 
> Resent after dependency [2] was merged to the net-next tree. Added Leon's
> reviewed-by tag from the first V2 submission.
> 
> This is a follow-up series to just applied IOSM (and WWAN) debugfs interface
> support [1]. The series has two main goals:
> 1. move the driver-specific debugfs knobs to a subdirectory; 2. make the
> debugfs interface optional for both IOSM and for the WWAN
>    core.
> 
> As for the first part, I must say that it was my mistake. I suggested to place
> debugfs entries under a common per WWAN device directory. But I missed
> the driver subdirectory in the example, so it become:
> 
> /sys/kernel/debugfs/wwan/wwan0/trace
> 
> Since the traces collection is a driver-specific feature, it is better to keep it
> under the driver-specific subdirectory:
> 
> /sys/kernel/debugfs/wwan/wwan0/iosm/trace
> 
> It is desirable to be able to entirely disable the debugfs interface. It can be
> disabled for several reasons, including security and consumed storage space.
> See detailed rationale with usage example in the 4th patch.
> 
> The changes themselves are relatively simple, but require a code
> rearrangement. So to make changes clear, I chose to split them into
> preparatory and main changes and properly describe each of them.
> 
> IOSM part is compile-tested only since I do not have IOSM supported device,
> so it needs Ack from the driver developers.
> 
> I would like to thank Johannes Berg and Leon Romanovsky. Their suggestions
> and comments helped a lot to rework the initial over-engineered solution to
> something less confusing and much more simple. Thanks!
> 
> Changes since v1:
> * 1st and 2nd patches were not changed
> * add missed field description in the 3rd patch
> * 4th and 5th patches have been merged into a single one with rework of
>   the configuration options and and a few other fixes (see detailed
>   changelog in the patch)
> 
> 1. https://lore.kernel.org/netdev/20211120162155.1216081-1-
> m.chetan.kumar@linux.intel.com
> 2.
> https://patchwork.kernel.org/project/netdevbpf/patch/20211204174033.950
> 528-1-arnd@kernel.org/

Acked-by: M Chetan Kumar <m.chetan.kumar@intel.com>
patchwork-bot+netdevbpf@kernel.org Dec. 9, 2021, 2:10 a.m. UTC | #3
Hello:

This series was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue,  7 Dec 2021 12:21:36 +0300 you wrote:
> Resent after dependency [2] was merged to the net-next tree. Added
> Leon's reviewed-by tag from the first V2 submission.
> 
> This is a follow-up series to just applied IOSM (and WWAN) debugfs
> interface support [1]. The series has two main goals:
> 1. move the driver-specific debugfs knobs to a subdirectory;
> 2. make the debugfs interface optional for both IOSM and for the WWAN
>    core.
> 
> [...]

Here is the summary with links:
  - [RESEND,net-next,v2,1/4] net: wwan: iosm: consolidate trace port init code
    https://git.kernel.org/netdev/net-next/c/e9877d4ef856
  - [RESEND,net-next,v2,2/4] net: wwan: iosm: allow trace port be uninitialized
    https://git.kernel.org/netdev/net-next/c/13b94fbaa28c
  - [RESEND,net-next,v2,3/4] net: wwan: iosm: move debugfs knobs into a subdir
    https://git.kernel.org/netdev/net-next/c/cf90098dbb1f
  - [RESEND,net-next,v2,4/4] net: wwan: make debugfs optional
    https://git.kernel.org/netdev/net-next/c/283e6f5a8166

You are awesome, thank you!