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=hGUWG7n7; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id ED6D25A026F for ; Fri, 26 Sep 2025 03:17:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202508; t=1758849426; bh=Tv9MvbwxxXr5RtzYvkZ7f3heGec5QxldptyYIOdRJLk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hGUWG7n7KIMdBNSvHvRdg4a0tcRL4iWZU1TpPRHe28B6yZDIuIN1Qz0MTlKAWYelL jqnhPSc/xnAMwysRp6qlZaIXwWjKdRx8R7jpwzK8n8woa5Wwc13bq6nt5dWNm3h1oC 8/ur56WVet5mQrYnUTIZ8/AXAAtj4V1hDJB1eKncY7TzIl2iIKTaOZM4VoKxFcDwQi cTlq6BcOBJPFfRtbzBuWM3Yba6+4Ao1goWqdI1usY2E4+OpmT5NMHVVuA3jzU7Dw/S 2qRLPTfUb2oyuDjsac503sUMnh1RV630pnfJlbj5Vq8KcOSw9Yr4Ooox5Jbqopf1qU JsWJz2ufePPrA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4cXt3Q1BzRz4wDH; Fri, 26 Sep 2025 11:17:06 +1000 (AEST) Date: Fri, 26 Sep 2025 10:47:15 +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> <702508a5-2853-4aad-b527-63d47b9f5988@redhat.com> <38e13c6a-36cf-40ae-bbad-0f2848b78147@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JXRVlhGfi8g8gYiD" Content-Disposition: inline In-Reply-To: <38e13c6a-36cf-40ae-bbad-0f2848b78147@redhat.com> Message-ID-Hash: 37ZDOGVAJR4GQNKYJUOHATALV3NBTVN7 X-Message-ID-Hash: 37ZDOGVAJR4GQNKYJUOHATALV3NBTVN7 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: --JXRVlhGfi8g8gYiD Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 25, 2025 at 08:48:51AM -0400, Jon Maloy wrote: >=20 >=20 > On 2025-09-25 02:38, David Gibson wrote: > > On Wed, Sep 24, 2025 at 07:32:43PM -0400, Jon Maloy wrote: > > >=20 > > >=20 > > > On 2025-09-24 18:18, Jon Maloy wrote: > > > >=20 > > > >=20 > > > > On 2025-09-23 23:22, David Gibson wrote: > > > > > On Tue, Sep 23, 2025 at 09:13:30PM -0400, Jon Maloy wrote: > > >=20 > > > [...] > > >=20 > > > > > > --- a/fwd.c > > > > > > +++ b/fwd.c > > > > > > @@ -26,6 +26,8 @@ > > > > > > =A0 #include "passt.h" > > > > > > =A0 #include "lineread.h" > > > > > > =A0 #include "flow_table.h" > > > > > > +#include "arp.h" > > > > > > +#include "ndp.h" > > > > > > =A0 /* Empheral port range: values from RFC 6335 */ > > > > > > =A0 static in_port_t fwd_ephemeral_min =3D (1 << 15) + (1 << 1= 4); > > > > > > @@ -129,6 +131,15 @@ void fwd_neigh_mac_cache_alloc(const struc= t ctx *c, > > > > > > =A0=A0=A0=A0=A0 memcpy(&e->addr, addr, sizeof(*addr)); > > > > > > =A0=A0=A0=A0=A0 memcpy(e->mac, mac, ETH_ALEN); > > > > > > + > > > > > > +=A0=A0=A0 /* Send gratuitous ARP / unsolicited NA for the new = mapping */ > > > > >=20 > > > > > AFAICT this doesn't actually implement what the commit message > > > > > describes - it seems to always send an ARP/NA when the neighbour = table > > > > > is updated. > > >=20 > > > No. Check the code again. > >=20 > > Still not seeing it, I'm going to need a more specific pointer to what > > I've missed. > >=20 > Look in fwd_neigh_mac_cache_alloc(). > If the entry already exists, the function updates the mac address just to= be > on the safe side, but then returns without sending any ARP/NA. Uh... no, no it doesn't. I applied all the patches on a branch and here's what I see in fwd_neigh_mac_cache_alloc(): memcpy(&e->addr, addr, sizeof(*addr)); memcpy(e->mac, mac, ETH_ALEN); /* Send gratuitous ARP / unsolicited NA for the new mapping */ if (inany_v4(addr)) { struct in_addr ip4 =3D *inany_v4(addr); arp_send_gratuitous(c, ip4, e->mac); } else { ndp_send_unsolicited_na(c, &addr->a6); } If it updates, it ARPs. Do you have something in your tree that didn't make it into the published patches? --=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 --JXRVlhGfi8g8gYiD Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmjV4oMACgkQzQJF27ox 2GfaYg/7BHlq7O+8jQe074hvkUjbnQD1v9sEWLykEGI/ROsn0MzOkkKyk3yjvMH0 C7ERKWgqqk6AsifxugZb1FOpr5m9vCT4xmjKoaLBS//CbRCugHdmcAXYlzHAr80E DCyP94AoreipGaJGRLAs7K+/1xvLrJWG+UzO69KQLSmork2MWQjciX1RIYI35596 Llesr1P9I7O9DVmsboi4gs23sr7Q3xWaN8FwasDvAE/J0ONhOhPoO9nPL8Bq2H2Z V7/6DKMykoXSHfzvWlE95JUPwPAw1aalYDtFBeJAZ3NQ/trfEPflRbdTk/HEFx77 v3bsI6IP+X/gY1q0OmDTqRrYXbmmzOI/d5cjKTlhdwvHI4/fid9RmDoUklu+EqOC cXPR5HWEUbpnuqPnD3xRzdPHH+zXfKoSmWt4sjHVKXKkMVNpC/KXh5fH5rfwGTXi 5EX5tmQk3o4KJkUa/ZwgpwUPU4QWbiYg5kuEBow/4ObW2qQXaNWaStiPmE7lq2VZ ZDWvUBkl5AowoPvcziV3oLR3uV/Ds/USZC9hjYrMvkxajCcjxH7i9gmN9wseIPTW c8fRry4m0SIQcWHVUzRKUnIefDkPvhEtfP5K5THivNxxQ3OnPIQY21WaOOwdhk4h HDPNTJA+PkHKZkiS9GrqCGBSxybe8tb6J+uemX2ecOmlQ+aXqjY= =EPOK -----END PGP SIGNATURE----- --JXRVlhGfi8g8gYiD--