linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: "Håkon Bugge" <haakon.bugge@oracle.com>
Cc: Doug Ledford <dledford@redhat.com>,
	Don Hiatt <don.hiatt@intel.com>, Ira Weiny <ira.weiny@intel.com>,
	Sean Hefty <sean.hefty@intel.com>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] IB/cm: Remove unused and erroneous msg sequence encoding
Date: Mon, 9 Jul 2018 11:42:17 -0600	[thread overview]
Message-ID: <20180709174217.GA2658@ziepe.ca> (raw)
In-Reply-To: <20180704104801.912482-1-Haakon.Bugge@oracle.com>

On Wed, Jul 04, 2018 at 12:48:01PM +0200, Håkon Bugge wrote:
> In cm_form_tid(), a two bit message sequence number is OR'ed into bit
> 31-30 of the lower TID value.
> 
> After commit f06d26537559 ("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>
> ---
>  drivers/infiniband/core/cm.c      | 14 ++++++--------
>  drivers/infiniband/core/cm_msgs.h |  7 -------
>  2 files changed, 6 insertions(+), 15 deletions(-)

Applied to for-next, thanks

I suspect the bits were probably added long ago for debugging..

Jason

      reply	other threads:[~2018-07-09 17:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-04 10:48 [PATCH] IB/cm: Remove unused and erroneous msg sequence encoding Håkon Bugge
2018-07-09 17:42 ` Jason Gunthorpe [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=20180709174217.GA2658@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=dledford@redhat.com \
    --cc=don.hiatt@intel.com \
    --cc=haakon.bugge@oracle.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sean.hefty@intel.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 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 NNTP newsgroup(s).