Skip to content

Commit

Permalink
Force a netdevice poll in net_tx() before attempting to transmit
Browse files Browse the repository at this point in the history
packet, to work around the problem whereby small TX rings get backed
up because we haven't yet poll()ed for TX completions.
  • Loading branch information
Michael Brown committed Oct 4, 2007
1 parent 0979e67 commit 2303c45
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/net/netdevice.c
Expand Up @@ -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 );
}

Expand Down

0 comments on commit 2303c45

Please sign in to comment.