All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Somnath Kotur
	<Somnath.Kotur-idTK6quXuVSLFuii7jzJGg@public.gmane.org>,
	Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH for-next 2/2] IB/core: Use hop-limit from IP stack for RoCE
Date: Sun, 3 Jan 2016 12:03:49 -0700	[thread overview]
Message-ID: <20160103190349.GA20412@obsidianresearch.com> (raw)
In-Reply-To: <1451829552-32337-3-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

On Sun, Jan 03, 2016 at 03:59:11PM +0200, Matan Barak wrote:
> @@ -434,6 +434,7 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 port_num,
>  	int ret;
>  	enum rdma_network_type net_type = RDMA_NETWORK_IB;
>  	enum ib_gid_type gid_type = IB_GID_TYPE_IB;
> +	int hoplimit = grh->hop_limit;

>  		ah_attr->grh.flow_label = flow_class & 0xFFFFF;
> -		ah_attr->grh.hop_limit = 0xFF;
> +		ah_attr->grh.hop_limit = hoplimit;

No, this is wrong for IB. Please be careful to follow the IB
specification language for computing a hop limit on a reversible path.

No idea about rocee, but I can't believe using grh->hop_limit is right
there either.

Jason

--
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:[~2016-01-03 19:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-03 13:59 [PATCH for-next 0/2] Fix hop-limit for RoCE Matan Barak
     [not found] ` <1451829552-32337-1-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-01-03 13:59   ` [PATCH for-next 1/2] IB/core: Rename rdma_addr_find_dmac_by_grh Matan Barak
2016-01-03 13:59   ` [PATCH for-next 2/2] IB/core: Use hop-limit from IP stack for RoCE Matan Barak
     [not found]     ` <1451829552-32337-3-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-01-03 19:03       ` Jason Gunthorpe [this message]
     [not found]         ` <20160103190349.GA20412-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-01-04  8:23           ` Matan Barak

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=20160103190349.GA20412@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=Somnath.Kotur-idTK6quXuVSLFuii7jzJGg@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=monis-VPRAkNaXOzVWk0Htik3J/w@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.