IB

Section: ib 1.2 (3)
Updated: 19 July 2021
Index Return to Main Contents
 

NAME

packet.transport.ib - InfiniBand module  

DESCRIPTION

Decode InfiniBand layer. Reference: IB Specification Vol 1-Release-1.3-2015-03-03.pdf  

CLASSES

 

class AETH(baseobj.BaseObj)

ACK EXTENDED TRANSPORT HEADER (AETH) - 4 BYTES

ACK Extended Transport Header contains the additional transport fields
for ACK packets. The AETH is only in Acknowledge, RDMA READ Response
First, RDMA READ Response Last, and RDMA READ Response Only packets
as indicated by the Base Transport Header OpCode field.

AETH(
    syndrome = int, # Syndrome indicates if this is an ACK or NAK
                    # packet plus additional information about the
                    # ACK or NAK
    msn      = int, # Message Sequence Number indicates the sequence
                    # number of the last message completed at the
                    # responder
)


Methods defined here:
---------------------

__init__(self, unpack)
Constructor

Initialize object's private data according to the arguments given.
Arguments can be given as positional, named arguments or a
combination of both.
 

class AtomicAckETH(baseobj.BaseObj)

ATOMIC ACKNOWLEDGE EXTENDED TRANSPORT HEADER (ATOMICACKETH) - 8 BYTES

Atomic ACK Extended Transport Header contains the additional transport
fields for AtomicACK packets. The AtomicAckETH is only in Atomic
Acknowledge packets as indicated by the Base Transport Header OpCode
field.

AtomicAckETH(
    orig_rem_dt = int, # Original Remote Data is the return operand
                       # in atomic operations and contains the data
                       # in the remote memory location before the
                       # atomic operation
)


Methods defined here:
---------------------

__init__(self, unpack)
Constructor

Initialize object's private data according to the arguments given.
Arguments can be given as positional, named arguments or a
combination of both.
 

class AtomicETH(baseobj.BaseObj)

ATOMIC EXTENDED TRANSPORT HEADER (ATOMICETH) - 28 BYTES

Atomic Extended Transport Header contains the additional transport
fields for Atomic packets. The AtomicETH is only in Atomic packets
as indicated by the Base Transport Header OpCode field.

AtomicETH(
    va      = int, # Virtual Address: the remote virtual address
    r_key   = int, # Remote Key that authorizes access to the remote
                   # virtual address
    swap_dt = int, # Swap/Add Data is an operand in atomic operations
    cmp_dt  = int, # Compare Data is an operand in CmpSwap atomic
                   # operation
)


Methods defined here:
---------------------

__init__(self, unpack)
Constructor

Initialize object's private data according to the arguments given.
Arguments can be given as positional, named arguments or a
combination of both.
 

class BTH(baseobj.BaseObj)

BASE TRANSPORT HEADER (BTH) - 12 BYTES

Base Transport Header contains the fields for IBA transports.
The presence of BTH is indicated by the Next Header field of
the last previous header (i.e., either LRH:lnh or GRH:nxthdr
depending on which was the last previous header).

BTH(
    opcode = int, # OpCode indicates the IBA packet type. It also
                  # specifies which extension headers follow the BTH
    se     = int, # Solicited Event, this bit indicates that an event
                  # should be generated by the responder
    migreq = int, # This bit is used to communicate migration state
    padcnt = int, # Pad Count indicates how many extra bytes are added
                  # to the payload to align to a 4 byte boundary
    tver   = int, # Transport Header Version indicates the version of
                  # the IBA Transport Headers
    pkey   = int, # Partition Key indicates which logical Partition is
                  # associated with this packet
    destqp = int, # Destination QP indicates the Work Queue Pair Number
                  # (QP) at the destination
    ackreq = int, # Acknowledge Request, this bit is used to indicate
                  # that an acknowledge (for this packet) should be
                  # scheduled by the responder
    psn    = int, # Packet Sequence Number is used to detect a missing
                  # or duplicate Packet
)


Methods defined here:
---------------------

__init__(self, unpack)
Constructor

Initialize object's private data according to the arguments given.
Arguments can be given as positional, named arguments or a
combination of both.
 

class DETH(baseobj.BaseObj)

DATAGRAM EXTENDED TRANSPORT HEADER (DETH) - 8 BYTES

