public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH v9 00/20] (RFC) Add vhost-user support to passt. (part 3)
@ 2024-11-04  8:39 David Gibson
  2024-11-04  8:39 ` [PATCH v9 01/20] packet: replace struct desc by struct iovec David Gibson
                   ` (21 more replies)
  0 siblings, 22 replies; 24+ messages in thread
From: David Gibson @ 2024-11-04  8:39 UTC (permalink / raw)
  To: passt-dev, Stefano Brivio; +Cc: David Gibson

This is a rebased and revised version of Laurent's vhost-user patches.

I had been working on some revisions to the IOV and buffer handling in
the existing code with the idea that the vhost-user code could be
simplified on top of it.  However, it turned out to be clearer to
implement these changes on top of vhost-user rather than the other way
around.

This is often hanging in the two guests tests, and I haven't had a
chance to debug it yet.

Laurent,

For clarity, I only made the absolute minimum changes to your patch in
order to get it to apply and compile.  Other changes I've made as
patches on top of that.  Feel free to fold the simpler revisions into
the main vhost-user patch if you want to.

v9: [David Gibson]
 - Rebased on current main
   - Conflicts with v4/v6 buffer merge addressed
   - Conflicts with TCP options construction rework addressed
 - Added several cleanup patches on top
 - Added a number of IOV and buffer cleanups on top
   - The aim is that these should allow more sharing of logic between
     the vhost-user and non-vhost-user pathes, although they've only
     minimally accomplished that so far.

v8:
  - remove iov_size() from vu_collect_one_frame()
  - move vu_packet_check_range() to vu_common.c
  - fix UDP when dlen is 0.

v7:
  - rebase
  - use vu_collect_one_frame() to do vu_collect() (collect multiple frame)
  - add vhost-user tests from Stefano

v6:
  - rebase
  - extract 3 patches from "vhost-user: add vhost-user":
      passt: rename tap_sock_init() to tap_backend_init()
      tcp: Export headers functions
      udp: Prepare udp.c to be shared with vhost-user
  - introduce new functions vu_collect_one_frame(),
    vu_collect(), vu_set_vnethdr(), vu_flush(), vu_send_single()
    to be called from tcp_vu.c, udp_vu.c and ICMP/DHCP where vhost-user
    code was duplicated.

v5:
  - rebase on top of 2024_09_06.6b38f07
  - rework udp_vu.c as ref.udp.v6 has been removed and we need to
    know if we receive IPv4 or IPv6 frame when we prepare the
    guest buffers for recvmsg()
  - remove vnet->hdrlen as the size is always the same with virtio-net v1
  - address comments from David and Stefano

