From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202508 header.b=hjJqOxcM; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 646F45A0274 for ; Fri, 26 Sep 2025 03:17:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202508; t=1758849426; bh=r7TH+o3PV/pytpsjD6tsDN1uR8mKh3XlB2Upu+nD1Qs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hjJqOxcMMvXDSWB/71aPq8fesAAtZ1mi+4PpPs0/9fkU7v3fzECrzYC9EvW6QAOF+ FNfRoyfcRraWI5SJ1404Ya4u++sLAsYYYt5orgHHLCc6ESg1TDMD+2Q0guW2tTMP6K a3Y5bZQM1X2hPFQFPFRFog5foPcU2ieazxbolU4hnzLOfrB1npBvrVLJ2eUDdyjKHl 4YqIsMOI+4/CQGoLHxwz+W21VuuBSacu+JJcYI1XG9R9P+3n934pVBuuXTtwOL+VAK HKayZnqda3MIACZ+939avW8cexZkhZbIiwcniheW2AQA5rmpX4UjYQHP8FDl7X6XmO DNk+T99tuuRdg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4cXt3Q1P4Qz4wDJ; Fri, 26 Sep 2025 11:17:06 +1000 (AEST) Date: Fri, 26 Sep 2025 10:55:43 +1000 From: David Gibson To: Jon Maloy Subject: Re: [PATCH v9 9/9] arp/ndp: send gratuitous ARP / unsolicitated NA when MAC cache entry added Message-ID: References: <20250924011330.1168921-1-jmaloy@redhat.com> <20250924011330.1168921-10-jmaloy@redhat.com> <5dda48fc-d854-436d-acd1-734d461efd59@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="De/XlW0CmDpn/5PY" Content-Disposition: inline In-Reply-To: Message-ID-Hash: P6GV3SAWIDQ5K2WKTSXGS3UHDZN7WIWX X-Message-ID-Hash: P6GV3SAWIDQ5K2WKTSXGS3UHDZN7WIWX X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: sbrivio@redhat.com, dgibson@redhat.com, passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --De/XlW0CmDpn/5PY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 25, 2025 at 09:14:42AM -0400, Jon Maloy wrote: >=20 >=20 > On 2025-09-25 02:36, David Gibson wrote: > > On Wed, Sep 24, 2025 at 06:18:52PM -0400, Jon Maloy wrote: > > >=20 > [...] > > >=20 > > > I experimented a bit with this. My test program is a simple UDP > > > client-server pair, exchanging first 3 UDP messages client->server, f= ollowed > > > by > > > 3 messages server->client. > >=20 > > With the client on the guest, and server outside? How is the outside > > machine arranged - is it a physically separate host? A bridged VM or > > container on the same host? Something else? >=20 > It is a physically separate host. >=20 > >=20 > > > First, I changed the main() loop a bit, so that netlink events are > > > handled before all other events, if any. (Basically, I added > > > an extra loop before the main loop, only handling netlink events, bef= ore > > > moving on to the main loop (where netlink events had been excluded.) > > > This should secure absolute priority of netlink events before any oth= er > > > events. As you will see below, this made no difference to the scenari= os > > > I describe. > >=20 > > Drat. > > > 1: When starting the container, I notice that there is no subscription > > > event in PASTA, even though I can see the entry for the remote ho= st > > > is present in the host's ARP table. There is never any event comi= ng > > > up even if I wait for 10+ minutes. > >=20 > > Huh.... do we need to do something to ensure we get events for > > existing entries in the host ARP table, not just ones that are added > > or updated after we're running? >=20 > It doesn't seem to be possible, Can we do an RTM_GETNEIGH, with no address specified? It's something like that we do to get all our links and addresses in other places. > but even if it were it wouldn't help us much > if the entry isn't here, which is also a problematic case. See below. >=20 > >=20 > > > 2: The first UDP is attempted sent from the guest. An ARP request is > > > sent to PASTA, and responded to with the 9a:9a: address. > >=20 > > Maybe we still need to explicitly ask for an ARP resolution when the > > guest ARPs. >=20 > I think so. If we limit this to ARP and NDP, this should be unproblematic. I just realised this is harder than I thought, though. At least if we want to get the right answer for the first guest ARP. It's not just a netlink request, we'd need to wait for the host to ARP, which means timeouts, and state we need to track, and ... --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --De/XlW0CmDpn/5PY Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmjV5I4ACgkQzQJF27ox 2GcS7Q/+O0nm5Clyn0GB6gQ6wb+QGeqa1xBKFbMjMNV6ITLJBWAQVUvbqUTm++6T wlEO2RINAE5cbW0M9WgvCiN3SPssXV9IexeEFpolAGta4vxnlHndhz2zUl9alYFJ zmWDDF8vRbz0ukLdhXjB/ks2puNt2YXl1+S3XPPTjxJ6WkzpWrMmjv1CVGVMMhbh K2GLO4v5hYe2iiXtC0Psg8EL/Ru/CBl3l77/l7cn7wobzi5/TgmdsbnZDPM0hRz/ IUKxxmaDi4PFmpH0wpFHgwXULi1MF5dxNNBaPg4T1LRAomq99mMgt/B8LUKp+U5k li4HFa12tqySoQikUU4q19IRjpCYP0I5MH6ksEijMHvhsVweN+QNCTZJKO82cqRF 0C7J/QYckXIQAQZOB6D3z7UGdGHrgiVk9OH5B5TwvhF8lxFppI9ej8WNBKccmXqY E4mJKBl+HF1Qhw9VxmjF5V9OXDY4TVgIAM4ctf7DA6zLEdRXkO9lnRIXEygm5Vwl QVZhY9d7gWErfeKG1uIadDzCChXHxylRc3/KNLc9ChVDCV8z+ypv0Ds2B0Ne2LR5 SJ4OYSA/fpdvq2nZZ8kx61gmBYenpWpbzLgw3AwLKTiHhOJwBiMfjEcv9230Hj/8 tJbmca0cvTyeqhnd5NJQV8QcNRPOoAbfbsxD9Sk9u3dnyxhUh6A= =2mbj -----END PGP SIGNATURE----- --De/XlW0CmDpn/5PY--