mirror of
https://github.com/ipxe/ipxe
synced 2025-12-13 23:41:45 +03:00
[pxe] Profile UNDI transmit datapath
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -38,6 +38,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
|||||||
#include <ipxe/ip.h>
|
#include <ipxe/ip.h>
|
||||||
#include <ipxe/arp.h>
|
#include <ipxe/arp.h>
|
||||||
#include <ipxe/rarp.h>
|
#include <ipxe/rarp.h>
|
||||||
|
#include <ipxe/profile.h>
|
||||||
#include "pxe.h"
|
#include "pxe.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -53,6 +54,9 @@ static int undi_tx_count = 0;
|
|||||||
|
|
||||||
struct net_device *pxe_netdev = NULL;
|
struct net_device *pxe_netdev = NULL;
|
||||||
|
|
||||||
|
/** Transmit profiler */
|
||||||
|
static struct profiler undi_tx_profiler __profiler = { .name = "undi.tx" };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set network device as current PXE network device
|
* Set network device as current PXE network device
|
||||||
*
|
*
|
||||||
@@ -309,6 +313,9 @@ pxenv_undi_transmit ( struct s_PXENV_UNDI_TRANSMIT *undi_transmit ) {
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
/* Start profiling */
|
||||||
|
profile_start ( &undi_tx_profiler );
|
||||||
|
|
||||||
/* Sanity check */
|
/* Sanity check */
|
||||||
if ( ! pxe_netdev ) {
|
if ( ! pxe_netdev ) {
|
||||||
DBGC ( &pxe_netdev, "PXENV_UNDI_TRANSMIT called with no "
|
DBGC ( &pxe_netdev, "PXENV_UNDI_TRANSMIT called with no "
|
||||||
@@ -422,6 +429,7 @@ pxenv_undi_transmit ( struct s_PXENV_UNDI_TRANSMIT *undi_transmit ) {
|
|||||||
return PXENV_EXIT_FAILURE;
|
return PXENV_EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
profile_stop ( &undi_tx_profiler );
|
||||||
undi_transmit->Status = PXENV_STATUS_SUCCESS;
|
undi_transmit->Status = PXENV_STATUS_SUCCESS;
|
||||||
return PXENV_EXIT_SUCCESS;
|
return PXENV_EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user