v4:
  - rebase on top of 2024_08_21.1d6142f
    (rebasing on top of 620e19a1b48a ("udp: Merge udp[46]_mh_recv arrays")
     introduces a regression in the measure of the latency with UDP
     because I think I don't replace correctly ref.udp.v6 that is removed
     by this commit)
  - Addressed most of the comments from David and Stefano
    (I didn't want to postpone this version to next week,
     so I'll address the remaining comments in the next version).

v3:
  - rebase on top of flow table
  - update tcp_vu.c to look like udp_vu.c (recv()/prepare()/send_frame())
  - address comments from Stefano and David on version 2

v2:
  - remove PATCH 4
  - rewrite PATCH 2 and 3 to follow passt coding style
  - move some code from PATCH 3 to PATCH 4 (previously PATCH 5)
  - partially addressed David's comment on PATCH 5

David Gibson (12):
  vhost-user: Fix some trivial errors in comments.
  isolation: Abort if mode is not set
  vhost-user: Consistent sense when encoding IP version as boolean
  test: Fix trivial errors in two_guests_vu tests
  tcp: Use only netinet/tcp.h instead of linux/tcp.h
  tcp_vu: Share more header construction between IPv4 and IPv6 paths
  tcp: Move tcp_l2_buf_fill_headers() to tcp_buf.c
  tcp: Adjust iov_len before filling headers
  tcp: Pass TCP header and payload separately to
    tcp_update_check_tcp[46]()
  tcp: Pass TCP header and payload separately to tcp_fill_headers[46]()
  tcp: Merge tcp_update_check_tcp[46]()
  tcp: Merge tcp_fill_headers[46]() with each other

Laurent Vivier (7):
  packet: replace struct desc by struct iovec
  vhost-user: introduce virtio API
  vhost-user: introduce vhost-user API
  udp: Prepare udp.c to be shared with vhost-user
  tcp: Export headers functions
  passt: rename tap_sock_init() to tap_backend_init()
  vhost-user: add vhost-user

Stefano Brivio (1):
  test: Add tests for passt in vhost-user mode

 Makefile               |   9 +-
 conf.c                 |  21 +-
 epoll_type.h           |   4 +
 iov.c                  |   1 -
 isolation.c            |  17 +-
 packet.c               |  91 ++--
 packet.h               |  22 +-
 passt.1                |  10 +-
 passt.c                |  11 +-
 passt.h                |   6 +
 pcap.c                 |   1 -
 tap.c                  | 129 ++++--
 tap.h                  |   7 +-
 tcp.c                  | 283 ++++--------
 tcp_buf.c              |  40 +-
 tcp_internal.h         |  14 +-
 tcp_vu.c               | 465 ++++++++++++++++++++
 tcp_vu.h               |  12 +
 test/lib/perf_report   |  15 +
 test/lib/setup         |  77 +++-
 test/lib/setup_ugly    |   2 +-
 test/passt_vu          |   1 +
 test/passt_vu_in_ns    |   1 +
 test/perf/passt_vu_tcp | 211 +++++++++
 test/perf/passt_vu_udp | 159 +++++++
 test/run               |  25 ++
 test/two_guests_vu     |   1 +
 udp.c                  |  84 ++--
 udp_internal.h         |  34 ++
 udp_vu.c               | 336 ++++++++++++++
 udp_vu.h               |  13 +
 util.h                 |   8 +
 vhost_user.c           | 977 +++++++++++++++++++++++++++++++++++++++++
 vhost_user.h           | 206 +++++++++
 virtio.c               | 660 ++++++++++++++++++++++++++++
 virtio.h               | 184 ++++++++
 vu_common.c            | 385 ++++++++++++++++
 vu_common.h            |  47 ++
 38 files changed, 4213 insertions(+), 356 deletions(-)
 create mode 100644 tcp_vu.c
 create mode 100644 tcp_vu.h
 create mode 120000 test/passt_vu
 create mode 120000 test/passt_vu_in_ns
 create mode 100644 test/perf/passt_vu_tcp
 create mode 100644 test/perf/passt_vu_udp
 create mode 120000 test/two_guests_vu
 create mode 100644 udp_internal.h
 create mode 100644 udp_vu.c
 create mode 100644 udp_vu.h
 create mode 100644 vhost_user.c
 create mode 100644 vhost_user.h
 create mode 100644 virtio.c
 create mode 100644 virtio.h
 create mode 100644 vu_common.c
 create mode 100644 vu_common.h

-- 
2.47.0


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

end of thread, other threads:[~2024-11-05  1:37 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-04  8:39 [PATCH v9 00/20] (RFC) Add vhost-user support to passt. (part 3) David Gibson
2024-11-04  8:39 ` [PATCH v9 01/20] packet: replace struct desc by struct iovec David Gibson
2024-11-04  8:39 ` [PATCH v9 02/20] vhost-user: introduce virtio API David Gibson
2024-11-04  8:39 ` [PATCH v9 03/20] vhost-user: introduce vhost-user API David Gibson
2024-11-04  8:39 ` [PATCH v9 04/20] udp: Prepare udp.c to be shared with vhost-user David Gibson
2024-11-04  8:39 ` [PATCH v9 05/20] tcp: Export headers functions David Gibson
2024-11-04  8:39 ` [PATCH v9 06/20] passt: rename tap_sock_init() to tap_backend_init() David Gibson
2024-11-04  8:39 ` [PATCH v9 07/20] vhost-user: add vhost-user David Gibson
2024-11-04  8:39 ` [PATCH v9 08/20] test: Add tests for passt in vhost-user mode David Gibson
2024-11-04  8:39 ` [PATCH v9 09/20] vhost-user: Fix some trivial errors in comments David Gibson
2024-11-04  8:39 ` [PATCH v9 10/20] isolation: Abort if mode is not set David Gibson
2024-11-04  8:39 ` [PATCH v9 11/20] vhost-user: Consistent sense when encoding IP version as boolean David Gibson
2024-11-04  8:39 ` [PATCH v9 12/20] test: Fix trivial errors in two_guests_vu tests David Gibson
2024-11-04  8:39 ` [PATCH v9 13/20] tcp: Use only netinet/tcp.h instead of linux/tcp.h David Gibson
2024-11-04  8:39 ` [PATCH v9 14/20] tcp_vu: Share more header construction between IPv4 and IPv6 paths David Gibson
2024-11-04  8:39 ` [PATCH v9 15/20] tcp: Move tcp_l2_buf_fill_headers() to tcp_buf.c David Gibson
2024-11-04  8:39 ` [PATCH v9 16/20] tcp: Adjust iov_len before filling headers David Gibson
2024-11-04  8:40 ` [PATCH v9 17/20] tcp: Pass TCP header and payload separately to tcp_update_check_tcp[46]() David Gibson
2024-11-04  8:40 ` [PATCH v9 18/20] tcp: Pass TCP header and payload separately to tcp_fill_headers[46]() David Gibson
2024-11-04  8:40 ` [PATCH v9 19/20] tcp: Merge tcp_update_check_tcp[46]() David Gibson
2024-11-04  8:40 ` [PATCH v9 20/20] tcp: Merge tcp_fill_headers[46]() with each other David Gibson
2024-11-04  9:18 ` [PATCH v9 00/20] (RFC) Add vhost-user support to passt. (part 3) Stefano Brivio
2024-11-04  9:59   ` David Gibson
2024-11-05  1:10 ` David Gibson

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).