public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Parav Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Is ib_mtu iboe_get_mtu() slightly off?
Date: Mon, 9 Oct 2017 16:41:31 +0300	[thread overview]
Message-ID: <20171009134131.GB1252@mtr-leonro.local> (raw)
In-Reply-To: <1507556073.46071.27.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2200 bytes --]

On Mon, Oct 09, 2017 at 09:34:33AM -0400, Doug Ledford wrote:
> On Thu, 2017-09-21 at 02:20 +0000, Parav Pandit wrote:
> > > From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-
> > > owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Roland Dreier
> > > Sent: Wednesday, September 20, 2017 7:39 PM
> > > To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > > Subject: Is ib_mtu iboe_get_mtu() slightly off?
> > >
> > > We have:
> > >
> > > static inline enum ib_mtu iboe_get_mtu(int mtu) {
> > >         /*
> > >          * reduce IB headers from effective IBoE MTU. 28 stands for
> > >          * atomic header which is the biggest possible header after
> > > BTH
> > >          */
> > >         mtu = mtu - IB_GRH_BYTES - IB_BTH_BYTES - 28;
> > >        ...
> > >
> > > 28 bytes is the size of the AtomicETH header.  But couldn't we have
> > > a packet
> > > with both AtomicETH and XRCETH (4 more bytes)?
> >
> > XRCETH + AtomicETH is possible.
> > Additionally I guess 4 bytes of ICRC is missing too in calculation.
>
> Since no one rolled a patch for this, I did.
>

Doug,

Parav created, I waited for our shared code.
https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/commit/?h=rdma-next&id=51ed6735dd59008aea4d7308416ed994b277f168

commit 51ed6735dd59008aea4d7308416ed994b277f168
Author: Parav Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Date:   Thu Oct 5 10:33:12 2017 -0500

    IB/core: Take into account optional XRC header and mandatory ICRC for RoCE MTU

    This fix considers optional XRC header size and mandatory ICRC 4 bytes in
    calculation of path MTU, by considering additional 8 bytes, path MTU calculation
    is more accurate.

    Link: https://www.spinics.net/lists/linux-rdma/msg54558.html
    Fixes: 3c86aa70bf67 ("RDMA/cm: Add RDMA CM support for IBoE devices")
    Signed-off-by: Parav Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
    Reviewed-by: Daniel Jurgens <danielj-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
    Reported-by: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
    Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

Thanks

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2017-10-09 13:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21  0:38 Is ib_mtu iboe_get_mtu() slightly off? Roland Dreier
     [not found] ` <CAL1RGDX33tBR=x2sOp_F1605SY5nu_6YALr-XYE_LiuvsHQ1ng-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-21  2:20   ` Parav Pandit
     [not found]     ` <VI1PR0502MB300886CB47BB3DFDE098A26AD1660-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-10-09 13:34       ` Doug Ledford
     [not found]         ` <1507556073.46071.27.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-10-09 13:41           ` Leon Romanovsky [this message]
     [not found]             ` <20171009134131.GB1252-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-09 16:14               ` Doug Ledford
     [not found]                 ` <1507565652.46071.33.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-10-09 20:47                   ` Parav Pandit
     [not found]                     ` <VI1PR0502MB3008900E038DEF6EEAB719DFD1740-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-10-10 14:48                       ` Doug Ledford
     [not found]                         ` <c27ee8b9-a011-9b0b-b20a-433d9f74d4b1-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-10-10 15:27                           ` Parav Pandit
2017-10-10 15:33                           ` Leon Romanovsky
     [not found]                             ` <20171010153312.GD2106-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-10 16:13                               ` Doug Ledford
2017-10-10 10:29               ` Amrani, Ram
     [not found]                 ` <BN3PR07MB25781502CA573FB383805E48F8750-EldUQEzkDQfpW3VS/XPqkOFPX92sqiQdvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-10 15:26                   ` Parav Pandit

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=20171009134131.GB1252@mtr-leonro.local \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=roland-BHEL68pLQRGGvPXPguhicg@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