diff options
| author | Michael Brown | 2007-10-04 15:46:56 +0200 |
|---|---|---|
| committer | Michael Brown | 2007-10-04 15:57:33 +0200 |
| commit | 9ac0377fbb2223b68c8cdb69ad1b782239532d63 (patch) | |
| tree | 0161f21825dec1ddf8fd22e11b049adbf9142fb4 /src | |
| parent | Redefine bzimage_exec_context::mem_limit to be the highest permissible (diff) | |
| download | ipxe-9ac0377fbb2223b68c8cdb69ad1b782239532d63.tar.gz ipxe-9ac0377fbb2223b68c8cdb69ad1b782239532d63.tar.xz ipxe-9ac0377fbb2223b68c8cdb69ad1b782239532d63.zip | |
Force a netdevice poll in net_tx() before attempting to transmit
packet, to work around the problem whereby small TX rings get backed
up because we haven't yet poll()ed for TX completions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/net/netdevice.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/net/netdevice.c b/src/net/netdevice.c index 59a50205b..f2778e880 100644 --- a/src/net/netdevice.c +++ b/src/net/netdevice.c @@ -424,6 +424,14 @@ struct net_device * find_netdev_by_location ( unsigned int bus_type, */ int net_tx ( struct io_buffer *iobuf, struct net_device *netdev, struct net_protocol *net_protocol, const void *ll_dest ) { + + /* Force a poll on the netdevice to (potentially) clear any + * backed-up TX completions. This is needed on some network + * devices to avoid excessive losses due to small TX ring + * sizes. + */ + netdev_poll ( netdev ); + return netdev->ll_protocol->tx ( iobuf, netdev, net_protocol, ll_dest ); } |
