#include <ipxe/settings.h>
#include <ipxe/fragment.h>
#include <ipxe/ipstat.h>
+#include <ipxe/profile.h>
/** @file
*
.stats = &ipv4_stats,
};
+/** Transmit profiler */
+static struct profiler ipv4_tx_profiler __profiler = { .name = "ipv4.tx" };
+
+/** Receive profiler */
+static struct profiler ipv4_rx_profiler __profiler = { .name = "ipv4.rx" };
+
/**
* Add IPv4 minirouting table entry
*
const void *ll_dest;
int rc;
+ /* Start profiling */
+ profile_start ( &ipv4_tx_profiler );
+
/* Update statistics */
ipv4_stats.out_requests++;
}
}
+ profile_stop ( &ipv4_tx_profiler );
return 0;
err:
uint16_t pshdr_csum;
int rc;
+ /* Start profiling */
+ profile_start ( &ipv4_rx_profiler );
+
/* Update statistics */
ipv4_stats.in_receives++;
ipv4_stats.in_octets += iob_len ( iobuf );
return rc;
}
+ profile_stop ( &ipv4_rx_profiler );
return 0;
err_header: