public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stuart McLaren <stuart.mclaren@hpe.com>
To: passt-dev@passt.top
Cc: Stuart McLaren <stuart.mclaren@hpe.com>
Subject: [PATCH] conf: Make --splice-only and --fd mutually exclusive
Date: Fri,  4 Dec 2026 14:45:19 +0000	[thread overview]
Message-ID: <20261204144519.3194689-1-stuart.mclaren@hpe.com> (raw)

The --fd option passes in a pre-opened fd carrying layer 2 traffic
(tap datapath). In splice-only mode that datapath is unusable: with L2
buffers no longer initialised, traffic from the fd is silently
dropped. Reject the combination.

Link: https://archives.passt.top/passt-dev/20261203175624.3078368-1-stuart.mclaren@hpe.com/
Signed-off-by: Stuart McLaren <stuart.mclaren@hpe.com>
---
 conf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/conf.c b/conf.c
index d3976d3..4409ab8 100644
--- a/conf.c
+++ b/conf.c
@@ -2159,6 +2159,9 @@ void conf(struct ctx *c, int argc, char **argv)
 		if (c->no_splice)
 			die("--splice-only is incompatible with --no-splice");
 
+		if (c->fd_tap != -1)
+			die("--splice-only is incompatible with --fd");
+
 		c->host_lo_to_ns_lo = 1;
 		c->no_icmp = 1;
 		c->no_dns = 1;
-- 
2.34.1


             reply	other threads:[~2026-12-04 14:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 14:45 Stuart McLaren [this message]
2026-12-04 22:31 ` 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=20261204144519.3194689-1-stuart.mclaren@hpe.com \
    --to=stuart.mclaren@hpe.com \
    --cc=passt-dev@passt.top \
    /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).