From owner-dev-commits-src-all@freebsd.org Sat Mar 6 10:33:58 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A5275560C35; Sat, 6 Mar 2021 10:33:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4Dt1DP3YDpz3hNV; Sat, 6 Mar 2021 10:33:57 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 32CA9260202; Sat, 6 Mar 2021 11:33:49 +0100 (CET) Subject: Re: git: 7563019bc693 - main - Add if_try_ref() to simplify refcount handling inside epoch. To: "Alexander V. Chernikov" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202102222338.11MNcBem084739@gitrepo.freebsd.org> From: Hans Petter Selasky Message-ID: <1db9ff12-55d7-da4d-dde9-d7e9045fffc4@selasky.org> Date: Sat, 6 Mar 2021 11:33:34 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <202102222338.11MNcBem084739@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Dt1DP3YDpz3hNV X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-3.28 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a01:4f8:c17:6c4b::2:from]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; SPAMHAUS_ZRD(0.00)[2a01:4f8:c17:6c4b::2:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.981]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 10:33:58 -0000 On 2/23/21 12:38 AM, Alexander V. Chernikov wrote: > The branch main has been updated by melifaro: > diff --git a/sys/net/if_var.h b/sys/net/if_var.h > index 291a7781d73c..33a737880a8d 100644 > --- a/sys/net/if_var.h > +++ b/sys/net/if_var.h > @@ -661,6 +661,7 @@ void if_link_state_change(struct ifnet *, int); > int if_printf(struct ifnet *, const char *, ...) __printflike(2, 3); > void if_ref(struct ifnet *); > void if_rele(struct ifnet *); > +bool if_try_ref(struct ifnet *); I think you should add __result_use_check for this prototype!? > int if_setlladdr(struct ifnet *, const u_char *, int); > int if_tunnel_check_nesting(struct ifnet *, struct mbuf *, uint32_t, int); > void if_up(struct ifnet *); > --HPS