From: Matthieu Baerts <matttbe@kernel.org>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org, dsahern@kernel.org, mptcp@lists.linux.dev
Subject: Re: [PATCH iproute2-next] ss: move to its own directory and split up ss.c
Date: Tue, 24 Nov 2026 11:41:09 +0100 [thread overview]
Message-ID: <7da8ca7b-f985-402d-a314-454c9094eb44@kernel.org> (raw)
In-Reply-To: <20261119024049.3109143-1-stephen@networkplumber.org>
Hi Stephen,
On 19/11/2026 03:40, Stephen Hemminger wrote:
> The ss command has grown over time and was a single large file.
> Move it and its filter parser to ss/ with their own Makefile, and
> split ss.c by function:
>
> ss.h shared types, option flags and prototypes
> ss.c main() and option parsing
> output.c column layout and buffered output
> sock.c output common to all socket families
> filter.c socket selection and filter expressions
> users.c socket owners and SELinux contexts from /proc
> service.c port to service name resolution
> inet.c inet_diag dumps, kill and TCPDIAG_FILE replay
> tcp.c TCP, TLS and MPTCP details
> sctp.c SCTP details
> bpf.c BPF socket-local storage
> unix.c, packet.c, xdp.c, netlink.c, vsock.c, tipc.c
> one file per socket family
> events.c -E event monitoring
> summary.c -s summary
Good idea to split ss.c!
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> Makefile | 2 +-
> misc/Makefile | 6 +-
> misc/ss.c | 5845 ---------------------------------
> ss/.gitignore | 2 +
> ss/Makefile | 21 +
> ss/bpf.c | 337 ++
> ss/events.c | 95 +
> ss/filter.c | 927 ++++++
> ss/inet.c | 580 ++++
> ss/netlink.c | 205 ++
> ss/output.c | 529 +++
> ss/packet.c | 216 ++
> ss/sctp.c | 140 +
> ss/service.c | 246 ++
> ss/sock.c | 276 ++
> ss/ss.c | 603 ++++
> ss/ss.h | 386 +++
> ss/ss_util.h | 23 +
> ss/ssfilter.h | 34 +
> ss/ssfilter.y | 369 +++
> ss/ssfilter_check.c | 104 +
> ss/summary.c | 167 +
> ss/tcp.c | 623 ++++
> ss/tipc.c | 119 +
> ss/unix.c | 140 +
> ss/users.c | 333 ++
> ss/vsock.c | 87 +
> ss/xdp.c | 170 +
> testsuite/Makefile | 2 +-
> testsuite/tests/ss/ssfilter.t | 2 +-
> 30 files changed, 6736 insertions(+), 5853 deletions(-)
I was surprised that you ended up with ~900 more lines, but I think you
missed the removal of misc/ssfilter* files.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
prev parent reply other threads:[~2026-11-24 10:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 2:40 [PATCH iproute2-next] ss: move to its own directory and split up ss.c Stephen Hemminger
2026-11-23 21:02 ` David Ahern
2026-11-24 10:41 ` Matthieu Baerts [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=7da8ca7b-f985-402d-a314-454c9094eb44@kernel.org \
--to=matttbe@kernel.org \
--cc=dsahern@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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