Reduced some network times.

This commit is contained in:
OBattler
2022-02-20 20:11:41 +01:00
parent 9b09a5058c
commit 3b5be8b619

View File

@@ -314,7 +314,7 @@ network_rx_queue(void *priv)
netpkt_t *tx_queued_pkt = NULL; netpkt_t *tx_queued_pkt = NULL;
if (network_rx_pause || !thread_test_mutex(network_mutex)) { if (network_rx_pause || !thread_test_mutex(network_mutex)) {
timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * 128.0); timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * 64.0);
return; return;
} }
@@ -323,12 +323,15 @@ network_rx_queue(void *priv)
if ((queued_pkt != NULL) && (queued_pkt->len > 0)) { if ((queued_pkt != NULL) && (queued_pkt->len > 0)) {
network_dump_packet(queued_pkt); network_dump_packet(queued_pkt);
ret = net_cards[network_card].rx(queued_pkt->priv, queued_pkt->data, queued_pkt->len); ret = net_cards[network_card].rx(queued_pkt->priv, queued_pkt->data, queued_pkt->len);
if (queued_pkt->len >= 128) if (ret) {
timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * ((double) queued_pkt->len)); if (queued_pkt->len >= 128)
else timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * ((double) queued_pkt->len));
timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * 128.0); else
timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * 128.0);
} else
timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * 64.0);
} else } else
timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * 128.0); timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * 64.0);
if (ret) if (ret)
queued_pkt = NULL; queued_pkt = NULL;
network_queue_advance(0); network_queue_advance(0);