summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2022-12-19 01:44:02 +0000
committerOri Bernstein <ori@eigenstate.org>2022-12-19 01:44:02 +0000
commit515a285d48c47508f6d359adb4fbb0ede3654c59 (patch)
tree67bafb5f6f582219188dfe450c0e8b008f8b30cb
parent812e7515d6f9d102ebaeb89331ccb2a3b45d8c57 (diff)
ethervgbe: reduce console spam (thanks Arne Meyer)
this patch turns "no Tx entry available" messages into an ifstats counter to reduce console spam. While here, remove tx/rx offloading from the todo list to not give people ideas.
-rw-r--r--sys/src/9/pc/ethervgbe.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/src/9/pc/ethervgbe.c b/sys/src/9/pc/ethervgbe.c
index 67e96307b..35da7ab19 100644
--- a/sys/src/9/pc/ethervgbe.c
+++ b/sys/src/9/pc/ethervgbe.c
@@ -15,7 +15,6 @@
* - shutdown
* - promiscuous
* - report error
- * - Rx/Tx Csum
* - Jumbo frames
*
* Philippe Anel, xigh@free.fr
@@ -312,6 +311,7 @@ struct Stats
ulong rx;
ulong tx;
ulong txe;
+ ulong txentry;
ulong intr;
};
@@ -467,6 +467,7 @@ vgbeifstat(Ether* edev, void* a, long n, ulong offset)
l = 0;
l += snprint(p+l, READSTR-l, "tx: %uld\n", ctlr->stats.tx);
l += snprint(p+l, READSTR-l, "tx [errs]: %uld\n", ctlr->stats.txe);
+ l += snprint(p+l, READSTR-l, "tx [no entry]: %uld\n", ctlr->stats.txentry);
l += snprint(p+l, READSTR-l, "rx: %uld\n", ctlr->stats.rx);
l += snprint(p+l, READSTR-l, "intr: %uld\n", ctlr->stats.intr);
snprint(p+l, READSTR-l, "\n");
@@ -803,7 +804,7 @@ vgbetransmit(Ether* edev)
wiob(ctlr, TxCsrS, TxCsr_Wakeup);
if(count == 0)
- print("vgbe: transmit: no Tx entry available\n");
+ ctlr->stats.txentry++;
}
static void