<feed xmlns='http://www.w3.org/2005/Atom'>
<title>passt/tap.c, branch 2026_12_04.a39d958</title>
<subtitle>Plug A Simple Socket Transport</subtitle>
<link rel='alternate' type='text/html' href='https://passt.top/passt/'/>
<entry>
<title>treewide: no L2 buffer in splice-only mode</title>
<updated>2026-12-04T21:54:18+00:00</updated>
<author>
<name>Stuart McLaren</name>
<email>stuart.mclaren@hpe.com</email>
</author>
<published>2026-12-03T17:56:24+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=66e115b7f2188dd8d49d5738959fecc540ce9727'/>
<id>66e115b7f2188dd8d49d5738959fecc540ce9727</id>
<content type='text'>
Save memory by not initializing L2 memory buffers when
running in --splice-only mode.

This reduces pasta memory use when running splice only.
For example, on one measured system, VmRSS went from
~12 MB to ~3 MB.

Signed-off-by: Stuart McLaren &lt;stuart.mclaren@hpe.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Save memory by not initializing L2 memory buffers when
running in --splice-only mode.

This reduces pasta memory use when running splice only.
For example, on one measured system, VmRSS went from
~12 MB to ~3 MB.

Signed-off-by: Stuart McLaren &lt;stuart.mclaren@hpe.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tap: Explicitly drop outbound IPv6 fragments, warn about them</title>
<updated>2026-11-29T23:37:09+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2026-11-24T01:48:34+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=6637c202f26101af8a058729266211bbbb14ac05'/>
<id>6637c202f26101af8a058729266211bbbb14ac05</id>
<content type='text'>
In the previous patch, we fixed the loop in ipv6_l4hdr(), which was
previously, implicitly, dropping IPv6 fragments.  Now we have to
reintroduce dropping of IPv6 fragments in an explicit way.  Adopt the
same approach as we have for IPv4 with a separate function,
tap6_is_fragment(), counting fragments and reporting rate-limited
warnings.

From a standards perspective, note that RFC 7045 doesn't mention any
particular recommendation but refers to an expired Internet-Draft,
draft-taylor-v6ops-fragdrop-02, which concludes, in section 2.1.5:

   Operators weigh the risks associated with each of the considerations
   just enumerated, and come up with the most suitable policy for their
   circumstances.  It is likely that at least some operators will find
   it desirable to drop fragments in at least some cases.

given that forwarding fragments makes little sense in our case, and
that it would add substantial complexity, consider it desirable and
continue dropping them.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the previous patch, we fixed the loop in ipv6_l4hdr(), which was
previously, implicitly, dropping IPv6 fragments.  Now we have to
reintroduce dropping of IPv6 fragments in an explicit way.  Adopt the
same approach as we have for IPv4 with a separate function,
tap6_is_fragment(), counting fragments and reporting rate-limited
warnings.

From a standards perspective, note that RFC 7045 doesn't mention any
particular recommendation but refers to an expired Internet-Draft,
draft-taylor-v6ops-fragdrop-02, which concludes, in section 2.1.5:

   Operators weigh the risks associated with each of the considerations
   just enumerated, and come up with the most suitable policy for their
   circumstances.  It is likely that at least some operators will find
   it desirable to drop fragments in at least some cases.

