Date: Thu, 25 Apr 2024 18:20:04 GMT From: Zhenlei Huang <zlei@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 73585176ffd8 - main - if_bridge: Minor style fixes Message-ID: <202404251820.43PIK4BO001528@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=73585176ffd84c13d68cad67c2ca81643f09075c commit 73585176ffd84c13d68cad67c2ca81643f09075c Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-04-25 18:19:11 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-04-25 18:19:11 +0000 if_bridge: Minor style fixes And more comments on the #ifdef INET blocks to improve readability. While here, revert the order of two prototypes to produce minimal diff compared to stable branches. MFC with: 65767e6126a7 --- sys/net/if_bridge.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 7b44d85d1fe8..1e6f9b578ee3 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -403,19 +403,16 @@ static int bridge_ioctl_sproto(struct bridge_softc *, void *); static int bridge_ioctl_stxhc(struct bridge_softc *, void *); static int bridge_pfil(struct mbuf **, struct ifnet *, struct ifnet *, int); -static void bridge_linkstate(struct ifnet *ifp); -static void bridge_linkcheck(struct bridge_softc *sc); - #ifdef INET static int bridge_ip_checkbasic(struct mbuf **mp); static int bridge_fragment(struct ifnet *, struct mbuf **mp, struct ether_header *, int, struct llc *); #endif /* INET */ - #ifdef INET6 static int bridge_ip6_checkbasic(struct mbuf **mp); #endif /* INET6 */ - +static void bridge_linkstate(struct ifnet *ifp); +static void bridge_linkcheck(struct bridge_softc *sc); /* * Use the "null" value from IEEE 802.1Q-2014 Table 9-2 @@ -3459,7 +3456,7 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, struct ifnet *ifp, int dir) if (V_pfil_ipfw_arp == 0) return (0); /* Automatically pass */ - /*FALLTHROUGH*/ + /* FALLTHROUGH */ case ETHERTYPE_IP: #endif #ifdef INET6 @@ -3587,8 +3584,7 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, struct ifnet *ifp, int dir) ip->ip_sum = in_cksum(*mp, hlen); break; -#endif - +#endif /* INET */ #ifdef INET6 case ETHERTYPE_IPV6: if (V_pfil_bridge && dir == PFIL_OUT && bifp != NULL && (rv = @@ -3747,7 +3743,7 @@ bad: *mp = m; return (-1); } -#endif +#endif /* INET */ #ifdef INET6 /* @@ -3880,7 +3876,7 @@ dropit: } return (error); } -#endif +#endif /* INET */ static void bridge_linkstate(struct ifnet *ifp)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202404251820.43PIK4BO001528>