Date: Sat, 22 Nov 2025 00:07:44 +0000 From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: e20e5724e614 - main - bpf: remove DDB code Message-ID: <6920fed0.dcec.199f95ba@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=e20e5724e6145fd2cd922f11d745b10a048443af commit e20e5724e6145fd2cd922f11d745b10a048443af Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2025-11-22 00:04:52 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2025-11-22 00:04:52 +0000 bpf: remove DDB code With modern debugging tools it isn't useful at all and is just a maintenance burden. --- sys/net/bpf.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index f2deeda8e1ee..23a23fbfe22e 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -37,7 +37,6 @@ #include <sys/cdefs.h> #include "opt_bpf.h" -#include "opt_ddb.h" #include "opt_netgraph.h" #include <sys/param.h> @@ -68,10 +67,6 @@ #include <sys/socket.h> -#ifdef DDB -#include <ddb/ddb.h> -#endif - #include <net/if.h> #include <net/if_var.h> #include <net/if_private.h> @@ -3188,35 +3183,3 @@ bpf_validate(const struct bpf_insn *f, int len) } #endif /* !DEV_BPF && !NETGRAPH_BPF */ - -#ifdef DDB -static void -bpf_show_bpf_if(struct bpf_if *bpf_if) -{ - - if (bpf_if == NULL) - return; - db_printf("%p:\n", bpf_if); -#define BPF_DB_PRINTF(f, e) db_printf(" %s = " f "\n", #e, bpf_if->e); -#define BPF_DB_PRINTF_RAW(f, e) db_printf(" %s = " f "\n", #e, e); - /* bif_ext.bif_next */ - /* bif_ext.bif_dlist */ - BPF_DB_PRINTF("%#x", bif_dlt); - BPF_DB_PRINTF("%u", bif_hdrlen); - /* bif_wlist */ - BPF_DB_PRINTF("%p", bif_ifp); - BPF_DB_PRINTF("%p", bif_bpf); - BPF_DB_PRINTF_RAW("%u", refcount_load(&bpf_if->bif_refcnt)); -} - -DB_SHOW_COMMAND(bpf_if, db_show_bpf_if) -{ - - if (!have_addr) { - db_printf("usage: show bpf_if <struct bpf_if *>\n"); - return; - } - - bpf_show_bpf_if((struct bpf_if *)addr); -} -#endifhelp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6920fed0.dcec.199f95ba>