given that forwarding fragments makes little sense in our case, and
that it would add substantial complexity, consider it desirable and
continue dropping them.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tap: Don't drop all packets with extension headers in ipv6_l4hdr()</title>
<updated>2026-11-29T23:37:09+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2026-11-24T01:09:04+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=04623ac947118f7466fde7a7d399ce495608d5af'/>
<id>04623ac947118f7466fde7a7d399ce495608d5af</id>
<content type='text'>
The loop in ipv6_l4hdr() was intended to skip extension headers (which
we can't forward), but as we exit that function without dropping the
last one we find (if any), we'll actually discard packets because the
last extension header is used as Layer-4 header, which is later
handled as having an unknown protocol number.

This is in contrast with the recommendation from RFC 7045, which says
that any forwarding node should forward packets regardless of any
extension header.  Notably, that RFC, and no current normative
standards for that matter, doesn't introduce any particular
requirement regarding the forwarding of extension headers themselves,
so it's probably fine that we drop them (we have no choice anyway).

Drop the last extension header we find, before leaving ipv6_l4hdr().

Fixing this carries the unintendend consequence that IPv6 fragments
would be forwarded (not as fragments though), but, just like we do
for IPv4, we want to drop them instead.  The next patch will take care
of that.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The loop in ipv6_l4hdr() was intended to skip extension headers (which
we can't forward), but as we exit that function without dropping the
last one we find (if any), we'll actually discard packets because the
last extension header is used as Layer-4 header, which is later
handled as having an unknown protocol number.

This is in contrast with the recommendation from RFC 7045, which says
that any forwarding node should forward packets regardless of any
extension header.  Notably, that RFC, and no current normative
standards for that matter, doesn't introduce any particular
requirement regarding the forwarding of extension headers themselves,
so it's probably fine that we drop them (we have no choice anyway).

Drop the last extension header we find, before leaving ipv6_l4hdr().

Fixing this carries the unintendend consequence that IPv6 fragments
would be forwarded (not as fragments though), but, just like we do
for IPv4, we want to drop them instead.  The next patch will take care
of that.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tap: Drop IPv6 packets with outbound v4-mapped addresses as well</title>
<updated>2026-11-29T23:37:09+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2026-11-23T23:31:12+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=1bae956a89c8330bb872a90f782566bcf1605f48'/>
<id>1bae956a89c8330bb872a90f782566bcf1605f48</id>
<content type='text'>
...not just ones with loopback addresses.  It was a convenient way to
try out stuff, but I don't think anybody is using this (also judging
from the current KubeVirt integration), while Anders reported it as
unexpected, and David points out that even though this never became an
RFC:

  https://datatracker.ietf.org/doc/html/draft-itojun-v6ops-v4mapped-harmful-02

it's actually mentioned by RFC 4038 as a draft presenting legitimate
concerns.  In the context of this draft, it's not obvious whether we
are a router, or a node, but, arguably, we implement at least some
notion of "wire".

So, while we don't really have any formal requirement to drop those,
err on the side of caution and filter them out just like we do with
packets with loopback addresses.  Document it as well, just in case
somebody else used that trick.

Reported-by: Anders Ingemann &lt;anders@ingemann.de&gt;
Suggested-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
...not just ones with loopback addresses.  It was a convenient way to
try out stuff, but I don't think anybody is using this (also judging
from the current KubeVirt integration), while Anders reported it as
unexpected, and David points out that even though this never became an
RFC:

  https://datatracker.ietf.org/doc/html/draft-itojun-v6ops-v4mapped-harmful-02

it's actually mentioned by RFC 4038 as a draft presenting legitimate
concerns.  In the context of this draft, it's not obvious whether we
are a router, or a node, but, arguably, we implement at least some
notion of "wire".

So, while we don't really have any formal requirement to drop those,
err on the side of caution and filter them out just like we do with
packets with loopback addresses.  Document it as well, just in case
somebody else used that trick.

