public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
To: Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: RDMA list <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCHv10 08/12] mlx4: Add support for IBoE - address resolution
Date: Thu, 21 Oct 2010 21:15:35 -0700	[thread overview]
Message-ID: <adazku6yiag.fsf@cisco.com> (raw)
In-Reply-To: <20101021230307.GD6367@mtldesk30> (Eli Cohen's message of "Fri, 22 Oct 2010 01:03:07 +0200")

 > I don't get this. For IB, we have 72 without immediate - did you
 > forget to add the ICRC? I think we count it with the header...

We don't need ICRC in the header_buf, do we?  We're talking about
MLX4_IB_UD_HEADER_SIZE, which is used to hold the packet header we get
from ib_ud_header_pack().  The ICRC is accounted for in a different
segment of the WQE.

In any case, it shouldn't matter -- I don't see how it could be correct
to increase the buffer size by 4 bytes to account for the change from
LRH to Ethernet header; an LRH is 8 bytes and an Ethernet header
(without .1q etc) is 14 bytes.  So we should add 6 bytes, right?

The math I get is

IB:   LRH + GRH + BTH + DETH + IMM
       8    40    12     8      4   = 72

Eth:  MAC + GRH + BTH + DETH + IMM
      14    40    12     8      4   = 78

I don't see how your change

 > -	MLX4_IB_UD_HEADER_SIZE		= 72,
 > +	MLX4_IB_UD_HEADER_SIZE		= 76,

could possibly be correct, although as I said it probably works because
of padding and not hitting the worst case in practice anyway.

 - R.

--
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

  reply	other threads:[~2010-10-22  4:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-26 14:18 [PATCHv10 08/12] mlx4: Add support for IBoE - address resolution Eli Cohen
2010-10-21  5:22 ` Roland Dreier
     [not found]   ` <adazku85dcf.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-21  7:27     ` Eli Cohen
2010-10-21 19:48       ` Roland Dreier
     [not found]         ` <adazku78gzz.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-21 22:51           ` Eli Cohen
2010-10-22  4:15             ` Roland Dreier
2010-10-21 19:57       ` Roland Dreier
     [not found]         ` <adavd4v8gk4.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-21 22:54           ` Eli Cohen
2010-10-21 21:14 ` Roland Dreier
     [not found]   ` <adad3r38d0c.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-21 21:15     ` Roland Dreier
     [not found]       ` <ada8w1r8cxo.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-21 23:03         ` Eli Cohen
2010-10-22  4:15           ` Roland Dreier [this message]
     [not found]             ` <adazku6yiag.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-22 12:24               ` Eli Cohen
2010-10-21 23:01     ` Eli Cohen
2010-10-22 15:59 ` 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=adazku6yiag.fsf@cisco.com \
    --to=rdreier-fyb4gu1cfyuavxtiumwx3w@public.gmane.org \
    --cc=eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox