59 size_t orig_iob_len =
iob_len ( iobuf );
66 DBGC2 ( ibdev,
"IBDEV %s TX %04x:%08lx => %04x:%08lx (key %08lx)\n",
71 pad_len = ( (-payload_len) & 0x3 );
76 orig_iob_len =
iob_len ( iobuf );
79 grh_len = ( payload_len +
iob_len ( iobuf ) - orig_iob_len );
83 lrh_len = ( payload_len +
iob_len ( iobuf ) - orig_iob_len );
117 (
iob_len ( iobuf ) - orig_iob_len ) );
141 size_t orig_iob_len =
iob_len ( iobuf );
151 memset ( source, 0,
sizeof ( *source ) );
155 DBGC ( ibdev,
"IBDEV %s RX too short (%zd bytes) for LRH\n",
169 DBGC ( ibdev,
"IBDEV %s RX unsupported LNH %x\n",
177 DBGC ( ibdev,
"IBDEV %s RX too short (%zd bytes) " 183 dest->gid_present = 1;
193 DBGC ( ibdev,
"IBDEV %s RX too short (%zd bytes) for BTH\n",
200 DBGC ( ibdev,
"IBDEV %s unsupported BTH opcode %x\n",
208 DBGC ( ibdev,
"IBDEV %s RX too short (%zd bytes) for DETH\n",
221 - ( orig_iob_len -
iob_len ( iobuf ) )
229 DBGC ( ibdev,
"IBDEV %s RX for unknown MGID " 236 DBGC ( ibdev,
"IBDEV %s RX for nonexistent " 237 "QPN %#lx\n", ibdev->
name,
dest->qpn );
244 DBGC2 ( ibdev,
"IBDEV %s RX %04x:%08lx <= %04x:%08lx (key %08x)\n",
247 (
qp ? (*qp)->ext_qpn : -1UL ) :
dest->qpn ),
250 ( iobuf->
data - ( orig_iob_len -
iob_len ( iobuf ) ) ),
251 ( orig_iob_len -
iob_len ( iobuf ) ) );
#define iob_pull(iobuf, len)
struct ib_base_transport_header bth
#define EINVAL
Invalid argument.
struct ib_local_route_header lrh
#define IB_QPN_SMI
Subnet management interface QPN.
char name[IBDEV_NAME_LEN]
Name of this Infiniband device.
union ib_gid gid
Port GID (comprising GID prefix and port GUID)
#define iob_push(iobuf, len)
int ib_pull(struct ib_device *ibdev, struct io_buffer *iobuf, struct ib_queue_pair **qp, size_t *payload_len, struct ib_address_vector *dest, struct ib_address_vector *source)
Remove IB headers.
struct ib_global_route_header grh
unsigned int gid_present
GID is present.
#define IB_GRH_NXTHDR_IBA
#define ENOTSUP
Operation not supported.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
unsigned long qkey
Queue key.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
struct ib_datagram_extended_transport_header deth
#define IB_GID_ARGS(gid)
Infiniband Global Identifier debug message arguments.
static size_t iob_len(struct io_buffer *iobuf)
Calculate length of data in an I/O buffer.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define ENODEV
No such device.
unsigned long qpn
Queue Pair Number.
#define IB_LID_MULTICAST(lid)
Test for multicast LID.
An Infiniband Queue Pair.
unsigned int sl
Service level.
struct arbelprm_qp_db_record qp
struct ib_queue_pair * ib_find_qp_mgid(struct ib_device *ibdev, union ib_gid *gid)
Find queue pair by multicast GID.
void * data
Start of data.
Infiniband packet format.
union ib_gid gid
GID, if present.
#define IB_GID_FMT
Infiniband Global Identifier debug message format.
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
uint16_t pkey
Partition key.
An Infiniband Address Vector.
unsigned int lid
Local ID.
struct ib_queue_pair * ib_find_qp_qpn(struct ib_device *ibdev, unsigned long qpn)
Find queue pair by QPN.
#define NULL
NULL pointer (VOID *)
int ib_push(struct ib_device *ibdev, struct io_buffer *iobuf, struct ib_queue_pair *qp, size_t payload_len, const struct ib_address_vector *dest)
Add IB headers.
#define IB_GRH_IPVER_IPv6
void * memset(void *dest, int character, size_t len) __nonnull