[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250613171833.GN414686@horms.kernel.org>
Date: Fri, 13 Jun 2025 18:18:33 +0100
From: Simon Horman <horms@...nel.org>
To: John Ousterhout <ouster@...stanford.edu>
Cc: netdev@...r.kernel.org, pabeni@...hat.com, edumazet@...gle.com,
kuba@...nel.org
Subject: Re: [PATCH net-next v9 05/15] net: homa: create homa_peer.h and
homa_peer.c
On Fri, Jun 13, 2025 at 10:12:11AM -0700, John Ousterhout wrote:
> (I have implemented all of your suggestions for which there are no
> responses below)
>
> On Fri, Jun 13, 2025 at 7:40 AM Simon Horman <horms@...nel.org> wrote:
> > > +/**
> > > + * homa_peer_hash() - Hash function used for @peertab->ht.
> > > + * @data: Pointer to key for which a hash is desired. Must actually
> > > + * be a struct homa_peer_key.
> > > + * @dummy: Not used
> > > + * @seed: Seed for the hash.
> > > + * Return: A 32-bit hash value for the given key.
> > > + */
> > > +static inline u32 homa_peer_hash(const void *data, u32 dummy, u32 seed)
> >
> > Sorry if this has already been asked but can homa reuse the code in
> > drivers/md/dm-vdo/murmurhash3.c:murmurhash3_128() (after moving it
> > somewhere else).
>
> No problem; the question hasn't been asked before. I'd be happy to use
> an existing implementation of murmurhash3 but couldn't find one that
> was accessible. What do you mean by "moving it somewhere else"? Are
> you suggesting I add a new murmurhash3 implementation somewhere
> "public" in the kernel? I'm a little hesitant to do this because I'm
> not at all expert on murmurhash3: I'm not confident about getting this
> right. Also, I wouldn't feel comfortable taking on maintainer
> responsibility for this.
Hi John,
I'm suggesting moving murmurhash3_128(), say to lib/ at the top
of the Kernel tree. And I'm happy to assist with this.
Aside from being accessible, does murmurhash3_128() meet your
needs in it's current form?
>
> > > + const struct homa_peer *peer = obj;
> > > + const struct homa_peer_key *key = arg->key;
> >
> > nit: Reverse xmas tree here please.
> > Likewise elsewhere in this patchset.
> >
> > This tool can he useful here
> > https://github.com/ecree-solarflare/xmastree/commits/master/
>
> Thanks for the pointer to xmastree.pl; I wasn't aware of it and it
> will be super-helpful. I've fixed all of the reverse xmas tree issues
> now.
>
> -John-
>
Powered by blists - more mailing lists