IB(3)

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 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)