public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Or Gerlitz <ogerlitz-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
Cc: Sean Hefty <mshefty-+/W+9+QloQG75v1z/vFq2g@public.gmane.org>,
	Steve Wise
	<swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>,
	linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: sense remote hardware address change by rdma-cm applications
Date: Tue, 20 Jul 2010 11:22:04 -0600	[thread overview]
Message-ID: <20100720172204.GI7920@obsidianresearch.com> (raw)
In-Reply-To: <4C454F80.1060808-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>

On Tue, Jul 20, 2010 at 10:25:52AM +0300, Or Gerlitz wrote:

> > So.. I think to tackle this you need to start looking at how the
> > dst_entry structure works in netdev and apply the same idea to RDMA-CM
> > and reflect the changes in AH back to the QP owner.
> 
> I can take a look (pointer would be very much appreciated...) still,
> the dst entry is used for every netdev xmit where here the xmit is
> offloaded, so I don't see what could be really used from the dst
> code, but I might be wrong. The rdma app uses the neighbour once,
> upon address resolving, and I was trying to see if we can ref the
> neighbour so the neigh sub-system probes would keep going even
> though the neighbour is not directly used.

It has been a while since I looked through this .. but, IIRC, the
general idea was that the socket held onto a cached dst and then at
each send it would use that dst to generate the L2 headers. Somehow
the dst would become invalidated when the routing cache was flushed
out.

So, basically, if you can add to RDMA-CM a way to get, hold and re-get
the dst you have solved the first problem, - how do know the current
routing information, and hold onto it, keep it in caches, etc.

The second problem, is how do you get notified that the dst may have
been changed? sockets seem to basically just poll every packet, so you
might need to use some netdev notifications, maybe also a timer?

I'd see a flow like this:
 - in the current route lookup code stash the dst
 - add a function to freshen the dst
 - hook events that might indicate the dst is invalid
 - on event trigger freshen the dst, regenerate the L2 address info
   and compare it to what is already in use
 - If different, send an event to user space.

stashing the dst lets you get back to the L2 information by using the
routing cache, and by holding onto a neighbor reference (in the dst)

Also, while doing this you are going to need to do something to have
the kernel send ND probes to keep the ND entry fresh when the
connection is open. Not sure, but I think this also has something to
do with the DST.

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:[~2010-07-20 17:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-19 21:42 sense remote hardware address change by rdma-cm applications Or Gerlitz
     [not found] ` <AANLkTimmWiNqHJIqSEKbY-X6mSx6zA19p__JDYPEmp8b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-20  0:14   ` Jason Gunthorpe
     [not found]     ` <20100720001436.GH7920-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-07-20  7:25       ` Or Gerlitz
     [not found]         ` <4C454F80.1060808-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-07-20 17:22           ` Jason Gunthorpe [this message]
2010-07-20 18:12           ` Steve Wise
     [not found]             ` <4C45E701.7030501-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2010-07-20 18:46               ` Jason Gunthorpe
     [not found]                 ` <20100720184620.GJ7920-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-07-20 19:20                   ` Steve Wise
     [not found]                     ` <4C45F6F5.6050008-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2010-07-20 20:30                       ` Jason Gunthorpe
     [not found]                         ` <20100720203044.GK7920-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-07-20 20:50                           ` Steve Wise
     [not found]                             ` <4C460BFD.5010707-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2010-07-20 20:57                               ` Jason Gunthorpe
     [not found]                                 ` <20100720205746.GL7920-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-07-20 21:03                                   ` Steve Wise
     [not found]                                     ` <4C460F08.7030304-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2010-07-20 21:15                                       ` Steve Wise
2010-07-21 14:40                                   ` Or Gerlitz
2010-07-21 14:33               ` Or Gerlitz
     [not found]                 ` <4C47053B.3000802-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-07-21 15:48                   ` Steve Wise
     [not found]                     ` <4C4716D8.2040902-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2010-07-22  8:18                       ` 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=20100720172204.GI7920@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mshefty-+/W+9+QloQG75v1z/vFq2g@public.gmane.org \
    --cc=ogerlitz-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org \
    --cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@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