Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Oct 2010 18:42:09 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r213929 - head/sys/net
Message-ID:  <201010161842.o9GIg9NH085745@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Sat Oct 16 18:42:09 2010
New Revision: 213929
URL: http://svn.freebsd.org/changeset/base/213929

Log:
  lltable_drain() has never been used so far, thus #if 0 it for now.
  While touching it add the missing locking to the now disabled code
  for the time when we'll resurrect it.
  
  MFC after:	3 days

Modified:
  head/sys/net/if_llatbl.c
  head/sys/net/if_llatbl.h

Modified: head/sys/net/if_llatbl.c
==============================================================================
--- head/sys/net/if_llatbl.c	Sat Oct 16 17:30:27 2010	(r213928)
+++ head/sys/net/if_llatbl.c	Sat Oct 16 18:42:09 2010	(r213929)
@@ -183,6 +183,7 @@ lltable_free(struct lltable *llt)
 	free(llt, M_LLTABLE);
 }
 
+#if 0
 void
 lltable_drain(int af)
 {
@@ -197,15 +198,18 @@ lltable_drain(int af)
 
 		for (i=0; i < LLTBL_HASHTBL_SIZE; i++) {
 			LIST_FOREACH(lle, &llt->lle_head[i], lle_next) {
+				LLE_WLOCK(lle);
 				if (lle->la_hold) {
 					m_freem(lle->la_hold);
 					lle->la_hold = NULL;
 				}
+				LLE_WUNLOCK(lle);
 			}
 		}
 	}
 	LLTABLE_RUNLOCK();
 }
+#endif
 
 void
 lltable_prefix_free(int af, struct sockaddr *prefix, struct sockaddr *mask)

Modified: head/sys/net/if_llatbl.h
==============================================================================
--- head/sys/net/if_llatbl.h	Sat Oct 16 17:30:27 2010	(r213928)
+++ head/sys/net/if_llatbl.h	Sat Oct 16 18:42:09 2010	(r213929)
@@ -186,7 +186,9 @@ struct lltable *lltable_init(struct ifne
 void		lltable_free(struct lltable *);
 void		lltable_prefix_free(int, struct sockaddr *, 
                        struct sockaddr *);
+#if 0
 void		lltable_drain(int);
+#endif
 int		lltable_sysctl_dumparp(int, struct sysctl_req *);
 
 void		llentry_free(struct llentry *);



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