Module Name: src Committed By: knakahara Date: Fri Jul 22 07:13:56 UTC 2016
Modified Files: src/sys/net: if.c Log Message: Reduce KERNEL_LOCK thereby ifq_lock is used by default. if_snd is always excluded by ifq_lock now. So, the KERNEL_LOCK in if_transmit() which serializes packet output processing is not needed now. To generate a diff of this commit: cvs rdiff -u -r1.355 -r1.356 src/sys/net/if.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.c diff -u src/sys/net/if.c:1.355 src/sys/net/if.c:1.356 --- src/sys/net/if.c:1.355 Fri Jul 22 07:09:40 2016 +++ src/sys/net/if.c Fri Jul 22 07:13:56 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.355 2016/07/22 07:09:40 knakahara Exp $ */ +/* $NetBSD: if.c,v 1.356 2016/07/22 07:13:56 knakahara Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.355 2016/07/22 07:09:40 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.356 2016/07/22 07:13:56 knakahara Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -2874,17 +2874,7 @@ if_transmit(struct ifnet *ifp, struct mb s = splnet(); - /* - * If NET_MPSAFE is not defined , IFQ_LOCK() is nop. - * use KERNEL_LOCK instead of ifq_lock. - */ -#ifndef NET_MPSAFE - KERNEL_LOCK(1, NULL); -#endif IFQ_ENQUEUE(&ifp->if_snd, m, error); -#ifndef NET_MPSAFE - KERNEL_UNLOCK_ONE(NULL); -#endif if (error != 0) { /* mbuf is already freed */ goto out;