public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>, passt-dev@passt.top
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 0/7] RFC: Allow NAT-to-host address to be configured explicitly
Date: Mon,  1 May 2023 21:06:55 +1000	[thread overview]
Message-ID: <20230501110702.3915529-1-david@gibson.dropbear.id.au> (raw)

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


             reply	other threads:[~2023-05-01 11:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-01 11:06 David Gibson [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230501110702.3915529-1-david@gibson.dropbear.id.au \
    --to=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).