public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH v2 00/12] Cleanups to packet pool handling and sizing
@ 2024-12-20  8:35 David Gibson
  2024-12-20  8:35 ` [PATCH v2 01/12] test focus David Gibson
                   ` (12 more replies)
  0 siblings, 13 replies; 15+ messages in thread
From: David Gibson @ 2024-12-20  8:35 UTC (permalink / raw)
  To: Stefano Brivio, passt-dev; +Cc: David Gibson

This... is not any of the things I said I would be working on.  I can
only say that a herd of very hairy yaks led me astray.  Looking at bug
66 I spotted some problems with our handling of MTUs / maximum frame
sizes.  Looking at that I found some weirdness and some real, if
minor, bugs in the sizing and handling of the packet pools.

Changes in v2:
 * Stefano convinced me that packet_check_range() is still worthwhile.
   * So don't remove it... but in looking at it I spotted various
     flaws in the checks, so address those in a number of new patches.

David Gibson (12):
  test focus
  hack: stop on fail, but not perf fail
  make passt dumpable
  packet: Use flexible array member in struct pool
  packet: Don't pass start and offset separately too
    packet_check_range()
  packet: Don't hard code maximum packet size to UINT16_MAX
  packet: Remove unhelpful packet_get_try() macro
  util: Add abort_with_msg() and ASSERT_WITH_MSG() helpers
  packet: Distinguish severities of different packet_{add,git}_do()
    errors
  packet: Move packet length checks into packet_check_range()
  tap: Don't size pool_tap[46] for the maximum number of packets
  packet: More cautious checks to avoid pointer arithmetic UB

 dhcpv6.c      |   2 +-
 ip.c          |   2 +-
 isolation.c   |   2 +-
 packet.c      | 106 ++++++++++++++++++++++----------------------------
 packet.h      |  19 ++++++---
 passt.h       |   2 -
 tap.c         |  18 +++++++--
 tap.h         |   3 +-
 test/lib/term |   1 +
 test/lib/test |   4 +-
 test/run      |  38 +++++++++---------
 util.c        |  19 +++++++++
 util.h        |  25 +++++-------
 vu_common.c   |  34 ++++++++++------
 14 files changed, 153 insertions(+), 122 deletions(-)

-- 
2.47.1


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

end of thread, other threads:[~2024-12-20 10:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-20  8:35 [PATCH v2 00/12] Cleanups to packet pool handling and sizing David Gibson
2024-12-20  8:35 ` [PATCH v2 01/12] test focus David Gibson
2024-12-20  8:35 ` [PATCH v2 02/12] hack: stop on fail, but not perf fail David Gibson
2024-12-20  8:35 ` [PATCH v2 03/12] make passt dumpable David Gibson
2024-12-20  8:35 ` [PATCH v2 04/12] packet: Use flexible array member in struct pool David Gibson
2024-12-20  8:35 ` [PATCH v2 05/12] packet: Don't pass start and offset separately too packet_check_range() David Gibson
2024-12-20  8:35 ` [PATCH v2 06/12] packet: Don't hard code maximum packet size to UINT16_MAX David Gibson
2024-12-20  8:35 ` [PATCH v2 07/12] packet: Remove unhelpful packet_get_try() macro David Gibson
2024-12-20  8:35 ` [PATCH v2 08/12] util: Add abort_with_msg() and ASSERT_WITH_MSG() helpers David Gibson
2024-12-20  8:35 ` [PATCH v2 09/12] packet: Distinguish severities of different packet_{add,git}_do() errors David Gibson
2024-12-20  8:35 ` [PATCH v2 10/12] packet: Move packet length checks into packet_check_range() David Gibson
2024-12-20  8:35 ` [PATCH v2 11/12] tap: Don't size pool_tap[46] for the maximum number of packets David Gibson
2024-12-20  8:35 ` [PATCH v2 12/12] packet: More cautious checks to avoid pointer arithmetic UB David Gibson
2024-12-20  9:00 ` [PATCH v2 00/12] Cleanups to packet pool handling and sizing David Gibson
2024-12-20 10:06   ` 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).