Datagram Extended Transport Header contains the additional transport
fields for datagram service. The DETH is only in datagram packets if
indicated by the Base Transport Header OpCode field.

DETH(
    q_key  = int, # Queue Key is required to authorize access to the
                  # receive queue
    src_qp = int, # Source QP indicates the Work Queue Pair Number (QP)
                  # at the source.
)


Methods defined here:
---------------------

__init__(self, unpack)
Constructor

Initialize object's private data according to the arguments given.
Arguments can be given as positional, named arguments or a
combination of both.
 

class GRH(baseobj.BaseObj)

GLOBAL ROUTE HEADER (GRH) - 40 BYTES

Global Route Header contains fields for routing the packet between
subnets. The presence of the GRH is indicated by the Link Next
Header (LNH) field in the LRH. The layout of the GRH is the same as
the IPv6 Header defined in RFC 2460. Note, however, that IBA does not
define a relationship between a device GID and IPv6 address
(i.e., there is no defined mapping between GID and IPv6 address for
any IB device or port).

GRH(
    ipver  = int,      # IP Version indicates version of the GRH
    tclass = int,      # Traffic Class is used by IBA to communicate
                       # global service level
    flabel = int,      # Flow Label identifies sequences of packets
                       # requiring special handling
    paylen = int,      # Payload length specifies the number of bytes
                       # starting from the first byte after the GRH,
                       # up to and including the last byte of the ICRC
    nxthdr = int,      # Next Header identifies the header following the
                       # GRH. This field is included for compatibility with
                       # IPV6 headers. It should indicate IBA transport
    hoplmt = int,      # Hop Limit sets a strict bound on the number of
                       # hops between subnets a packet can make before
                       # being discarded. This is enforced only by routers
    sgid   = IPv6Addr, # Source GID identifies the Global Identifier
                       # (GID) for the port which injected the packet
                       # into the network
    dgid   = IPv6Addr, # Destination GID identifies the GID for the port
                       # which will consume the packet from the network
)


Methods defined here:
---------------------

__init__(self, unpack)
Constructor

Initialize object's private data according to the arguments given.
Arguments can be given as positional, named arguments or a
combination of both.
 

class IB(baseobj.BaseObj)

InfiniBand (IB) object

Usage:
    from packet.transport.ib import IB

    x = IB(pktt)

Object definition:

IB(
    lrh          = LRH,          # Local Route Header
    grh          = GRH,          # Global Route Header
    bth          = BTH,          # Base Transport Header
    rdeth        = RDETH,        # Reliable Datagram Extended Transport Header
    deth         = DETH,         # Datagram Extended Transport Header
    xrceth       = XRCETH,       # XRC Extended Transport Header
    reth         = RETH,         # RDMA Extended Transport Header
    atomiceth    = AtomicETH,    # Atomic Extended Transport Header
    aeth         = AETH,         # ACK Extended Transport Header
    atomicacketh = AtomicAckETH, # Atomic Acknowledge Extended Transport Header
    immdt        = ImmDt,        # Immediate Extended Transport Header
    ieth         = IETH,         # Invalidate Extended Transport Header
    psize        = int,          # Payload data size
    icrc         = int,          # Invariant CRC
    vcrc         = int,          # Variant CRC
)


Methods defined here:
---------------------

__bool__(self)
Truth value testing for the built-in operation bool()

__init__(self, pktt)
Constructor

Initialize object's private data.

pktt:
Packet trace object (packet.pktt.Pktt) so this layer has access to the parent layers.
 

class IETH(baseobj.BaseObj)

INVALIDATE EXTENDED TRANSPORT HEADER (IETH) - 4 BYTES

The Invalidate Extended Transport Header contains an R_Key field which
is used by the responder to invalidate a memory region or memory window
once it receives and executes the SEND with Invalidate request.

IETH(
    r_key = int, # The SEND with Invalidate operation carries with it
                 # an R_Key field. This R_Key is used by the responder
                 # to invalidate a memory region or memory window once
                 # it receives and executes the SEND with Invalidate
                 # request
)


Methods defined here:
---------------------

__init__(self, unpack)
Constructor

Initialize object's private data according to the arguments given.
Arguments can be given as positional, named arguments or a
combination of both.
 

class ImmDt(baseobj.BaseObj)

IMMEDIATE DATA EXTENDED TRANSPORT HEADER (IMMDT) - 4 BYTES

