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=202410 header.b=ZcfYl+xm; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 816B85A061A for ; Tue, 26 Nov 2024 06:31:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1732599053; bh=1Yhfdxs60xuqmKaKW8uRWPxzBcvtCiTfEGbBdKtvGFs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZcfYl+xmLBb1CkIas0xx3R9zH0xrrNxTNfaLPJGLjj3LJnXwt7VT8OXLHexL22v+6 k0U/DPkSXVYldxtU1H39XOa49lkqKXvqMMoovqLD6bNdtE8BX+aYiHzQu7NHJn6dER KWPNTU7ktcuPiPuYyFEIlMIQ2dx4CPD8VTRTFvORTACIfJgtx74ZPhpiQsZ/6+L9Wm N8/Du2u3Bi8/JIRGeuVWX7E3DVqmARdEcuSzH4wYkr+ImDfbcX9eqzntj3u7OsV+OH XGsHolvmOF73yrfCwDlMjHnbwMQQjMlkt1lWkwl+HHhEaMrxZRWbZu/WxB4VUK9jyK BUcNkjZnP2cRQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4XyB4Y4pPXz4xfg; Tue, 26 Nov 2024 16:30:53 +1100 (AEDT) Date: Tue, 26 Nov 2024 16:30:27 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] ndp: Don't send first periodic router advertisement right after guest connects Message-ID: References: <20241125080905.118341-1-sbrivio@redhat.com> <20241126054803.33a7999a@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="x6PT6At0RTTE7RlZ" Content-Disposition: inline In-Reply-To: <20241126054803.33a7999a@elisabeth> Message-ID-Hash: DMXAROYXMS2HLZ3XVYYJHH2RZYV2U3DW X-Message-ID-Hash: DMXAROYXMS2HLZ3XVYYJHH2RZYV2U3DW 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: 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: --x6PT6At0RTTE7RlZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 26, 2024 at 05:48:03AM +0100, Stefano Brivio wrote: > On Tue, 26 Nov 2024 15:22:38 +1100 > David Gibson wrote: >=20 > > On Mon, Nov 25, 2024 at 09:09:05AM +0100, Stefano Brivio wrote: > > > > > > [...] > > > > > > @@ -420,9 +420,13 @@ void ndp_timer(const struct ctx *c, const struct= timespec *now) > > > interval =3D min_rtr_adv_interval + > > > random() % (max_rtr_adv_interval - min_rtr_adv_interval); > > > =20 > > > + if (!next_ra) > > > + goto first; =20 > >=20 > > I don't think avoiding re-indenting two lines is sufficient reason to > > introduce yet another goto, though.. > >=20 > > > + > > > info("NDP: sending unsolicited RA, next in %llds", (long long)inter= val); > > > =20 > > > ndp_ra(c, &in6addr_ll_all_nodes); > > > =20 > > > +first: > > > next_ra =3D now->tv_sec + interval; > > > } =20 >=20 > At the cost of one additional line (and zero non-blank lines): Eh.. I'm not really convinced, but close enough that I can't be bothered arguing it further. Reviewed-by: David Gibson --=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 --x6PT6At0RTTE7RlZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmdFXPIACgkQzQJF27ox 2Gf5+Q/9HLpo/Xpae6aFtcAubdRLQFXO4DePWcWzdIHiFUDDfi7yCttzhGduEbAw g/D8uLH8QsdzXQcBm2yhsfmu8u5TsMBGEX+rx0gTGf+CHWLy4Xt0qpGvuw/Ap5Hd aI0k9ymn3e+D1mZk8/ac/ZvjXH5ttfVSV0ICth5IH4Za3jp4vC8bA1qEtFW9VFCQ uQFtgye/zXKOkUKwkaJPhxXbCJUaR8z+kUBQSBT0unyVJ1vzm04ezx2bG5BwTbQl Ol9neORMO4IZEEIGyDGdyfkCILrEEPz6Oslp4VDuS0Dhs/kvORsmK1eBTYrvcd8+ 7rLCupVVc4fe7/sWSSu8LCY5rEHWDEiYoshw1rDlMndvs/xuB9u/U4W/a+oiBKcR LHOl9a5VEtcvL1rPyKtvKRrewpRAolKg4f+mk5xPtN4mPFIfso9lK0ManZU1IoeP fE5Bt7HtGwttNGvKhb8m4QiP2trPj9KfN+75p3H7bAlw+GUglfeiNKNs4F5SR7ol pVG26pY2H8Yqqt8/OGXJlDdKqyxoEiK9SdTLkI8b/XhiCKA7GCIwWla7eaoObJuY JTy01afKbT+eNnqLbmbrfFyok/RWe1limSysxEQF7QkncdnEDIQDRykzhxuGFMX2 2dAFsCiqgLcxvTZQK2qGx1stHupENwHEELNJmslp2JGJePvfkMw= =eNSS -----END PGP SIGNATURE----- --x6PT6At0RTTE7RlZ--