From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 016EF5A026F for ; Wed, 27 Dec 2023 21:23:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703708621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=enDr1FvuQzKrftAWClfNTMWXe+VmlGSF/5WzjeVQgyw=; b=REFDtDZzapucAtVB3qXQYzGoq7oh8jQa+DzqSixlJQxzYx4U6ecI70vJR6AlqoCEmXhhRs Qzm2e36cz+evqq5phudgAHKm9Gpa62wlXA+f773cLeUU27QCkCcSq2a7T5I6QmxWA/3+XM 5xZn6SImSQKEm9Tihto/IIPaXW2dHMU= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-110-sYgvnjHaOAiz0PZtgcI2Uw-1; Wed, 27 Dec 2023 15:23:40 -0500 X-MC-Unique: sYgvnjHaOAiz0PZtgcI2Uw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 043FD3C2B60D; Wed, 27 Dec 2023 20:23:40 +0000 (UTC) Received: from elisabeth (unknown [10.39.208.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 035C11C060AF; Wed, 27 Dec 2023 20:23:38 +0000 (UTC) Date: Wed, 27 Dec 2023 21:23:07 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v2 0/4] TCP hash table changes, in preparation for flow table Message-ID: <20231227212307.1c0ff049@elisabeth> In-Reply-To: <20231207055353.1245933-1-david@gibson.dropbear.id.au> References: <20231207055353.1245933-1-david@gibson.dropbear.id.au> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: WN7SR742FKGS5EG3QYIJJUVEYYJ62Y62 X-Message-ID-Hash: WN7SR742FKGS5EG3QYIJJUVEYYJ62Y62 X-MailFrom: sbrivio@redhat.com 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: On Thu, 7 Dec 2023 16:53:49 +1100 David Gibson wrote: > I now have an in-progress draft of a unified hash table to go with the > unified flow table. This turns out to be easier if we first make some > preliminary changes to the structure of the TCP hash table. So, here > are those. > > Changes since v1: > * Use while loops instead of some equivalent, but hard to read for > loops for the hash probing. > * Switch from probing forwards through hash buckets to probing > backwards. This makes the code closer to the version in Knuth its > based on, and thus easier to see if we've made a mistake in > adaptation. > * Improve the helpers for modular arithmetic in use > * Correct an error where we had things exactly the wrong way around > when finding entries to move during removal. > * Add a patch fixing a conceptual / documentation problem in some > adjacent code > > David Gibson (4): > tcp: Fix conceptually incorrect byte-order switch in tcp_tap_handler() > tcp: Switch hash table to linear probing instead of chaining > tcp: Implement hash table with indices rather than pointers > tcp: Don't account for hash table size in tcp_hash() Applied. -- Stefano