All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Cc: Or Gerlitz <ogerlitz-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>,
	RDMA list <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: can't get IB link with the for-next branch / IBoE patches
Date: Mon, 25 Oct 2010 18:17:30 +0200	[thread overview]
Message-ID: <20101025161730.GA9335@mtldesk30> (raw)
In-Reply-To: <adaaam2jswk.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>

On Mon, Oct 25, 2010 at 06:36:43AM -0700, Roland Dreier wrote:
> 
> I suspect I broke either the UD header packing or the build_mlx_header
> function when I "cleaned up" the patches.  I see the same problem, I'll
> take a look today.

I think this will fix things up. The + operator has precedence over
the ? operator so we end up with packet_length equal IB_GRH_BYTES / 4
which is wrong.

diff --git a/drivers/infiniband/core/ud_header.c b/drivers/infiniband/core/ud_header.c
index 7e5d224..bb7e192 100644
--- a/drivers/infiniband/core/ud_header.c
+++ b/drivers/infiniband/core/ud_header.c
@@ -241,7 +241,7 @@ void ib_ud_header_init(int     		    payload_bytes,
 		packet_length = (IB_LRH_BYTES	+
 				 IB_BTH_BYTES	+
 				 IB_DETH_BYTES	+
-				 grh_present ? IB_GRH_BYTES : 0 +
+				 (grh_present ? IB_GRH_BYTES : 0) +
 				 payload_bytes	+
 				 4		+ /* ICRC     */
 				 3) / 4;	  /* round up */
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-10-25 16:17 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-24  7:58 [PATCH] mlx4: Fix unneeded return error in eth_link_query_port Eli Cohen
2010-10-24 15:42 ` Roland Dreier
     [not found]   ` <adahbgbppgx.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-24 16:00     ` Eli Cohen
2010-10-24 16:22       ` Roland Dreier
     [not found]         ` <adaocajo90s.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-24 18:05           ` Eli Cohen
     [not found]             ` <AANLkTimb++kFYFXCWajBGACpA1OpCXyyeyD-98Ed3uTu-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-25  4:12               ` Roland Dreier
     [not found]                 ` <adad3qync5m.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-25  8:18                   ` Eli Cohen
2010-10-25  9:26               ` Or Gerlitz
     [not found]                 ` <4CC54D4E.7050203-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-10-25  9:33                   ` Or Gerlitz
     [not found]                     ` <4CC54ED7.6030303-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-10-25 11:37                       ` Eli Cohen
2010-10-25 10:47                   ` can't get IB link with the for-next branch / IBoE patches (was "mlx4: Fix unneeded return error...") Or Gerlitz
     [not found]                     ` <4CC5604D.2080803-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-10-25 13:36                       ` can't get IB link with the for-next branch / IBoE patches Roland Dreier
     [not found]                         ` <adaaam2jswk.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-25 16:17                           ` Eli Cohen [this message]
2010-10-25 16:45                             ` Or Gerlitz
2010-10-25 17:23                             ` Roland Dreier
     [not found]                               ` <adalj5mgp96.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-25 17:35                                 ` Roland Dreier
     [not found]                                   ` <adahbgagopw.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-26  9:33                                     ` Or Gerlitz
     [not found]                                       ` <4CC6A051.3010703-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-10-26 12:19                                         ` Or Gerlitz
     [not found]                                           ` <4CC6C75F.8030103-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-10-26 13:10                                             ` Or Gerlitz
2010-10-26 13:46                                             ` Eli Cohen
2010-10-25 10:47                   ` can't get IB link with the for-next branch / IBoE patches (was "mlx4: Fix unneeded return error...") Or Gerlitz
2010-10-25 11:34                   ` [PATCH] mlx4: Fix unneeded return error in eth_link_query_port Eli Cohen
2010-10-25 14:15                     ` Or Gerlitz
     [not found]                       ` <AANLkTi=ZxB4b463OOS6YGxTJSKxjyCj8vy0rNtj0n+uA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-25 14:36                         ` Eli Cohen
2010-10-25 16:46                           ` Or Gerlitz
     [not found]                             ` <AANLkTimaEcFZMnYE+G3osTWzPkfxuBpRMtrrXF7xUPYv-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-25 17:13                               ` Eli Cohen
2010-10-25 19:04                                 ` Or Gerlitz
     [not found]                                   ` <AANLkTik_4OzMLMWXud89m_rF47OQ3Wji9R_Bye+0DcTV-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-25 19:15                                     ` Eli Cohen
     [not found]                                       ` <AANLkTi=yZUoexwVUCfbeGypEWC_8=oZaMu9mBTF+VJgq-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-25 19:38                                         ` Or Gerlitz

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=20101025161730.GA9335@mtldesk30 \
    --to=eli-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ogerlitz-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org \
    --cc=rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    /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.