From nobody Mon Jun 17 04:28:01 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 4W2cLn71Wlz5NGL2; Mon, 17 Jun 2024 04:28:01 +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 4W2cLn5Pjmz4thh; Mon, 17 Jun 2024 04:28:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718598481; 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=89Ak88Ug5DTFJ5lxryQ4ztavxRplTLrf+9IwGXtEUf4=; b=e2n3nwhJRevW3WHXQKKDVWFssCRzeEw9KRe6X8d7J8jFSPZL7c4/GmAwYVTRzbI7GitZOi gpv7NuISLvLM02INGvdpQXPSfGybNZGoB4p1vCMQczR30SAH2X99ibQeo8jBRKh4N8/7bb RH3g3clc3UkbKzs1XP+w8npayP1w/h6ve/Kpguk1Raim8hFfqfL7kbdg4fistu895abgei yJflOQfQDJ93Y1WEefzim46Aoz18OVrhztIAZQz591VwSV713DXzvg3QLgIxljZ6qE/+LF zMRVzh6K3/HPFCxxDCaKgLd/23zypYYyDooUS/s30/7NdpOg+VZ+ca7h/3hq8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718598481; a=rsa-sha256; cv=none; b=r5s54XhxgHcdf2AxbLLVgJfEJh2O+kS22sn8CKe/SMqwehyD3nOqc3O/kWpOg5h7MRtBCe KhjoJVdP81OotjcTK8J7McX7Y+Kt9JCtwwLtB4KL+eWI07lDuIYCFu4ZXbJOR/Mk0ClbuP jGla4Mtb7YMguTC+ETMSw5GUtmbvGk8hKhgwc+oDJdsk1FG6/9H3YcxofqtlxXR5O3EsEt Y+1eF3OVje1TsT/dpVjN7GhGCtj9yYFLVv2ClEUXIRPjM3Zmk0xgvgAkxcV3iEvrHqqt4U u1xyxLioXGrS5Qn3lNTPKf8yslntFjSW5rSWMViK6SBIRkKDaJ7jJ/mzfZ1vJQ== 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=1718598481; 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=89Ak88Ug5DTFJ5lxryQ4ztavxRplTLrf+9IwGXtEUf4=; b=EChoIrMjUAle8nPQaV6Q02TLhxWOSGLpWaokQooWxx1gMsvtF5J5aDgXD8E8udC3Ipan1u fJAn4UyfrNkpNGPz0QP/GV3J341rgYSyVwDoBlfIRVqmKGM/zn2G1/Tfgz8m0h5Z58tlZ8 ct+VSfkEibQHbodS48UTjCiSaLMep3yw2qGzGwOmkrhETPQck5f9cVsqHoKASHH9+86nXT 6ebzCvfnyAt6OUlT4EZO6svX/lWRrQ5h80vRBT470Ue2jWv3BKBcUER2NUGUL7gTdJ/Y6P ntvMrzn945qn2xXeB9KcPY7MuWW3zdtntP+Jkq20d+vWeEXen6waMh7N54N7nA== 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 4W2cLn51X9z1GJc; Mon, 17 Jun 2024 04:28:01 +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 45H4S1fC073985; Mon, 17 Jun 2024 04:28:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45H4S1De073982; Mon, 17 Jun 2024 04:28:01 GMT (envelope-from git) Date: Mon, 17 Jun 2024 04:28:01 GMT Message-Id: <202406170428.45H4S1De073982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: d27149888c39 - stable/13 - bpf: Make bpf_peers_present a boolean inline function 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/stable/13 X-Git-Reftype: branch X-Git-Commit: d27149888c39fbf9a7cc174af50888cce0ca297d Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d27149888c39fbf9a7cc174af50888cce0ca297d commit d27149888c39fbf9a7cc174af50888cce0ca297d Author: Zhenlei Huang AuthorDate: 2024-06-07 15:06:08 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-17 04:10:23 +0000 bpf: Make bpf_peers_present a boolean inline function This function was introduced in commit [1] and is actually used as a boolean function although it was not defined as so. No functional change intended. 1. 16d878cc99ef Fix the following bpf(4) race condition which can result in a panic Reviewed by: markj, kp, #network MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45509 (cherry picked from commit 0dfd11abc4bd0dcb96a6d287cc4e52e8f59b64c1) (cherry picked from commit 6ad2e347fcf8fa6aa9ebd84cfa4c71a1af90b4dd) --- sys/net/bpf.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/net/bpf.h b/sys/net/bpf.h index 88331c2f663a..347b764735d0 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -431,15 +431,13 @@ int bpf_get_bp_params(struct bpf_if *, u_int *, u_int *); void bpfilterattach(int); u_int bpf_filter(const struct bpf_insn *, u_char *, u_int, u_int); -static __inline int +static __inline bool bpf_peers_present(struct bpf_if *bpf) { struct bpf_if_ext *ext; ext = (struct bpf_if_ext *)bpf; - if (!CK_LIST_EMPTY(&ext->bif_dlist)) - return (1); - return (0); + return (!CK_LIST_EMPTY(&ext->bif_dlist)); } #define BPF_TAP(_ifp,_pkt,_pktlen) do { \