git: d00827a9ca0b - main - Revert "netstat: Resolve duplicate "dropped-packets" key from libxo output"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 22 Sep 2024 13:24:45 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=d00827a9ca0b4f1838b8671859c52c852c6a2727
commit d00827a9ca0b4f1838b8671859c52c852c6a2727
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-09-22 13:21:07 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-09-22 13:23:10 +0000
Revert "netstat: Resolve duplicate "dropped-packets" key from libxo output"
This reverts commit 94567c8641e235763b5b2926416d89d36654cde1.
This breaks normal netstat output. It's kinda tricky to do a quick fix
on, so revert this until that can be fixed. If via github, please
open a new pull request...
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/1331
---
usr.bin/netstat/if.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c
index 877c7aa8dd5e..172ea5324ccb 100644
--- a/usr.bin/netstat/if.c
+++ b/usr.bin/netstat/if.c
@@ -501,11 +501,8 @@ intpr(void (*pfunc)(char *), int af)
IFA_STAT(ipackets), link|network, 1);
show_stat("lu", nerr_len, "received-errors", IFA_STAT(ierrors),
link, 1);
- /* Below is kept for backwards compatibility. Will be removed before FreeBSD 16. */
show_stat("lu", nerr_len, "dropped-packets", IFA_STAT(iqdrops),
link, 1);
- show_stat("lu", nerr_len, "dropped-packets-in", IFA_STAT(iqdrops),
- link, 1);
if (bflag)
show_stat("lu", nbyte_len, "received-bytes",
IFA_STAT(ibytes), link|network, 0);
@@ -519,7 +516,7 @@ intpr(void (*pfunc)(char *), int af)
show_stat("NRSlu", nerr_len, "collisions", IFA_STAT(collisions),
link, 1);
if (dflag)
- show_stat("LSlu", nerr_len, "dropped-packets-out",
+ show_stat("LSlu", nerr_len, "dropped-packets",
IFA_STAT(oqdrops), link, 1);
xo_emit("\n");
@@ -708,11 +705,8 @@ loop:
new->ift_ip - old->ift_ip, 1, 1);
show_stat("lu", 5, "received-errors",
new->ift_ie - old->ift_ie, 1, 1);
- /* Below is kept for backwards compatibility. Will be removed before FreeBSD 16. */
show_stat("lu", 5, "dropped-packets",
new->ift_id - old->ift_id, 1, 1);
- show_stat("lu", 5, "dropped-packets-in",
- new->ift_id - old->ift_id, 1, 1);
show_stat("lu", 10, "received-bytes",
new->ift_ib - old->ift_ib, 1, 0);
show_stat("lu", 10, "sent-packets",
@@ -724,7 +718,7 @@ loop:
show_stat("NRSlu", 5, "collisions",
new->ift_co - old->ift_co, 1, 1);
if (dflag)
- show_stat("LSlu", 5, "dropped-packets-out",
+ show_stat("LSlu", 5, "dropped-packets",
new->ift_od - old->ift_od, 1, 1);
xo_close_instance("stats");
xo_emit("\n");