Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jan 2020 23:52:37 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
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
Message-ID:  <202001102352.00ANqb47054206@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001102352.00ANqb47054206>