#include <ipxe/netdevice.h>
#include <ipxe/iobuf.h>
#include <ipxe/process.h>
+#include <ipxe/profile.h>
#include <ipxe/infiniband.h>
#include <ipxe/ib_mi.h>
#include <ipxe/ib_sma.h>
/** List of open Infiniband devices, in reverse order of opening */
static struct list_head open_ib_devices = LIST_HEAD_INIT ( open_ib_devices );
+/** Post send work queue entry profiler */
+static struct profiler ib_post_send_profiler __profiler =
+ { .name = "ib.post_send" };
+
+/** Post receive work queue entry profiler */
+static struct profiler ib_post_recv_profiler __profiler =
+ { .name = "ib.post_recv" };
+
/* Disambiguate the various possible EINPROGRESSes */
#define EINPROGRESS_INIT __einfo_error ( EINFO_EINPROGRESS_INIT )
#define EINFO_EINPROGRESS_INIT __einfo_uniqify \
struct ib_address_vector dest_copy;
int rc;
+ /* Start profiling */
+ profile_start ( &ib_post_send_profiler );
+
/* Check queue fill level */
if ( qp->send.fill >= qp->send.num_wqes ) {
DBGC ( ibdev, "IBDEV %p QPN %#lx send queue full\n",
return rc;
}
+ /* Increase fill level */
qp->send.fill++;
+
+ /* Stop profiling */
+ profile_stop ( &ib_post_send_profiler );
+
return 0;
}
struct io_buffer *iobuf ) {
int rc;
+ /* Start profiling */
+ profile_start ( &ib_post_recv_profiler );
+
/* Check packet length */
if ( iob_tailroom ( iobuf ) < IB_MAX_PAYLOAD_SIZE ) {
DBGC ( ibdev, "IBDEV %p QPN %#lx wrong RX buffer size (%zd)\n",
return rc;
}
+ /* Increase fill level */
qp->recv.fill++;
+
+ /* Stop profiling */
+ profile_stop ( &ib_post_recv_profiler );
+
return 0;
}