Immediate DataExtended Transport Header contains the additional data
that is placed in the receive Completion Queue Element (CQE).
The ImmDt is only in Send or RDMA-Write packets with Immediate Data
if indicated by the Base Transport Header OpCode.

Note, the terms Immediate Data Extended Transport Header and Immediate
Data Header are used synonymously in the specification.

ImmDt(
    imm_dt = int, # Immediate Data contains data that is placed in the
                  # receive Completion Queue Element (CQE). The ImmDt is
                  # only allowed in SEND or RDMA WRITE packets with
                  # Immediate Data
)


Methods defined here:
---------------------

__init__(self, unpack)
Constructor

Initialize object's private data according to the arguments given.
Arguments can be given as positional, named arguments or a
combination of both.
 

class LRH(baseobj.BaseObj)

LOCAL ROUTE HEADER (LRH) - 8 BYTES

The Local Routing Header contains fields used for local routing
by switches within a IBA subnet.

LRH(
    vl   = int, # Virtual Lane that the packet is using
    lver = int, # Link Version of LRH
    sl   = int, # Service Level the packet is requesting within the subnet
    lnh  = int, # Link Next Header identifies the headers following the LRH
    dlid = int, # Destination Local ID identifies the destination port
                # and path (data sink) on the local subnet
    plen = int, # Packet Length identifies the size of the packet in
                # four-byte words. This field includes the first byte of
                # LRH to the last byte before the variant CRC
    slid = int, # Source Local ID identifies the source port
                # (injection point) on the local subnet
)


Methods defined here:
---------------------

__init__(self, unpack)
Constructor

Initialize object's private data according to the arguments given.
Arguments can be given as positional, named arguments or a
combination of both.
 

class OpCode(builtins.int)

OpCode object, this is an integer in which its informal
string representation is given as the OpCode name


Methods defined here:
---------------------

__str__(self)
Return str(self).
 

class RDETH(baseobj.BaseObj)

RELIABLE DATAGRAM EXTENDED TRANSPORT HEADER (RDETH) - 4 BYTES

Reliable Datagram Extended Transport Header contains the additional
transport fields for reliable datagram service. The RDETH is only
in Reliable Datagram packets as indicated by the Base Transport Header
OpCode field.

RDETH(
    ee_context = int, # EE-Context indicates which End-to-End Context
                      # should be used for this Reliable Datagram packet
)


Methods defined here:
---------------------

__init__(self, unpack)
Constructor

Initialize object's private data according to the arguments given.
Arguments can be given as positional, named arguments or a
combination of both.
 

class RDMAinfo(packet.utils.RDMAbase)

RDMA info object used for reassembly

The reassembled message consists of one or multiple chunks and
each chunk in turn could be composed of multiple segments. Also,
each segment could be composed of multiple sub-segments and each
sub-segment could be composed of multiple fragments.
The protocol only defines segments but if the segment length is
large, it is split into multiple sub-segments in which each
sub-segment is specified by RDMA_WRITE_First or RDMA_READ_Request
packets. The handle is the same for each of these packets but with
a shorter DMA length.

Thus in order to reassemble all fragments for a single message,
a list of segments is created where each segment is identified
by its handle or RKey and the message is reassembled according
to the chuck lists specified by the RPC-over-RDMA layer.


Methods defined here:
---------------------

__del__ = reset(self)

__init__(self)
Constructor

Initialize object's private data according to the arguments given.
Arguments can be given as positional, named arguments or a
combination of both.

__len__ = size(self)

add_rdma_data(self, psn, unpack, reth=None, only=False, read=False)
Add RDMA fragment data

add_rdma_segment(self, handle, length, xdrpos=0, rpcrdma=None)
Add RDMA segment information and if the information already
exists just update the length and return the segment

get_rdma_segment(self, handle)
Return RDMA segment identified by the given handle

process_rdma_segments(self, rpcrdma)
Process the RPC-over-RDMA chunks

When this method is called on an RPC call, it adds the
information of all the segments to the list of segments.
When this method is called on an RPC reply, the segments
should already exist so just update the segment's DMA length
as returned by the reply.

RPCoRDMA reads attribute is a list of read segments
Read segment is a plain segment plus an XDR position
A read chunk is the collection of all read segments
with the same XDR position

RPCoRDMA writes attribute is a list of write chunks
A write chunk is a list of plain segments

RPCoRDMA reply is just a single write chunk if it exists.
Return the reply chunk data

reassemble_rdma_reads(self, psn, unpack, only=False)
Reassemble RDMA read chunks
The RDMA read chunks are reassembled in the read last operation

reset(self)
Clear RDMA segments

size(self)
Return the number RDMA segments
 

class RDMAseg(builtins.object)

RDMA sub-segment object

The sub-segment is created for each RDMA_WRITE_First, RDMA_WRITE_Only
or RDMA_READ_Request and each sub-segment belongs to a list in the
RDMAsegment object so there is no segment identifier or handle.

Reassembly for each sub-segment is done using the PSN or packet
sequence number in each of the data fragments. Therefore, a range
of PSN numbers define this object which is given by the spsn and
epsn attributes (first and last PSN respectively).


Methods defined here:
---------------------

__init__(self, spsn, epsn, dmalen)
Initialize self.  See help(type(self)) for accurate signature.

get_data(self, padding=True)
Return sub-segment data

get_size(self)
Return sub-segment data size

insert_data(self, psn, data)
Insert data at correct position given by the psn
 

class RDMAsegment(builtins.object)

RDMA segment object

Each segment is identified by its handle. The segment information
comes from the RPC-over-RDMA protocol layer so the length attribute
gives the total DMA length of the segment.


Methods defined here:
---------------------

__init__(self, handle, length, xdrpos, rpcrdma)
Initialize self.  See help(type(self)) for accurate signature.

add_data(self, psn, data)
Add fragment data

add_sub_segment(self, psn, dmalen, only=False, iosize=0)
Add RDMA sub-segment PSN information

get_data(self, padding=True)
Return segment data

get_size(self)
Return segment data

valid_psn(self, psn)
True if given psn is valid for this segment
 

class RETH(baseobj.BaseObj)

RDMA EXTENDED TRANSPORT HEADER (RETH) - 16 BYTES

RDMA Extended Transport Header contains the additional transport fields
for RDMA operations. The RETH is present in only the first (or only)
packet of an RDMA Request as indicated by the Base Transport Header
OpCode field.

RETH(
    va      = int, # Virtual Address of the RDMA operation
    r_key   = int, # Remote Key that authorizes access for the RDMA
                   # operation
    dma_len = int, # DMA Length indicates the length (in Bytes) of
                   # the DMA operation.
)


Methods defined here:
---------------------

__init__(self, unpack)
Constructor

Initialize object's private data according to the arguments given.
Arguments can be given as positional, named arguments or a
combination of both.
 

class XRCETH(baseobj.BaseObj)

XRC EXTENDED TRANSPORT HEADER (XRCETH)

XRC Extended Transport Header contains the Destination XRC SRQ
identifier.
XRCETH(
    xrcsrq = int, # XRC Shared Receive Queue indicates the XRC Shared
                  # Receive Queue number to be used by the responder
                  # for this packet
)


Methods defined here:
---------------------

__init__(self, unpack)
Constructor

Initialize object's private data according to the arguments given.
Arguments can be given as positional, named arguments or a
combination of both.
 

SEE ALSO

baseobj(3), packet.application.rpc(3), packet.application.rpcordma(3), packet.application.rpcordma_const(3), packet.internet.ipv6addr(3), packet.unpack(3), packet.utils(3)

 

BUGS

No known bugs.  

AUTHOR

Jorge Mora (mora@netapp.com)


 

Index

NAME
DESCRIPTION
CLASSES
class AETH(baseobj.BaseObj)
class AtomicAckETH(baseobj.BaseObj)
class AtomicETH(baseobj.BaseObj)
class BTH(baseobj.BaseObj)
class DETH(baseobj.BaseObj)
class GRH(baseobj.BaseObj)
class IB(baseobj.BaseObj)
class IETH(baseobj.BaseObj)
class ImmDt(baseobj.BaseObj)
class LRH(baseobj.BaseObj)
class OpCode(builtins.int)
class RDETH(baseobj.BaseObj)
class RDMAinfo(packet.utils.RDMAbase)
class RDMAseg(builtins.object)
class RDMAsegment(builtins.object)
class RETH(baseobj.BaseObj)
class XRCETH(baseobj.BaseObj)
SEE ALSO
BUGS
AUTHOR

This document was created by man2html, using the manual pages.
Time: 16:08:34 GMT, July 19, 2021