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 BF75E5A0272 for ; Thu, 28 Sep 2023 03:21:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1695864064; bh=4RYRSSlqC/hqPMsRuIoqakmGeSxKvtQeYK1xUv/St2Y=; h=From:To:Cc:Subject:Date:From; b=LG0uHHHJqWyOFI+g7QLAB3d0x+4Vx9oafzn8ikHH/vayVWRYaNi6za5H6H3SucHZK S2VKtiQ7d0Ei//m6WtkKuqYguIsOL1MtwjZliLIwYD23JsHVkGqX/iBUDht4Ss9gxZ UbT9o1mbNI0Hyf+xplJZ7duW04PE2tMIftgBHReQ= Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4RwwfS6X2Gz4xQ2; Thu, 28 Sep 2023 11:21:04 +1000 (AEST) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH v2 00/10] siphash: cleanups and fixes Date: Thu, 28 Sep 2023 11:20:52 +1000 Message-ID: <20230928012102.1446180-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.41.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: CMJSXVOOIBFNFDPFBEHJQWUYVSKZEXTO X-Message-ID-Hash: CMJSXVOOIBFNFDPFBEHJQWUYVSKZEXTO 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: David Gibson 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: While working on unifying the hashing for the flow table, I noticed some awkwardness in the siphash functions. While looking into that I noticed some bugs. So.. here we are. Changes since v1: * Don't accidentally increase the alignment of union inany_addr David Gibson (10): siphash: Make siphash functions consistently return 64-bit results siphash: Make sip round calculations an inline function rather than macro siphash: Add siphash_feed() helper siphash: Clean up hash finalisation with posthash_final() function siphash: Fix bug in state initialisation siphash: Use more hygienic state initialiser siphash: Use specific structure for internal state siphash: Make internal helpers public siphash, checksum: Move TBAA explanation to checksum.c siphash: Use incremental rather than all-at-once siphash functions Makefile | 2 +- checksum.c | 19 ++-- inany.h | 17 +++- siphash.c | 243 --------------------------------------------------- siphash.h | 119 +++++++++++++++++++++++-- tcp.c | 37 +++----- tcp_splice.c | 1 + 7 files changed, 159 insertions(+), 279 deletions(-) delete mode 100644 siphash.c -- 2.41.0