Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1292870

Re: [PATCH RESEND] infiniband:core:Add needed error path in cm_init_av_by_path

From Michael Wang <yun.wang@profitbricks.com>
Newsgroups linux.kernel
Subject Re: [PATCH RESEND] infiniband:core:Add needed error path in cm_init_av_by_path
Date 2015-12-16 11:30 +0100
Message-ID <qGhvj-wX-3@gated-at.bofh.it> (permalink)
References <qG0NQ-6Hh-29@gated-at.bofh.it> <qG0NQ-6Hh-27@gated-at.bofh.it> <qG1JU-7j0-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 12/15/2015 06:30 PM, Jason Gunthorpe wrote:
> On Tue, Dec 15, 2015 at 05:38:34PM +0100, Michael Wang wrote:
>> The hop_limit is only suggest that the package allowed to be
>> routed, not have to, correct?
> 
> If the hop limit is >= 2 (?) then the GRH is mandatory. The
> SM will return this information in the PathRecord if it determines a
> GRH is required. The whole stack follows this protocol.
> 
> The GRH is optional for in-subnet communications.

Thanks for the explain :-)

I've rechecked the ib_init_ah_from_path() again, and found it
still set IB_AH_GRH when the GID cache missing, but with:

  grh.sgid_index = 0
  grh.flow_label = 0
  grh.hop_limit  = 0
  grh.traffic_class = 0

Not sure if it's just coincidence, hop_limit is 0, so router
will discard the pkg and GRH won't be used, the transaction in
subnet still works.

Could this by designed as an optimization for the case like when
SM reassigning the GID?

BTW, cma_sidr_rep_handler() also call ib_init_ah_from_path() with out
a check on return.

Regards,
Michael Wang

> 
> Jason
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH RESEND] infiniband:core:Add needed error path in  cm_init_av_by_path Michael Wang <yun.wang@profitbricks.com> - 2015-12-15 17:40 +0100
  Re: [PATCH RESEND] infiniband:core:Add needed error path in  cm_init_av_by_path Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2015-12-15 18:40 +0100
    Re: [PATCH RESEND] infiniband:core:Add needed error path in cm_init_av_by_path "ira.weiny" <ira.weiny@intel.com> - 2015-12-16 08:00 +0100
    Re: [PATCH RESEND] infiniband:core:Add needed error path in  cm_init_av_by_path Michael Wang <yun.wang@profitbricks.com> - 2015-12-16 11:30 +0100
      Re: [PATCH RESEND] infiniband:core:Add needed error path in  cm_init_av_by_path Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2015-12-16 19:20 +0100
        Re: [PATCH RESEND] infiniband:core:Add needed error path in  cm_init_av_by_path Michael Wang <yun.wang@profitbricks.com> - 2015-12-17 09:50 +0100

csiph-web