X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/9c86d6da946b19a513ab554ee12473360d38d93d..eda689ee9aa29e6c4e791a7f295bc4a0a3ad5d83:/net/net.c?ds=inline diff --git a/net/net.c b/net/net.c index 3e6130f..e7bb80a 100644 --- a/net/net.c +++ b/net/net.c @@ -30,6 +30,7 @@ void eth_poll() struct pbuf *p; struct eth_hdr *ethhdr; static int ticks = 0; + int i = 15; /* Don't process more than 15 packets at a time; we don't want the host to get TOO badly slowed down... */ if (!_nic) return; @@ -44,9 +45,9 @@ void eth_poll() tcp_tmr(); ticks++; - if ((p = _nic->recv(_nic)) != NULL) + while ((i--) && ((p = _nic->recv(_nic)) != NULL)) { - outputf("NIC: Packet: %d bytes", p->tot_len); +// outputf("NIC: Packet: %d bytes", p->tot_len); LINK_STATS_INC(link.recv); @@ -74,7 +75,7 @@ static err_t _transmit(struct netif *netif, struct pbuf *p) { struct nic *nic = netif->state; - outputf("NIC: Transmit packet"); +// outputf("NIC: Transmit packet"); nic->transmit(p);