From: Alex Rosenbaum <firstname.lastname@example.org> To: Tom Talpey <email@example.com> Cc: Mark Zhang <firstname.lastname@example.org>, Jason Gunthorpe <email@example.com>, RDMA mailing list <firstname.lastname@example.org>, Eran Ben Elisha <email@example.com>, Yishai Hadas <firstname.lastname@example.org>, Alex Rosenbaum <email@example.com>, Maor Gottlieb <firstname.lastname@example.org>, Leon Romanovsky <email@example.com> Subject: Re: [RFC v2] RoCE v2.0 Entropy - IPv6 Flow Label and UDP Source Port Date: Tue, 25 Feb 2020 15:20:53 +0200 Message-ID: <CAFgAxU_fZUEYrMVpoStQJGD5S5dqrkXOuzWrk0MLHF8niW7ikw@mail.gmail.com> (raw) In-Reply-To: <firstname.lastname@example.org> Mark and I where playing with your test, and plotting the results I'm sharing the png's on a temp github here: https://github.com/rosenbaumalex/hashtest/ [I wasn't sure of a better place to share them] The README.md explains the port range we used, the 3 hash's used, and a line about the results. In general, the higher the 'noise' the worse the distribution is. It seems like Mark's hash suggestion (src*31 + dst) works best. then the folding one, and last the non-folding one. I am trying to cache a few switch related hash experts to get additional feedback. Alex On Fri, Feb 21, 2020 at 4:47 PM Tom Talpey <email@example.com> wrote: > > On 2/19/2020 8:04 PM, Mark Zhang wrote: > > On 2/20/2020 1:41 AM, Tom Talpey wrote: > >> On 2/19/2020 8:06 AM, Jason Gunthorpe wrote: > >>> On Wed, Feb 19, 2020 at 02:06:28AM +0000, Mark Zhang wrote: > >>>> The symmetry is important when calculate flow_label with DstQPn/SrcQPn > >>>> for non-RDMA CM Service ID (check the first mail), so that the server > >>>> and client will have same flow_label and udp_sport. But looks like it is > >>>> not important in this case. > >>> > >>> If the application needs a certain flow label it should not rely on > >>> auto-generation, IMHO. > >>> > >>> I expect most networks will not be reversible anyhow, even with the > >>> same flow label? > >> > >> These are network flow labels, not under application control. If they > >> are under application control, that's a security issue. > >> > > > > As Jason said application is able to control it in ipv6. Besides > > application is also able to control it for non-RDMA CM Service ID in ipv4. > > Ok, well I guess that's a separate issue, let's not rathole on > it here then. > > > Hi Jason, same flow label get same UDP source port, with same UDP source > > port (along with same sIP/dIP/sPort), are networks reversible? > > > >> But I agree, if the symmetric behavior is not needed, it should be > >> ignored and a better (more uniformly distributed) hash should be chosen. > >> > >> I definitely like the simplicity and perfect flatness of the newly > >> proposed (src * 31) + dst. But that "31" causes overflow into bit 21, > >> doesn't it? (31 * 0xffff == 0x1f0000) > > > > > I think overflow doesn't matter? We have overflow anyway if > > multiplicative is used. > > Hmm, it does seem to matter because dropping bits tilts the > distribution curve. Plugging ((src * 31) + dst) & 0xFFFFF into > my little test shows some odd behaviors. It starts out flat, > then the collisions start to rise around 49000, leveling out > at 65000 to a value roughly double the initial one (528 -> 1056). > It sits there until 525700, where it falls back to the start > value (528). I don't think this is optimal :-) > > Tom.
prev parent reply index Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-01-08 14:26 Alex Rosenbaum 2020-01-15 9:48 ` Mark Zhang 2020-02-06 14:18 ` Tom Talpey 2020-02-06 14:35 ` Jason Gunthorpe 2020-02-06 14:39 ` Alex Rosenbaum 2020-02-06 15:19 ` Tom Talpey 2020-02-08 9:58 ` Alex Rosenbaum 2020-02-12 15:47 ` Tom Talpey 2020-02-13 11:03 ` Alex Rosenbaum 2020-02-13 15:26 ` Tom Talpey 2020-02-13 15:41 ` Jason Gunthorpe 2020-02-14 14:23 ` Mark Zhang 2020-02-15 6:27 ` Mark Zhang 2020-02-18 14:16 ` Tom Talpey 2020-02-18 17:41 ` Tom Talpey 2020-02-19 1:51 ` Mark Zhang 2020-02-19 2:01 ` Tom Talpey 2020-02-19 2:06 ` Mark Zhang 2020-02-19 13:06 ` Jason Gunthorpe 2020-02-19 17:41 ` Tom Talpey 2020-02-19 17:55 ` Jason Gunthorpe 2020-02-20 1:04 ` Mark Zhang 2020-02-21 14:47 ` Tom Talpey 2020-02-25 13:20 ` Alex Rosenbaum [this message]
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=CAFgAxU_fZUEYrMVpoStQJGD5S5dqrkXOuzWrk0MLHF8niW7ikw@mail.gmail.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.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
Linux-RDMA Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \ firstname.lastname@example.org public-inbox-index linux-rdma Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma AGPL code for this site: git clone https://public-inbox.org/public-inbox.git