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=BN+kv1hz; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 7A1E75A0278 for ; Mon, 08 Sep 2025 11:58:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202508; t=1757325501; bh=F3WgBUeG2Ve+RxDWTdqu0y3mf82j0N5u4O+UsAGAhlE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BN+kv1hzphMaUg+a3EcacX5QozRcRi9I0ECrHnU578zigv7lCno3iz/By7XKk7faR WE1yEDCuWoeKroIyEjlGFPtEMvbQo8dIiuJ0+e0OE0LXbW7Pzk4fWMe3ReUUhwlaYK lcRDsWTLomWj8u1w4CarsX/Qvy47YGjDMRs69sItCONIak78pnuvdI0OswEosDAn1b NP7hwL1IE376M/mqF96uKU6ruAZ9PFeIooVDg38jwIo92ikd/xYljfMEz4W2fxQewr aj2I1UToM5zhc95B+5yKf2N2L+XRhiTWvZabc3vxDhpVie9QXUhMArspSbg2zMAJJn mPBodHVeUGyew== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4cL2T96nMmz4wBN; Mon, 8 Sep 2025 19:58:21 +1000 (AEST) Date: Mon, 8 Sep 2025 19:57:57 +1000 From: David Gibson To: Jon Maloy Subject: Re: [PATCH v5 02/10] fwd: Added cache table for ARP/NDP contents Message-ID: References: <20250906021154.2760611-1-jmaloy@redhat.com> <20250906021154.2760611-3-jmaloy@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2VfXtvVZNPTEhJSH" Content-Disposition: inline In-Reply-To: <20250906021154.2760611-3-jmaloy@redhat.com> Message-ID-Hash: XJSAIT4BURHUN3YA3LTML3B7BJ6QNG7Y X-Message-ID-Hash: XJSAIT4BURHUN3YA3LTML3B7BJ6QNG7Y 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: --2VfXtvVZNPTEhJSH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 05, 2025 at 10:11:46PM -0400, Jon Maloy wrote: > We add a cache table to keep partial contents of the kernel ARP/NDP > tables. This way, we drastically reduce the number of netlink calls > to read those tables. >=20 > We create placeholder cache entries representing non- or not-yet- > existing ARP/NDP entries when needed. We add a short expiration time > to each such entry, so that we can know when to make repeated calls to > the kernel tables in the beginning. We also add an access counter to the > entries, to ensure that the timer becomes longer and the call frequency > abates over time if no ARP/NDP entry shows up. >=20 > For regular entries we use a much longer timer, with the purpose to > update the entry in the rare case that a remote host changes its > MAC address. >=20 > Signed-off-by: Jon Maloy Sorry, another patch reminded me of something I missed on the first pass: [snip] > +static struct mac_cache_table mac_cache; > +const uint8_t undefined_mac[6] =3D {0, 0, 0, 0, 0, 0}; We already have MAC_ZERO in util.h. --=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 --2VfXtvVZNPTEhJSH Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmi+qKUACgkQzQJF27ox 2GcoCw//faLQUhuf1OVCwp+Hgs4RFNgAllFlp31/ltghrTfVQNTa/lXtIV1d4NjT /OKqch2Q5EAsoziZL5UMb8WbjkZaLtJSlR4wSNJRk8W94fOS1z+jsfrfkIjyBjJu nmPsSeiqqeNpHbzHq756TD/ZiwyuCSeEoSXeeddLpETdFNNsoVwLpc8IslU6IeR7 fJZ/+fLnkbGlvm0mD6CFsHyhPrncyGETPHIqsPbJbtXAs85VJniZPUd2sOTk7fEI d2M2XymeYAlDrWX44Jw9Le8lB5CWoR4UwGu8ydZyKkDJqQvnlQFPbPB6RwjGCtks XR60sPEEaJDnnrpUM0r8+iUUADCRDKR6VS+g5yh82jUGvkP6iQHDbEwEjpmM7snL 2b1dC2+x1V2YnUo4YLtuQnkvUgbai3G4/Lxawq73gR/UI8Ras7mDyWa69u4RA44t 5DodljcrGfbTzzAe0Vcbo6n0d5JwMTLZaKf5FZFib+WtXRmn/jAIb2baaTXqx4gc b3F+0gb3Fa7iLWW6AjXo9sFR/8+xWyyqva/FTXmc9BM+erRKPddPMp0UetfhU87A ASgfpK0oJ9xbFoFUWK4wlLNCPpMyHQWsPWKEJbrQC3wVmtY4JxR0NVZvLw3Ml2K3 EWkuF8Z8pSBzwRZonl6m5/6qv3L7/KVGWTspGsmKpwHsv+cIff8= =+fZE -----END PGP SIGNATURE----- --2VfXtvVZNPTEhJSH--