public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH] inany: Fix doc comment to match u32 field, not u64
@ 2026-06-17 12:21 Laurent Vivier
  2026-06-18  2:52 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Vivier @ 2026-06-17 12:21 UTC (permalink / raw)
  To: passt-dev; +Cc: Laurent Vivier

The original siphash incremental patch added a u64[2] member to
union inany_addr for hashing. During review, this was changed to u32[4]
to preserve 4-byte alignment: a u64 member would have forced 8-byte
alignment on the union, mismatching struct in6_addr.

The doc comment was not updated, fix @u64 references to @u32.

Fixes: fc8f0f8c48ef ("siphash: Use incremental rather than all-at-once siphash functions")
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
 inany.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/inany.h b/inany.h
index 73385b916240..6bf3ecaa0e7d 100644
--- a/inany.h
+++ b/inany.h
@@ -22,9 +22,9 @@
  * @v4mapped.zero:	All zero-bits for an IPv4 address
  * @v4mapped.one:	All one-bits for an IPv4 address
  * @v4mapped.a4:	If @a6 is an IPv4 mapped address, the IPv4 address
- * @u64:		As an array of u64s (solely for hashing)
+ * @u32:		As an array of u32s (solely for hashing)
  *
- * @v4mapped and @u64 shouldn't be accessed except via helpers.
+ * @v4mapped and @u32 shouldn't be accessed except via helpers.
  */
 union inany_addr {
 	struct in6_addr a6;
-- 
2.54.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] inany: Fix doc comment to match u32 field, not u64
  2026-06-17 12:21 [PATCH] inany: Fix doc comment to match u32 field, not u64 Laurent Vivier
@ 2026-06-18  2:52 ` David Gibson
  0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2026-06-18  2:52 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: passt-dev

[-- Attachment #1: Type: text/plain, Size: 1544 bytes --]

On Wed, Jun 17, 2026 at 02:21:03PM +0200, Laurent Vivier wrote:
> The original siphash incremental patch added a u64[2] member to
> union inany_addr for hashing. During review, this was changed to u32[4]
> to preserve 4-byte alignment: a u64 member would have forced 8-byte
> alignment on the union, mismatching struct in6_addr.
> 
> The doc comment was not updated, fix @u64 references to @u32.
> 
> Fixes: fc8f0f8c48ef ("siphash: Use incremental rather than all-at-once siphash functions")
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  inany.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/inany.h b/inany.h
> index 73385b916240..6bf3ecaa0e7d 100644
> --- a/inany.h
> +++ b/inany.h
> @@ -22,9 +22,9 @@
>   * @v4mapped.zero:	All zero-bits for an IPv4 address
>   * @v4mapped.one:	All one-bits for an IPv4 address
>   * @v4mapped.a4:	If @a6 is an IPv4 mapped address, the IPv4 address
> - * @u64:		As an array of u64s (solely for hashing)
> + * @u32:		As an array of u32s (solely for hashing)
>   *
> - * @v4mapped and @u64 shouldn't be accessed except via helpers.
> + * @v4mapped and @u32 shouldn't be accessed except via helpers.
>   */
>  union inany_addr {
>  	struct in6_addr a6;
> -- 
> 2.54.0
> 

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-18  4:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-17 12:21 [PATCH] inany: Fix doc comment to match u32 field, not u64 Laurent Vivier
2026-06-18  2:52 ` David Gibson

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).