public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH 0/7] RFC: Allow NAT-to-host address to be configured explicitly
@ 2023-05-01 11:06 David Gibson
  2023-05-01 11:06 ` [PATCH 1/7] udp: Simplify setting of source IPv6 address for inbound packets David Gibson
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: David Gibson @ 2023-05-01 11:06 UTC (permalink / raw)
  To: Stefano Brivio, passt-dev; +Cc: David Gibson

Since the passt/pasta guest and host (usually) have the same address,
it's not possible for the guest to address the host, which is a
serious limitation.  So, passt/pasta NATs the address of the default
gateway to the host as a special case.

That can be quite limiting however.  Most obviously this prevents the
guest from addressing the gateway, which is less common than needing
to address the host, but certainly possible.  The combination of the
concepts of "gateway" and "nat to host" address makes for some extra
confusion as well.

This series separates the two concepts in both the code and the tests,
and adds a command line option for configuring the NAT to host address
explicitly (by default it remains the same as the gateway).

This isn't quite ready for merge yet.  First, I think there might be a
bug I haven't managed to track down yet which causes intermittent
failures in some of the UDP throughput tests.  Second, I don't think
we want to commit to this command line option just yet, without a look
at what further NAT cleanups we might want to do (which I'll be
looking at in the near term future).

David Gibson (7):
  udp: Simplify setting of source IPv6 address for inbound packets
  udp: Simplify setting od destination IPv6 address for inbound packets
  nat: Split notion of gateway/router from from guest-visible host
    address
  nat: Simplify --no-map-gw handling
  nat: Centralise handling of gateway versus link-local address for host
    NAT
  Allow nat-to-host addresses to be overridden
  nat, test: Test --nat-to-host option

 conf.c                | 113 ++++++++++++++++++++++++++++++------------
 dhcp.c                |  14 +++---
 dhcpv6.c              |   4 +-
 ndp.c                 |   4 +-
 passt.h               |  14 +++---
 pasta.c               |   4 +-
 tcp.c                 |  17 +++----
 test/lib/setup        |  19 +++++--
 test/lib/test         |  12 +++++
 test/passt/dhcp       |   7 ++-
 test/passt/tcp        |  10 ++--
 test/passt/udp        |   5 +-
 test/passt_in_ns/dhcp |  73 +++++++++++++++++++++++++++
 test/passt_in_ns/tcp  |  28 +++++------
 test/passt_in_ns/udp  |  14 +++---
 test/pasta/tcp        |  11 ++--
 test/pasta/udp        |   6 +--
 test/perf/passt_tcp   |  30 ++++++-----
 test/perf/passt_udp   |  26 +++++-----
 test/perf/pasta_tcp   |  26 +++++-----
 test/perf/pasta_udp   |  22 ++++----
 test/run              |   4 +-
 test/two_guests/basic |  10 ++--
 udp.c                 |  41 ++++++---------
 24 files changed, 313 insertions(+), 201 deletions(-)
 create mode 100644 test/passt_in_ns/dhcp

-- 
2.40.1


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

end of thread, other threads:[~2023-05-04 21:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-01 11:06 [PATCH 0/7] RFC: Allow NAT-to-host address to be configured explicitly David Gibson
2023-05-01 11:06 ` [PATCH 1/7] udp: Simplify setting of source IPv6 address for inbound packets David Gibson
2023-05-01 11:06 ` [PATCH 2/7] udp: Simplify setting od destination " David Gibson
2023-05-04 21:53   ` Stefano Brivio
2023-05-01 11:06 ` [PATCH 3/7] nat: Split notion of gateway/router from from guest-visible host address David Gibson
2023-05-01 11:06 ` [PATCH 4/7] nat: Simplify --no-map-gw handling David Gibson
2023-05-01 11:07 ` [PATCH 5/7] nat: Centralise handling of gateway versus link-local address for host NAT David Gibson
2023-05-01 11:07 ` [PATCH 6/7] Allow nat-to-host addresses to be overridden David Gibson
2023-05-01 11:07 ` [PATCH 7/7] nat, test: Test --nat-to-host option David Gibson
2023-05-02 21:52 ` [PATCH 0/7] RFC: Allow NAT-to-host address to be configured explicitly 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).