Reported-by: Anders Ingemann &lt;anders@ingemann.de&gt;
Suggested-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tap: Rate limit messages about filtered guest-side addresses</title>
<updated>2026-11-29T23:37:09+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2026-11-23T23:19:29+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=40ce82daa14ed6497fb1468fb3d2e9c6ee9f19bf'/>
<id>40ce82daa14ed6497fb1468fb3d2e9c6ee9f19bf</id>
<content type='text'>
Even though those are debug messages, very frequent messages would
make debugging harder.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Even though those are debug messages, very frequent messages would
make debugging harder.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tap: Move tap4_handler() / tap6_handler() adddress checks to own function</title>
<updated>2026-11-29T23:37:09+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2026-11-23T23:09:07+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=7d506434cc080aaa427ad9aa609481cc7d4014a8'/>
<id>7d506434cc080aaa427ad9aa609481cc7d4014a8</id>
<content type='text'>
This avoids some duplication and makes upcoming patches less ugly.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This avoids some duplication and makes upcoming patches less ugly.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>packet: Fix pool traversal for multi-iovec packets</title>
<updated>2026-11-27T02:53:53+00:00</updated>
<author>
<name>luffyluo</name>
<email>luffyluo@tencent.com</email>
</author>
<published>2026-11-26T16:56:10+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=15980a90f9a60e6ae9a3865bb85d20a3d8379deb'/>
<id>15980a90f9a60e6ae9a3865bb85d20a3d8379deb</id>
<content type='text'>
With vhost-user a guest frame can span several descriptors.  The pool
stores such a packet as a marker slot (iov_base == NULL, iov_len = N)
followed by N data slots, and packet_get() uses the marker to return
all N iovecs at once.

The traversal loops in tap4_handler(), tap6_handler(),
tcp_data_from_tap() and udp_tap_handler() don't know about markers and
advance one slot at a time: after handling the packet from its marker
they land on its first data slot, where iov_base != NULL, so
packet_get() hands back that slot alone, as if it were a whole
single-iovec packet.  Parsing that fragment as a complete frame is
what breaks: in tcp_data_from_tap() a fragment shorter than a TCP
header makes IOV_PEEK_HEADER() fail ("TCP header not contiguous"), and
a longer one gives a th-&gt;doff read from payload bytes, so
off = th-&gt;doff * 4 exceeds the fragment length.  In udp_tap_handler()
the fragments go out as extra datagrams.

Fix it with packet_next(), returning the index of the packet following
the one at a given index, and use it to advance those loops, so they
skip the data slots of the packet they just handled.  For single-iovec
packets it returns idx + 1, so tap and pasta, which always build
single-iovec tails with IOV_TAIL_FROM_BUF(), are unaffected.

Fixes: ca38be0141d1 ("packet: Add support for multi-vector packets")
Signed-off-by: luffyluo &lt;luffyluo@tencent.com&gt;
[lvivier: Fix multi-iovec return values and TCP reordering scan restart]
Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
[sbrivio: Minor style fixes]
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With vhost-user a guest frame can span several descriptors.  The pool
stores such a packet as a marker slot (iov_base == NULL, iov_len = N)
followed by N data slots, and packet_get() uses the marker to return
all N iovecs at once.

The traversal loops in tap4_handler(), tap6_handler(),
tcp_data_from_tap() and udp_tap_handler() don't know about markers and
advance one slot at a time: after handling the packet from its marker
they land on its first data slot, where iov_base != NULL, so
packet_get() hands back that slot alone, as if it were a whole
single-iovec packet.  Parsing that fragment as a complete frame is
what breaks: in tcp_data_from_tap() a fragment shorter than a TCP
header makes IOV_PEEK_HEADER() fail ("TCP header not contiguous"), and
a longer one gives a th-&gt;doff read from payload bytes, so
off = th-&gt;doff * 4 exceeds the fragment length.  In udp_tap_handler()
the fragments go out as extra datagrams.

Fix it with packet_next(), returning the index of the packet following
the one at a given index, and use it to advance those loops, so they
skip the data slots of the packet they just handled.  For single-iovec
packets it returns idx + 1, so tap and pasta, which always build
single-iovec tails with IOV_TAIL_FROM_BUF(), are unaffected.

