Bug 284809 - Add more flag names in db_print_sbflags
Summary: Add more flag names in db_print_sbflags
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-14 09:53 UTC by nakayamakenjiro
Modified: 2025-02-28 16:13 UTC (History)
2 users (show)

See Also:


Attachments
The patch to add more flag names in db_print_sbflags (2.07 KB, patch)
2025-02-14 09:53 UTC, nakayamakenjiro
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nakayamakenjiro 2025-02-14 09:53:19 UTC
Created attachment 257515 [details]
The patch to add more flag names in db_print_sbflags

Current db_print_sbflags() prints only a few flag names in sys/sys/sockbuf.h.
This patch adds more flags to display more names.

e.g. after the patch applied.
```
sb_flags: 0x2161 (SB_TLS_RX, SB_UPCALL, SB_KNOTE, SB_AIO_RUNNING, SBS_CANTRCVMORE, SBS_RCVATMARK)
```
Comment 1 Gleb Smirnoff freebsd_committer freebsd_triage 2025-02-25 18:16:20 UTC
Hi! Do you use ddb(4) commands to look at the socket buffer in practice or it is just desire to make a function right as long as it exists?

In my daily development in this area, I don't use it for over a decade.  Today bhyve allows a gdb port and this is how I look at the debugged kernel. On a live system I would use dtrace to print desired values.

I'm tending to remove uipc_debug.c entirely actually.
Comment 2 nakayamakenjiro 2025-02-25 23:23:02 UTC
Thank you for your reply. Yes, it’s just that I want it to work correctly as long as it exists.
Therefore, I agree with the direction of completely removing uipc_debug.c.

Would you like to send the patch, or should I update this Bugzilla with the patch instead?
Comment 3 Mark Johnston freebsd_committer freebsd_triage 2025-02-28 16:13:09 UTC
I'd vote for just removing these functions as well.  They're not very useful in this day and age.  Alternately we could add flag name strings that can be passed to the %b format in printf(9), but IMO it's probably not worth the effort.