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,
	Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Eran Ben Elisha <eranbe-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Somnath Kotur
	<Somnath.Kotur-idTK6quXuVSLFuii7jzJGg@public.gmane.org>
Subject: Re: [PATCH for-next V1 5/9] IB/core: Add rdma_network_type to wc
Date: Mon, 23 Nov 2015 14:19:16 -0700	[thread overview]
Message-ID: <20151123211916.GA6062@obsidianresearch.com> (raw)
In-Reply-To: <1444925232-13598-6-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

> +	/* Use the hint from IP Stack to select GID Type */
> +	network_gid_type = ib_network_to_gid_type(addr->dev_addr.network);
> +	if (addr->dev_addr.network != RDMA_NETWORK_IB) {
> +		route->path_rec->gid_type = network_gid_type;
> +		/* TODO: get the hoplimit from the inet/inet6 device */
> +		route->path_rec->hop_limit = IPV6_DEFAULT_HOPLIMIT;

Uh, that is more than a TODO, that is showing this is all messed up.

It isn't just the hop limit that has to come from the route entry, all
the source information of the path comes from there. Ie the gid table
should accept the route entry directly and spit out the sgid_index.

The responder side is the same, it also needs to do a route lookup to
figure out what it is doing, and that may not match what the rx says
from the headers. This is important stuff.

I really don't like the API changes that went in with the last series
that added net_dev and gid_attr everywhere, that just seems to be
enabling mistakes like the above. You can't use rocev2 without doing
route lookups, providing APIs that don't force this to happen just
encourages broken flows like this.

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:[~2015-11-23 21:19 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15 16:07 [PATCH for-next V1 0/9] Add RoCE v2 support Matan Barak
     [not found] ` <1444925232-13598-1-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-10-15 16:07   ` [PATCH for-next V1 1/9] IB/core: Add gid_type to gid attribute Matan Barak
2015-10-15 16:07   ` [PATCH for-next V1 2/9] IB/cm: Use the source GID index type Matan Barak
2015-10-15 16:07   ` [PATCH for-next V1 3/9] IB/core: Add gid attributes to sysfs Matan Barak
     [not found]     ` <1444925232-13598-4-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-11-23 21:20       ` Jason Gunthorpe
     [not found]         ` <20151123212029.GB6062-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-11-24  8:31           ` Matan Barak
     [not found]             ` <CAAKD3BCQzBax6N3+-RhdEvByQu3mz1KKsjQ7yjs-fn2_nSPfOA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-24 13:49               ` Matan Barak
     [not found]                 ` <CAAKD3BA=h+Mpq9VBnCNpv0UCAkmwCBtOahpOhhWdCvUM=C7JPw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-24 17:59                   ` Jason Gunthorpe
2015-10-15 16:07   ` [PATCH for-next V1 4/9] IB/core: Add ROCE_UDP_ENCAP (RoCE V2) type Matan Barak
2015-10-15 16:07   ` [PATCH for-next V1 5/9] IB/core: Add rdma_network_type to wc Matan Barak
     [not found]     ` <1444925232-13598-6-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-11-23 21:19       ` Jason Gunthorpe [this message]
     [not found]         ` <20151123211916.GA6062-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-11-24 13:47           ` Matan Barak
     [not found]             ` <CAAKD3BCWMrd8A+UgjQg+jtfLmyOCaOB4iGCr2ZAbaazRBZeGxw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-24 18:14               ` Jason Gunthorpe
     [not found]                 ` <20151124181415.GC10391-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-11-24 19:07                   ` Matan Barak
     [not found]                     ` <CAAKD3BAO6rNn-Br=MZxvkd+rYSsE9G7wK+9YR9uJ3xdP1U+u0w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-25  6:55                       ` Jason Gunthorpe
     [not found]                         ` <20151125065542.GC4326-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-11-25 14:18                           ` Matan Barak
     [not found]                             ` <CAAKD3BAEMD47cScunGNnx2iitL6uFWicDHALJt5w-szoSZwOwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-25 17:29                               ` Jason Gunthorpe
2015-11-30 20:56                   ` Liran Liss
     [not found]                     ` <HE1PR05MB1418F62E731D463F2A63A899B1000-eBadYZ65MZ87O8BmmlM1zNqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2015-12-01 14:35                       ` Matan Barak
2015-10-15 16:07   ` [PATCH for-next V1 6/9] IB/rdma_cm: Add wrapper for cma reference count Matan Barak
2015-10-15 16:07   ` [PATCH for-next V1 7/9] IB/cma: Add configfs for rdma_cm Matan Barak
     [not found]     ` <1444925232-13598-8-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-11-23 21:23       ` Jason Gunthorpe
     [not found]         ` <20151123212359.GC6062-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-11-24  8:28           ` Matan Barak
2015-10-15 16:07   ` [PATCH for-next V1 8/9] IB/core: Initialize UD header structure with IP and UDP headers Matan Barak
2015-10-15 16:07   ` [PATCH for-next V1 9/9] IB/cma: Join and leave multicast groups with IGMP Matan Barak
     [not found]     ` <1444925232-13598-10-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-11-23 21:25       ` Jason Gunthorpe
     [not found]         ` <20151123212526.GD6062-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-11-24  9:41           ` Moni Shoua
     [not found]             ` <CAG9sBKMUPJ74RLKT54yO-==0gP9nzfrbfWz1Mb_J5VstRQr2OA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-24 18:15               ` Jason Gunthorpe
     [not found]                 ` <20151124181500.GD10391-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-11-25  8:31                   ` Moni Shoua
     [not found]                     ` <CAG9sBKORfbJQWxg7nn6OuZydNZQj4f1ZhDTPKoc-YUbzQNybrg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-25 17:39                       ` Jason Gunthorpe
2015-11-16 13:23   ` [PATCH for-next V1 0/9] Add RoCE v2 support Matan Barak
     [not found]     ` <CAAKD3BBm2WZ8TqSFi7gC82BwBTCc+D-SJSpSSqhEqMjL8-Fq_A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-22 21:28       ` Or Gerlitz
     [not found]         ` <CAJ3xEMiAkz0aouPgHWD31CwrX4SmOQfysJBX2kQOZ91gVP+94g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-23 19:53           ` Doug Ledford

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=20151123211916.GA6062@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=eranbe-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=ogerlitz-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.