tcpdump mailing list archives

Re: DLT value for IP over IB (Infiniband)


From: Darren Reed <darren.reed () oracle com>
Date: Wed, 27 Jul 2011 12:02:04 +0200

Guy Harris wrote:
On Jul 14, 2011, at 5:23 AM, Darren Reed wrote:

Some more follow up on this...

Looks are deceiving - there is no RFC 4391/4392 header being prepended to the IP packet:
/*
* In order to transmit the datagram to correct destination, an extra
* header including destination address is required. IB does not provide an
* interface for sending a link layer header directly to the IB link and the
* link layer header received from the IB link is missing information that
* GLDv3 requires. So mac_ib plugin defines a "soft" header as below.
*/
(From a header file on Solaris)
The above probably explains this output on Linux:

# tcpdump -i ib0 -vv -e -c 5
tcpdump: WARNING: arptype 32 not supported by libpcap - falling back to cooked socket

What explains that part of the output is that libpcap doesn't have any code to map ARPHRD_INFINIBAND to any DLT_ value, because 
nobody's contributed any such code.  Perhaps that's because there's no DLT_ value that corresponds to whatever the link-layer 
header looks like on ARPHRD_INFINIBAND devices on Linux; it's not because of anything specific to Solaris.

With Solaris, the interfaces available from the driver and protocol stack prohibit access to actual packets at the link layer. I don't know if this is or will be possible with Linux, but if the link layer header for IPoIB on Linux is 12 bytes, then no, the data before the IP header that is exposed by Infiniband on Linux is not the link layer header. Furthermore, the comments that I've received suggest that this type of access to network packets is not possible with Infiniband.

For ARP packets, the influence of Infiniband is simply on the size of the address placed in the ARP packets.

The address used in ARP packets for Infiniband is the same across all implementations of IPoIB.

So whilst the pre-IP header is different on Solaris and Linux for Infiniband packets, the Infiniband address placed in the ARP packets is an Infiniband address and is not dependent on the implementation of IPoIB.

Thus mapping ARPHRD_INFINIBAND to 32 will be fine for both Linux and Solaris.

For the DLT values, I'm going to use the names DLT_IPOIB and LINKTYPE_SOLARIS_IPOIB for Solaris 11. If a pair of numbers can be assigned in the next 24 or so hours, I'll use those, otherwise it'll be DLT_USER15 for both. If I understand correctly, the design is such that libpcap on Linux would then map DLT_IPOIB to LINKTYPE_LINUX_IPOIB and as long as the LINKTYPE_ is different to LINKTYPE_SOLARIS_IPOIB, we're fine? The choice of the LINKTYPE_* is something that's made at run-time (#ifdef).

Comments?

Darren

-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: