The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=6a13b3d90612120c6e157ce7aaf7e2d1340e98ad
commit 6a13b3d90612120c6e157ce7aaf7e2d1340e98ad Author: Lexi Winter <i...@freebsd.org> AuthorDate: 2025-06-25 14:23:34 +0000 Commit: Lexi Winter <i...@freebsd.org> CommitDate: 2025-06-25 15:29:54 +0000 if_vlan: add a prototype for vlan_input_p Move the definition of vlan_input_p to net/if.c and its prototype to if_vlan_var.h, to match the other functions exported from if_vlan. Remove the previous comment which is now outdated. This is required for if_bridge to use this function. Reviewed by: zlei, kp, des, kib Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50567 --- sys/net/if.c | 1 + sys/net/if_ethersubr.c | 2 -- sys/net/if_vlan.c | 9 --------- sys/net/if_vlan_var.h | 1 + 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 9048fcb0a16a..79c883fd4a0a 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -2089,6 +2089,7 @@ int (*vlan_tag_p)(struct ifnet *, uint16_t *); int (*vlan_pcp_p)(struct ifnet *, uint16_t *); int (*vlan_setcookie_p)(struct ifnet *, void *); void *(*vlan_cookie_p)(struct ifnet *); +void (*vlan_input_p)(struct ifnet *, struct mbuf *); /* * Handle a change in the interface link state. To avoid LORs diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index cec1c08c2614..66a4724a786c 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -106,8 +106,6 @@ int (*ng_ether_output_p)(struct ifnet *ifp, struct mbuf **mp); void (*ng_ether_attach_p)(struct ifnet *ifp); void (*ng_ether_detach_p)(struct ifnet *ifp); -void (*vlan_input_p)(struct ifnet *, struct mbuf *); - /* if_bridge(4) support */ void (*bridge_dn_p)(struct mbuf *, struct ifnet *); bool (*bridge_same_p)(const void *, const void *); diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index a37a9d41fc53..9561ae5c316c 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -888,15 +888,6 @@ vlan_devat(struct ifnet *ifp, uint16_t vid) return (ifp); } -/* - * VLAN support can be loaded as a module. The only place in the - * system that's intimately aware of this is ether_input. We hook - * into this code through vlan_input_p which is defined there and - * set here. No one else in the system should be aware of this so - * we use an explicit reference here. - */ -extern void (*vlan_input_p)(struct ifnet *, struct mbuf *); - /* For if_link_state_change() eyes only... */ extern void (*vlan_link_state_p)(struct ifnet *); diff --git a/sys/net/if_vlan_var.h b/sys/net/if_vlan_var.h index 3a8e45dfab03..f0b09445d04b 100644 --- a/sys/net/if_vlan_var.h +++ b/sys/net/if_vlan_var.h @@ -168,6 +168,7 @@ extern int (*vlan_tag_p)(struct ifnet *, uint16_t *); extern int (*vlan_pcp_p)(struct ifnet *, uint16_t *); extern int (*vlan_setcookie_p)(struct ifnet *, void *); extern void *(*vlan_cookie_p)(struct ifnet *); +extern void (*vlan_input_p)(struct ifnet *, struct mbuf *); #include <sys/_eventhandler.h>