Fixes: ca38be0141d1 ("packet: Add support for multi-vector packets")
Signed-off-by: luffyluo &lt;luffyluo@tencent.com&gt;
[lvivier: Fix multi-iovec return values and TCP reordering scan restart]
Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
[sbrivio: Minor style fixes]
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dhcpv6: Inject custom options into DHCPv6 replies</title>
<updated>2026-11-17T00:13:39+00:00</updated>
<author>
<name>Anshu Kumari</name>
<email>anskuma@redhat.com</email>
</author>
<published>2026-10-29T18:13:02+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=0acf8a908e5730ce31a8e28d5c39b269cab3ea08'/>
<id>0acf8a908e5730ce31a8e28d5c39b269cab3ea08</id>
<content type='text'>
Append user-specified options from --dhcpv6-opt to DHCPv6 reply
messages.  Options that exceed available buffer space are skipped
with a rate-limited warning.

Link: https://bugs.passt.top/show_bug.cgi?id=192
Signed-off-by: Anshu Kumari &lt;anskuma@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Append user-specified options from --dhcpv6-opt to DHCPv6 reply
messages.  Options that exceed available buffer space are skipped
with a rate-limited warning.

Link: https://bugs.passt.top/show_bug.cgi?id=192
Signed-off-by: Anshu Kumari &lt;anskuma@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>passt, pasta: Introduce unified multi-address data structures</title>
<updated>2026-11-10T23:16:36+00:00</updated>
<author>
<name>Jon Maloy</name>
<email>jmaloy@redhat.com</email>
</author>
<published>2026-11-05T00:11:12+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=7380393df27ec3ae4aacb40b6f9f25f75a11acf5'/>
<id>7380393df27ec3ae4aacb40b6f9f25f75a11acf5</id>
<content type='text'>
As preparation for supporting multiple addresses per interface,
we replace the single addr/prefix_len fields with an array. The
array consists of a new struct inany_addr_entry containing an
address and prefix length, both in inany_addr format.

Despite some code refactoring, there are only two real functional
changes:
- The indicated IPv6 prefix length is now properly stored, instead
  of being ignored and overridden with the hardcoded value 64, as
  has been the case until now.
- Since even IPv4 addresses now are stored in IPv6 format, we
  also store the corresponding prefix length in that format,
  i.e. using the range [96,128] instead of [0,32].

In conf_ip6(), the explicit IN6_IS_ADDR_UNSPECIFIED() check on the
address at the end of the function is no longer needed: for
host-discovered addresses, it is now checked inside the if (!a) block
before calling fwd_set_addr(); for user-provided addresses (via -a),
validation already rejects unspecified addresses at parse time.

Signed-off-by: Jon Maloy &lt;jmaloy@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As preparation for supporting multiple addresses per interface,
we replace the single addr/prefix_len fields with an array. The
array consists of a new struct inany_addr_entry containing an
address and prefix length, both in inany_addr format.

Despite some code refactoring, there are only two real functional
changes:
- The indicated IPv6 prefix length is now properly stored, instead
  of being ignored and overridden with the hardcoded value 64, as
  has been the case until now.
- Since even IPv4 addresses now are stored in IPv6 format, we
  also store the corresponding prefix length in that format,
  i.e. using the range [96,128] instead of [0,32].

In conf_ip6(), the explicit IN6_IS_ADDR_UNSPECIFIED() check on the
address at the end of the function is no longer needed: for
host-discovered addresses, it is now checked inside the if (!a) block
before calling fwd_set_addr(); for user-provided addresses (via -a),
validation already rejects unspecified addresses at parse time.

Signed-off-by: Jon Maloy &lt;jmaloy@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Sandbox qrap</title>
<updated>2026-07-28T16:09:54+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2026-07-18T07:32:57+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=12b02aaebcc69d4506b1a65ef8251fc0453a1d1b'/>
<id>12b02aaebcc69d4506b1a65ef8251fc0453a1d1b</id>
<content type='text'>
No sunsetting or rightsizing for you, qrap: dig, bury, and cover.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No sunsetting or rightsizing for you, qrap: dig, bury, and cover.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</pre>
</div>
</content>
</entry>
</feed>
