All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Talpey <tom@talpey.com>
To: Mark Zhang <markz@mellanox.com>, Jason Gunthorpe <jgg@ziepe.ca>
Cc: Alex Rosenbaum <rosenbaumalex@gmail.com>,
	RDMA mailing list <linux-rdma@vger.kernel.org>,
	Eran Ben Elisha <eranbe@mellanox.com>,
	Yishai Hadas <yishaih@mellanox.com>,
	Alex Rosenbaum <alexr@mellanox.com>,
	Maor Gottlieb <maorg@mellanox.com>,
	Leon Romanovsky <leonro@mellanox.com>
Subject: Re: [RFC v2] RoCE v2.0 Entropy - IPv6 Flow Label and UDP Source Port
Date: Fri, 21 Feb 2020 09:47:12 -0500	[thread overview]
Message-ID: <33f075e2-b5c0-53cd-6954-7ac57eeb008f@talpey.com> (raw)
In-Reply-To: <c4fc4449-94ed-805e-76d1-6ce856a4fc05@mellanox.com>

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.

  reply	other threads:[~2020-02-21 14:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08 14:26 [RFC v2] RoCE v2.0 Entropy - IPv6 Flow Label and UDP Source Port 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 [this message]
2020-02-25 13:20                                       ` Alex Rosenbaum

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=33f075e2-b5c0-53cd-6954-7ac57eeb008f@talpey.com \
    --to=tom@talpey.com \
    --cc=alexr@mellanox.com \
    --cc=eranbe@mellanox.com \
    --cc=jgg@ziepe.ca \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=maorg@mellanox.com \
    --cc=markz@mellanox.com \
    --cc=rosenbaumalex@gmail.com \
    --cc=yishaih@mellanox.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.