[openib-general] mapping between IP address and device name

Hal Rosenstock halr at voltaire.com
Tue Jun 21 06:11:56 PDT 2005


On Tue, 2005-06-21 at 01:14, Libor Michalek wrote:
> On Mon, Jun 20, 2005 at 08:40:47PM -0700, Roland Dreier wrote:
> >     Kevin> Maybe somebody could help me understand the proper way to
> >     Kevin> map between an IP address assigned to a port to the "device
> >     Kevin> name" and "port number" in the gen2 architecture.  If I
> >     Kevin> have an IP address can I map it to a name that i get back
> >     Kevin> from ibv_get_device_name() or pass to ibv_open_device().
> > 
> > It _is_ valid to ask, for a given remote IP address, which network
> > interface will be used to reach it based on the local host's routing
> > configuration.
> > 
> > In the IB world, we can hope that the network interface chosen by the
> > route table is an IPoIB device.  From the IPoIB device, we can work
> > backwards to get a local IB port. For example the network device's
> > hardware address contains the associated port GID, and by searching
> > the GID tables of all the known IB devices, we can find which port has
> > that GID.
> > 
> > There was some discussion a while ago about an "IB address
> > translation" service proposed by the Voltaire crew, which would
> > encapsulate some of this.  However, we didn't make much progress
> > towards a good API design, and the discussion fizzled out.
> 
>   Also, if you want to look at an example of how this is done using the
> IPoIB network device and Linux routing code you can look here:
> 
>   src/linux-kernel/infiniband/ulp/sdp/sdp_link.[ch] 
> 
> The SDP code needed this functionality, so I put together a fairly simple
> version that's private to SDP, as MST pointed out locking is still missing
> from the code. 

There is similar code in
gen2/branches/shaharf-ibat/src/linux-kernel/infiniband/core/at.c

> Eventually this type of code should become a central
> service, since there's a number of modules that would want this info.

This is exactly what IBAT is intended to be.

-- Hal




More information about the general mailing list