diff options
author | Michael Brown | 2007-01-09 22:47:01 +0100 |
---|---|---|
committer | Michael Brown | 2007-01-09 22:47:01 +0100 |
commit | c65fae2475ca652ef7948f286881b0c06bce861b (patch) | |
tree | 5588ec4b947ecc79201ee613d1cd0a0a7ca6d1d8 /src/drivers/net/legacy.c | |
parent | Autopadding was sometimes overwriting the struct list_head at the end (diff) | |
download | ipxe-c65fae2475ca652ef7948f286881b0c06bce861b.tar.gz ipxe-c65fae2475ca652ef7948f286881b0c06bce861b.tar.xz ipxe-c65fae2475ca652ef7948f286881b0c06bce861b.zip |
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.
Diffstat (limited to 'src/drivers/net/legacy.c')
-rw-r--r-- | src/drivers/net/legacy.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/drivers/net/legacy.c b/src/drivers/net/legacy.c index 2d952aac..091cdcc2 100644 --- a/src/drivers/net/legacy.c +++ b/src/drivers/net/legacy.c @@ -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; |