mirror of
https://github.com/ipxe/ipxe
synced 2025-12-15 09:04:37 +03:00
Add RX quotas to the net device poll() method. This avoids the problem
of alloc_pkb() exhaustion when e.g. an iSCSI-booted DOS session is left idle for a long time at the C:\ prompt and builds up a huge packet backlog.
This commit is contained in:
@@ -38,10 +38,13 @@ static int legacy_transmit ( struct net_device *netdev, struct pk_buff *pkb ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void legacy_poll ( struct net_device *netdev ) {
|
||||
static void legacy_poll ( struct net_device *netdev, unsigned int rx_quota ) {
|
||||
struct nic *nic = netdev->priv;
|
||||
struct pk_buff *pkb;
|
||||
|
||||
if ( ! rx_quota )
|
||||
return;
|
||||
|
||||
pkb = alloc_pkb ( ETH_FRAME_LEN );
|
||||
if ( ! pkb )
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user