public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: passt-dev@passt.top, Stefano Brivio <sbrivio@redhat.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH v18 9/9] debug
Date: Wed, 12 Feb 2025 18:07:21 +1100	[thread overview]
Message-ID: <20250212070721.1746128-10-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <20250212070721.1746128-1-david@gibson.dropbear.id.au>

---
 tcp.c                      | 4 ++++
 test/lib/setup             | 4 +++-
 test/migrate/rampstream_in | 7 ++++---
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/tcp.c b/tcp.c
index 9717c355..e70e8410 100644
--- a/tcp.c
+++ b/tcp.c
@@ -3237,6 +3237,8 @@ int tcp_flow_migrate_source_ext(int fd, int fidx,
 	      t->sndq, t->notsent, t->rcvq);
 	debug("  window: snd_wl1 %u snd_wnd %u max %u rcv_wnd %u rcv_wup %u",
 	      t->snd_wl1, t->snd_wnd, t->max_window, t->rcv_wnd, t->rcv_wup);
+	debug("  SO_PEEK_OFF %s  offset=%"PRIu32,
+	      peek_offset_cap ? "enabled" : "disabled", peek_offset);
 
 	/* Endianness fix-ups */
 	t->seq_snd	= htonl(t->seq_snd);
@@ -3444,6 +3446,8 @@ int tcp_flow_migrate_target_ext(struct ctx *c, union flow *flow, int fd)
 	      t.sndq, t.notsent, t.rcvq);
 	debug("  window: snd_wl1 %u snd_wnd %u max %u rcv_wnd %u rcv_wup %u",
 	      t.snd_wl1, t.snd_wnd, t.max_window, t.rcv_wnd, t.rcv_wup);
+	debug("  SO_PEEK_OFF %s  offset=%"PRIu32,
+	      peek_offset_cap ? "enabled" : "disabled", peek_offset);
 
 	if (t.sndq > TCP_MIGRATE_SND_QUEUE_MAX || t.notsent > t.sndq ||
 	    t.rcvq > TCP_MIGRATE_RCV_QUEUE_MAX) {
diff --git a/test/lib/setup b/test/lib/setup
index 575bc215..8b9927bf 100755
--- a/test/lib/setup
+++ b/test/lib/setup
@@ -350,6 +350,8 @@ setup_migrate() {
 
 	sleep 1
 
+	[ ${PCAP} -eq 1 ] && context_run_bg mon dumpcap -w ${LOGDIR}/fabric.pcap -i lo
+
 	__opts="--vhost-user"
 	[ ${PCAP} -eq 1 ] && __opts="${__opts} -p ${LOGDIR}/passt_1.pcap"
 	[ ${DEBUG} -eq 1 ] && __opts="${__opts} -d"
@@ -365,7 +367,7 @@ setup_migrate() {
 	[ ${DEBUG} -eq 1 ] && __opts="${__opts} -d"
 	[ ${TRACE} -eq 1 ] && __opts="${__opts} --trace"
 
-	context_run_bg passt_2 "./passt -s ${STATESETUP}/passt_2.socket -P ${STATESETUP}/passt_2.pid -f ${__opts} -t 10004 -u 10004"
+	context_run_bg passt_2 "strace -o ${LOGDIR}/passt_2.strace ./passt -s ${STATESETUP}/passt_2.socket -P ${STATESETUP}/passt_2.pid -f ${__opts} -t 10004 -u 10004"
 	wait_for [ -f "${STATESETUP}/passt_2.pid" ]
 
 	context_run_bg passt_repair_2 "./passt-repair ${STATESETUP}/passt_2.socket.repair"
diff --git a/test/migrate/rampstream_in b/test/migrate/rampstream_in
index a37606f0..7c8892af 100644
--- a/test/migrate/rampstream_in
+++ b/test/migrate/rampstream_in
@@ -29,9 +29,10 @@ check	[ -n "__IFNAME1__" ]
 test	DHCP: address
 guest1	ip link set dev __IFNAME1__ up
 guest1	/sbin/dhclient -4 __IFNAME1__
-g1out	ADDR1 ip -j -4 addr show|jq -rM '.[] | select(.ifname == "__IFNAME1__").addr_info[0].local'
-hout	HOST_ADDR ip -j -4 addr show|jq -rM '.[] | select(.ifname == "__HOST_IFNAME__").addr_info[0].local'
-check	[ "__ADDR1__" = "__HOST_ADDR__" ]
+#g1out	ADDR1 ip -j -4 addr show|jq -rM '.[] | select(.ifname == "__IFNAME1__").addr_info[0].local'
+#hout	HOST_ADDR ip -j -4 addr show|jq -rM '.[] | select(.ifname == "__HOST_IFNAME__").addr_info[0].local'
+#check	[ "__ADDR1__" = "__HOST_ADDR__" ]
+set	ADDR1 127.0.0.1
 
 test	DHCPv6: address
 # Link is up now, wait for DAD to complete
-- 
@@ -29,9 +29,10 @@ check	[ -n "__IFNAME1__" ]
 test	DHCP: address
 guest1	ip link set dev __IFNAME1__ up
 guest1	/sbin/dhclient -4 __IFNAME1__
-g1out	ADDR1 ip -j -4 addr show|jq -rM '.[] | select(.ifname == "__IFNAME1__").addr_info[0].local'
-hout	HOST_ADDR ip -j -4 addr show|jq -rM '.[] | select(.ifname == "__HOST_IFNAME__").addr_info[0].local'
-check	[ "__ADDR1__" = "__HOST_ADDR__" ]
+#g1out	ADDR1 ip -j -4 addr show|jq -rM '.[] | select(.ifname == "__IFNAME1__").addr_info[0].local'
+#hout	HOST_ADDR ip -j -4 addr show|jq -rM '.[] | select(.ifname == "__HOST_IFNAME__").addr_info[0].local'
+#check	[ "__ADDR1__" = "__HOST_ADDR__" ]
+set	ADDR1 127.0.0.1
 
 test	DHCPv6: address
 # Link is up now, wait for DAD to complete
-- 
2.48.1


      parent reply	other threads:[~2025-02-12  7:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12  7:07 [PATCH v18 0/9] State migration (kinda draft again) David Gibson
2025-02-12  7:07 ` [PATCH v18 1/9] migrate: Skeleton of live migration logic David Gibson
2025-02-12  7:07 ` [PATCH v18 2/9] migrate: Migrate guest observed addresses David Gibson
2025-02-12  7:07 ` [PATCH v18 3/9] Add interfaces and configuration bits for passt-repair David Gibson
2025-02-12  7:07 ` [PATCH v18 4/9] vhost_user: Make source quit after reporting migration state David Gibson
2025-02-12  7:07 ` [PATCH v18 5/9] tcp: Get bound address for connected inbound sockets too David Gibson
2025-02-12  7:07 ` [PATCH v18 6/9] migrate: Migrate TCP flows David Gibson
2025-02-12  7:07 ` [PATCH v18 7/9] rampstream: Add utility to test for corruption of data streams David Gibson
2025-02-12 19:44   ` Stefano Brivio
2025-02-12  7:07 ` [PATCH v18 8/9] test: Add migration tests David Gibson
2025-02-12  7:07 ` David Gibson [this message]

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=20250212070721.1746128-10-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).