public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH 2/3] tcp: Implement hash table with indices rather than pointers
Date: Thu, 7 Dec 2023 16:10:23 +1100	[thread overview]
Message-ID: <ZXFTvzOqhIsjSaP5@zatzit> (raw)
In-Reply-To: <ZXEaEqMThNbyNCZi@zatzit>

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

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 <david@gibson.dropbear.id.au> 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.
> 
> 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.

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

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

  reply	other threads:[~2023-12-07  5:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04  3:16 [PATCH 0/3] RFC: TCP hash change changes, in preparation for flow table David Gibson
2023-12-04  3:16 ` [PATCH 1/3] tcp: Switch hash table to linear probing instead of chaining David Gibson
2023-12-06 22:43   ` Stefano Brivio
2023-12-07  4:11     ` David Gibson
2023-12-11  9:00       ` Stefano Brivio
2023-12-04  3:16 ` [PATCH 2/3] tcp: Implement hash table with indices rather than pointers David Gibson
2023-12-06 19:37   ` Stefano Brivio
2023-12-07  1:04     ` David Gibson
2023-12-07  5:10       ` David Gibson [this message]
2023-12-07  6:20       ` Stefano Brivio
2023-12-04  3:16 ` [PATCH 3/3] tcp: Don't account for hash table size in tcp_hash() David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZXFTvzOqhIsjSaP5@zatzit \
    --to=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).