summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2007-10-04 15:46:56 +0200
committerMichael Brown2007-10-04 15:46:56 +0200
commit2303c45d6503ef938ef8a75829116ff174ae7f09 (patch)
tree87807ded2f22ef923b7f4a40d23858b7ac4e690a
parentAdded more verbose memory-map debugging. (diff)
downloadipxe-2303c45d6503ef938ef8a75829116ff174ae7f09.tar.gz
ipxe-2303c45d6503ef938ef8a75829116ff174ae7f09.tar.xz
ipxe-2303c45d6503ef938ef8a75829116ff174ae7f09.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.
-rw-r--r--src/net/netdevice.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/net/netdevice.c b/src/net/netdevice.c
index 59a50205..f2778e88 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 );
}