public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH v2 0/3] tcp: Runtime checks for availability of TCP_INFO fields
@ 2024-10-24  4:59 David Gibson
  2024-10-24  4:59 ` [PATCH v2 1/3] tcp: Remove compile-time dependency on struct tcp_info version David Gibson
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: David Gibson @ 2024-10-24  4:59 UTC (permalink / raw)
  To: passt-dev, Stefano Brivio; +Cc: David Gibson

We have a number of Makefile tests for the presence of various fields
in tcp_info.  However that only tells us if they're present in the
kernel headers against which we're compiling, not whether they're
available in the kernel we're running on.  For anything outside the
earliest forms of TCP_INFO (as described in netinet/tcp.h and shared
with BSD), we should verify at runtime if the kernel is returning that
information.

This was supposed to be leading into improved handling of lazily
calling TCP_INFO, but I hit additional complications there, so I've
postponed it.  Might as well get these bits merged, though.

v2:
 * Previous version removed some #ifdefs that were still needed.
   Simply putting them back leads to awkward duplication between the
   "compile time missing" and "run time missing" cases, so take a
   different approach which allows us to remove all of them.
 * Some wording changes

David Gibson (3):
  tcp: Remove compile-time dependency on struct tcp_info version
  tcp: Generalise probing for tcpi_snd_wnd field
  tcp: Use runtime tests for TCP_INFO fields

 Makefile       |  15 -------
 tcp.c          | 114 ++++++++++++++++++++++------------------------
 tcp_info.h     | 120 +++++++++++++++++++++++++++++++++++++++++++++++++
 tcp_internal.h |   4 +-
 4 files changed, 176 insertions(+), 77 deletions(-)
 create mode 100644 tcp_info.h

-- 
2.47.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-10-25 13:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-24  4:59 [PATCH v2 0/3] tcp: Runtime checks for availability of TCP_INFO fields David Gibson
2024-10-24  4:59 ` [PATCH v2 1/3] tcp: Remove compile-time dependency on struct tcp_info version David Gibson
2024-10-24  4:59 ` [PATCH v2 2/3] tcp: Generalise probing for tcpi_snd_wnd field David Gibson
2024-10-24  4:59 ` [PATCH v2 3/3] tcp: Use runtime tests for TCP_INFO fields David Gibson
2024-10-25 13:38 ` [PATCH v2 0/3] tcp: Runtime checks for availability of " Stefano Brivio

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).