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 56550e4 commit 9ac0377
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 9ac0377

Please sign in to comment.