git: 5469a3493b17 - main - bpf: remove dead code

From: Gleb Smirnoff <glebius_at_FreeBSD.org>
Date: Fri, 21 Nov 2025 22:44:37 UTC
The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=5469a3493b17021a5272c4eb2e9d8024e424cd3b

commit 5469a3493b17021a5272c4eb2e9d8024e424cd3b
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2025-11-21 22:43:47 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2025-11-21 22:43:47 +0000

    bpf: remove dead code
    
    Should have gone together with 9738277b5c66.
---
 sys/net/bpf.c | 24 ------------------------
 sys/net/bpf.h |  1 -
 2 files changed, 25 deletions(-)

diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index f598733773d0..d80eb8b80016 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -2828,30 +2828,6 @@ bpfattach2(struct ifnet *ifp, u_int dlt, u_int hdrlen,
 }
 
 #ifdef VIMAGE
-/*
- * When moving interfaces between vnet instances we need a way to
- * query the dlt and hdrlen before detach so we can re-attch the if_bpf
- * after the vmove.  We unfortunately have no device driver infrastructure
- * to query the interface for these values after creation/attach, thus
- * add this as a workaround.
- */
-int
-bpf_get_bp_params(struct bpf_if *bp, u_int *bif_dlt, u_int *bif_hdrlen)
-{
-
-	if (bp == NULL)
-		return (ENXIO);
-	if (bif_dlt == NULL && bif_hdrlen == NULL)
-		return (0);
-
-	if (bif_dlt != NULL)
-		*bif_dlt = bp->bif_dlt;
-	if (bif_hdrlen != NULL)
-		*bif_hdrlen = bp->bif_hdrlen;
-
-	return (0);
-}
-
 /*
  * Detach descriptors on interface's vmove event.
  */
diff --git a/sys/net/bpf.h b/sys/net/bpf.h
index 486e3f59f7d5..dfb8373bb329 100644
--- a/sys/net/bpf.h
+++ b/sys/net/bpf.h
@@ -428,7 +428,6 @@ void	bpfattach2(struct ifnet *, u_int, u_int, struct bpf_if **);
 void	bpfdetach(struct ifnet *);
 bool	bpf_peers_present_if(struct ifnet *);
 #ifdef VIMAGE
-int	bpf_get_bp_params(struct bpf_if *, u_int *, u_int *);
 void	bpf_ifdetach(struct ifnet *);
 #endif