mirror of
https://github.com/ipxe/ipxe
synced 2026-02-14 02:31:26 +03:00
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.
This commit is contained in:
@@ -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,
|
int net_tx ( struct io_buffer *iobuf, struct net_device *netdev,
|
||||||
struct net_protocol *net_protocol, const void *ll_dest ) {
|
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 );
|
return netdev->ll_protocol->tx ( iobuf, netdev, net_protocol, ll_dest );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user