From owner-svn-src-stable-12@freebsd.org Fri Jan 10 23:52:37 2020 Return-Path: Delivered-To: svn-src-stable-12@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 47FB31F6F62; Fri, 10 Jan 2020 23:52:37 +0000 (UTC) (envelope-from bz@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47vftF1Jzwz4JZV; Fri, 10 Jan 2020 23:52:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 284A121EDA; Fri, 10 Jan 2020 23:52:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00ANqbjk054207; Fri, 10 Jan 2020 23:52:37 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00ANqb47054206; Fri, 10 Jan 2020 23:52:37 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202001102352.00ANqb47054206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 10 Jan 2020 23:52:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356620 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 356620 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jan 2020 23:52:37 -0000 Author: bz Date: Fri Jan 10 23:52:36 2020 New Revision: 356620 URL: https://svnweb.freebsd.org/changeset/base/356620 Log: MFC r354726,354755: if_llatbl: cleanup if_llatbl: change htable_unlink_entry() to early exist if no work to do No functional change. Modified: stable/12/sys/net/if_llatbl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_llatbl.c ============================================================================== --- stable/12/sys/net/if_llatbl.c Fri Jan 10 23:46:12 2020 (r356619) +++ stable/12/sys/net/if_llatbl.c Fri Jan 10 23:52:36 2020 (r356620) @@ -79,11 +79,6 @@ RW_SYSINIT(lltable_list_lock, &lltable_list_lock, "llt static void lltable_unlink(struct lltable *llt); static void llentries_unlink(struct lltable *llt, struct llentries *head); -static void htable_unlink_entry(struct llentry *lle); -static void htable_link_entry(struct lltable *llt, struct llentry *lle); -static int htable_foreach_lle(struct lltable *llt, llt_foreach_cb_t *f, - void *farg); - /* * Dump lle state for a specific address family. */ @@ -180,15 +175,16 @@ static void htable_unlink_entry(struct llentry *lle) { - if ((lle->la_flags & LLE_LINKED) != 0) { - IF_AFDATA_WLOCK_ASSERT(lle->lle_tbl->llt_ifp); - CK_LIST_REMOVE(lle, lle_next); - lle->la_flags &= ~(LLE_VALID | LLE_LINKED); + if ((lle->la_flags & LLE_LINKED) == 0) + return; + + IF_AFDATA_WLOCK_ASSERT(lle->lle_tbl->llt_ifp); + CK_LIST_REMOVE(lle, lle_next); + lle->la_flags &= ~(LLE_VALID | LLE_LINKED); #if 0 - lle->lle_tbl = NULL; - lle->lle_head = NULL; + lle->lle_tbl = NULL; + lle->lle_head = NULL; #endif - } } struct prefix_match_data {