From nobody Thu Apr 25 18:20:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VQPKJ6N78z5JGd6; Thu, 25 Apr 2024 18:20:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQPKJ5mB6z4XSm; Thu, 25 Apr 2024 18:20:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714069204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SJfAxlyIH6GOkYoyS9urg9ASSRBlkzlhQyK3NZIwdqI=; b=A9ZXEVIoDPgNBXLzW6SddBiMGCcuUuHnPBr9QsQolJcMMHqaX5DIpzQ2XzDYKqoFYnB1Wo kdpWStHMg3+7pAu5vaIYCC6nk37lT9tQYPpB5JCjZo/5z/jPU3mDx+8WMsE724M3bYv9Tr /acXPYSN4cu2sA0bc6RnAesmPmtMNRCHCQAIFHOFDQHyqo+UZKYzp+35dIOb6Tt9W12uQP Q9TcjiGOA7qLm/GEaf+BmFmpT3GXVCYKoJpNB5UvDqFa4qwku8sWsMyIbGZnNee6mmRT+b 0k6JpQIgBEaRPAOgl/9tnETP0vaRJELo3kb6TRW5+enaxjpPZ2f4hMZUeME6lA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714069204; a=rsa-sha256; cv=none; b=cB6yf15ETRo8IwaWXWXvj06qgtbefAF1nvTpxIrl4lmMRDfx0cV/88VrLY+vdJZnAvRTDv L1Q/QVm3FG0oj/lR7+DC8EvrRlAQRIV0tXC5vm8ouwEKyCWKTY0QWvHzhPx3MvHaGSMEcs a5L2wnnjWL+IZVDFsM9jsbJhDyHaClobVuESkUuHUQz3UNZu7LnyvsW8s37R/ekBPEoUFE OlkU0Zyln3wRPTCaytQFjjjm1IM3yOvgtA1U3BS3Q9zTDDrsTTU9toodhX/8pSsFNXMTZt 4YE6GB5O/4nz1qe1NqLUg+Ukb5vuV71pzBx8tJKw7Igvcucr2EOuUzvSon07Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714069204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SJfAxlyIH6GOkYoyS9urg9ASSRBlkzlhQyK3NZIwdqI=; b=Tt+mGhkoZDTlLZKMId/EyjlJAtCc3GdDR2wDQYIKbLMUNgz7RcWeY3ZFMFMY+u73TpJpKq 4yKGl9jhMtH8sJLPqrbwDDm0EmVkUkMKmjlWOlETmRmuHdHqxfDvE+6oqterawLYjIw+J8 sCduEeVRqnNzw1h/nNVLU4Xir/XZI1s1io6Q0AVYxn51cPe3Wwq9y778QzF79d0dzvVjS2 hodW6xm2oAnlLsT5qM5LB3p6aCSBCQqpeL7yQ68bGiq/xWkFlTWKaEIbbrnSQhV2LI4eOi ywvK1YyM055kWHYsje025ec/q1fcLl/RvTuduAY68bWAf9InrXhFddtUcWePcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VQPKJ4yB5z18TC; Thu, 25 Apr 2024 18:20:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43PIK4Qp001532; Thu, 25 Apr 2024 18:20:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43PIK4BO001528; Thu, 25 Apr 2024 18:20:04 GMT (envelope-from git) Date: Thu, 25 Apr 2024 18:20:04 GMT Message-Id: <202404251820.43PIK4BO001528@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 73585176ffd8 - main - if_bridge: Minor style fixes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 73585176ffd84c13d68cad67c2ca81643f09075c Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=73585176ffd84c13d68cad67c2ca81643f09075c commit 73585176ffd84c13d68cad67c2ca81643f09075c Author: Zhenlei Huang AuthorDate: 2024-04-25 18:19:11 +0000 Commit: Zhenlei Huang 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)