]> git.baikalelectronics.ru Git - kernel.git/commit
IB/cm: Remove unused and erroneous msg sequence encoding
authorHåkon Bugge <haakon.bugge@oracle.com>
Wed, 4 Jul 2018 10:48:01 +0000 (12:48 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 9 Jul 2018 17:39:28 +0000 (11:39 -0600)
commit8589947805e9dcb9139cf3ddcfc25b63932b4a67
tree8da1daac23eb0c86a5d84ff6bbd76c025c5e4131
parenta211710887ac83ff5b0161b294a5e31f5abec41f
IB/cm: Remove unused and erroneous msg sequence encoding

In cm_form_tid(), a two bit message sequence number is OR'ed into bit
31-30 of the lower TID value.

After commit 0f8015b4d0ff ("IB/cm: Randomize starting comm ID"), the
local_id is XOR'ed with a 32-bit random value. Hence, bit 31-30 in the
lower TID now has an arbitrarily value and it makes no sense to OR in
the message sequence number.

Adding to that, the evolution in use of IDR routines in cm_alloc_id()
has always had the possibility of returning a value with bit 30 set.

In addition, said bits are never checked.

Hence, remove the encoding and the corresponding enum.

Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/cm.c
drivers/infiniband/core/cm_msgs.h