iPXE
Functions
ibmgmt.c File Reference

Infiniband device management. More...

#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <byteswap.h>
#include <ipxe/infiniband.h>
#include <usr/ibmgmt.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
void ibstat (struct ib_device *ibdev)
 Print status of Infiniband device.

Detailed Description

Infiniband device management.

Definition in file ibmgmt.c.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
void ibstat ( struct ib_device ibdev)

Print status of Infiniband device.

Parameters:
ibdevInfiniband device

Definition at line 44 of file ibmgmt.c.

References ib_device::dev, device::driver_name, ib_work_queue::fill, ib_device::gid, ib_gid::guid, IB_GUID_ARGS, IB_GUID_FMT, ib_is_open(), ib_link_ok(), ib_device::lid, ib_queue_pair::list, list_for_each_entry, device::name, ib_queue_pair::name, ib_device::name, ib_work_queue::num_wqes, ib_device::port, ib_device::port_state, ib_gid::prefix, printf(), qp, ib_queue_pair::qpn, ib_device::qps, ib_queue_pair::recv, ib_gid::s, and ib_queue_pair::send.

Referenced by ibstat_exec().

                                        {
        struct ib_queue_pair *qp;

        printf ( "%s: " IB_GUID_FMT " using %s on %s port %d (%s)\n",
                 ibdev->name, IB_GUID_ARGS ( &ibdev->gid.s.guid ),
                 ibdev->dev->driver_name, ibdev->dev->name, ibdev->port,
                 ( ib_is_open ( ibdev ) ? "open" : "closed" ) );
        if ( ib_link_ok ( ibdev ) ) {
                printf ( "  [Link:up LID %d prefix " IB_GUID_FMT "]\n",
                         ibdev->lid, IB_GUID_ARGS ( &ibdev->gid.s.prefix ) );
        } else {
                printf ( "  [Link:down, port state %d]\n", ibdev->port_state );
        }
        list_for_each_entry ( qp, &ibdev->qps, list ) {
                printf ( "  QPN %#lx send %d/%d recv %d/%d %s\n",
                         qp->qpn, qp->send.fill, qp->send.num_wqes,
                         qp->recv.fill, qp->recv.num_wqes, qp->name );
        }
}