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:
Michael Brown
2007-01-09 21:47:01 +00:00
parent e822bc2a90
commit c65fae2475
6 changed files with 75 additions and 36 deletions

View File

@@ -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;