Module Name:    src
Committed By:   ozaki-r
Date:           Fri Mar 24 09:22:46 UTC 2017

Modified Files:
        src/sys/net: if_ethersubr.c

Log Message:
Remove KERNEL_LOCK for arpresolve in ether_output

Because arpresolve should be already MP-safe.


To generate a diff of this commit:
cvs rdiff -u -r1.239 -r1.240 src/sys/net/if_ethersubr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.239 src/sys/net/if_ethersubr.c:1.240
--- src/sys/net/if_ethersubr.c:1.239	Tue Feb 21 03:59:31 2017
+++ src/sys/net/if_ethersubr.c	Fri Mar 24 09:22:46 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ethersubr.c,v 1.239 2017/02/21 03:59:31 ozaki-r Exp $	*/
+/*	$NetBSD: if_ethersubr.c,v 1.240 2017/03/24 09:22:46 ozaki-r Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.239 2017/02/21 03:59:31 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.240 2017/03/24 09:22:46 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -246,23 +246,14 @@ ether_output(struct ifnet * const ifp0, 
 
 #ifdef INET
 	case AF_INET:
-#ifndef NET_MPSAFE
-		KERNEL_LOCK(1, NULL);
-#endif
 		if (m->m_flags & M_BCAST)
 			(void)memcpy(edst, etherbroadcastaddr, sizeof(edst));
 		else if (m->m_flags & M_MCAST)
 			ETHER_MAP_IP_MULTICAST(&satocsin(dst)->sin_addr, edst);
 		else if ((error = arpresolve(ifp, rt, m, dst, edst,
 		    sizeof(edst))) != 0) {
-#ifndef NET_MPSAFE
-			KERNEL_UNLOCK_ONE(NULL);
-#endif
 			return error == EWOULDBLOCK ? 0 : error;
 		}
-#ifndef NET_MPSAFE
-		KERNEL_UNLOCK_ONE(NULL);
-#endif
 		/* If broadcasting on a simplex interface, loopback a copy */
 		if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
 			mcopy = m_copy(m, 0, (int)M_COPYALL);

Reply via email to