From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 93B365A026D for ; Thu, 7 Dec 2023 06:53:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1701928435; bh=466FHV8o2Do7v1t24By3hTqNw1DJFa6awWjaVlkHMpg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GTeAKWGCjgVyaNoi37aC6bLYZrQIOeY2QDOJ1da9mduAZZ/+eF9ZuW3TmpIKsafk/ b25u2xDIF4gevwBhTu5CrDeOnrQpRC6fRUngnQbUqxWLDanr6FKGFr3Dw6p0BTWrLt QGCFRYs3FYA/2S407SpsIYOQSzl+I+bdokWVGOJ/0Rne5kySkk0Ow6NGU3iI8uQHAF PJ6EGv5Sdmjr9jZev+1yqSvsOw9I58Og9plyKmEKAGq8Z/mNTqDbjAgW+z6P4Xrgtt 8FynupxpIbnL3HpJLe/lh04IP8G4MvtkIaf7DbCOUlEEC8zVcJEjeFgCPSv6Zytahw RfM4OCZAzsfNQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Sm3Nz5Y44z4wqN; Thu, 7 Dec 2023 16:53:55 +1100 (AEDT) Date: Thu, 7 Dec 2023 16:10:23 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 2/3] tcp: Implement hash table with indices rather than pointers Message-ID: References: <20231204031611.3566791-1-david@gibson.dropbear.id.au> <20231204031611.3566791-3-david@gibson.dropbear.id.au> <20231206203727.31014fd6@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="R7RUQv+LndrYh1uG" Content-Disposition: inline In-Reply-To: Message-ID-Hash: NHYRMTWC47WNJHTFSRPO4NGGM3SOTCDZ X-Message-ID-Hash: NHYRMTWC47WNJHTFSRPO4NGGM3SOTCDZ 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: --R7RUQv+LndrYh1uG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 07, 2023 at 12:04:18PM +1100, David Gibson wrote: > On Wed, Dec 06, 2023 at 08:37:27PM +0100, Stefano Brivio wrote: > > On Mon, 4 Dec 2023 14:16:10 +1100 > > David Gibson wrote: [snip] > > I wonder if it makes sense to take care of the possible "overflow" > > outcome from step L4. of algorithm L you mentioned in 1/3. It > > *shouldn't* because you're enforcing the minimum size of the hash > > table, I wonder if it's a good idea anyway. >=20 > Yeah, I wondered that too, it's probably a good idea for safety. I'll > look at implementing that. Hrm.. so this turns out to be trickier than I thought. The difficulty is that it means hash_probe() now needs to be able to return a failure for the "table full" case. That makes the signature much uglier to deal with. I can still do it if you think it's worth it, but I'll post v2 without that change. --=20 David Gibson | 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 --R7RUQv+LndrYh1uG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmVxU74ACgkQzQJF27ox 2GcvRQ//f/lCT4LLPE7iKBhSJ+J3HN9X/byBRHQi96gGH8SccHWYq/YEb9B1/c7G 5PMFpAURX6pe+TLyMLqQEP9tefbI4UZHfXlVq0Cn1DcpjoezVPn8BOwRnKDnMYCN iNXuYFQZaXprxlpHQdJ9oxTCONq1AD12naHdA+SBK3+upc4exFzuXVscWiSMzko1 72G/6f4lZohKPVlTWql5CdRoJXi6Tv7OEK3Vla/mS6+q+zYaKuQvHP3t690IVSFo KVi6CibDrDI+09Xddf7OgmaDvqHj5MYDZqcNRUF8e1ovyfJWZ6BVy1eb78V3pfLZ 91pk2QR8z9RTVPsGXQp3Qd08G3tR3F58ThOg6uAzpW18GYGDiJ2ntoxstMYIj39d aiJTh6Sh2VSc7cVWK1Z5uA5gowJm3hlkwiC3HkP6ZEZgrXuWCwwm85KQT4r+iy7/ BauoRcp8ZEbsSZti72KexwjschyTBzSV8VNWU7J+I9OCmY/QEtPiZYJ/2Ml+zRpi PrOt/ZSwZCW/6e9QY6ZaqUwiYERud1Wc/XxFDRcK5UyDf1KvJGafF3WRDaHu2Aa1 aWyR87cWIHHHB9SE2gkpJgf9NQf98rHLjqPJXf+ClqGMON3WF5fhGau/KxC33n1l fAvJT5Fm8IBpqtWcAN7RCyi6u0PfngKYjkQa8rMCMqrfiBQ+qCE= =+lZ1 -----END PGP SIGNATURE----- --R7RUQv+LndrYh1uG--