Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Use kmem_alloc instead of kmem_intr_alloc in ether_a...
details: https://anonhg.NetBSD.org/src/rev/cc31f9d0c7c3
branches: trunk
changeset: 357956:cc31f9d0c7c3
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Wed Dec 06 04:00:07 2017 +0000
description:
Use kmem_alloc instead of kmem_intr_alloc in ether_addmulti
ether_addmulti is now not called in softint thanks to wqinput that
pulled input routines of ICMP out of softint.
diffstat:
sys/net/if_ethersubr.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diffs (55 lines):
diff -r 9e945aabbf1f -r cc31f9d0c7c3 sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c Wed Dec 06 02:08:03 2017 +0000
+++ b/sys/net/if_ethersubr.c Wed Dec 06 04:00:07 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ethersubr.c,v 1.247 2017/11/22 04:27:57 msaitoh Exp $ */
+/* $NetBSD: if_ethersubr.c,v 1.248 2017/12/06 04:00:07 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.247 2017/11/22 04:27:57 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.248 2017/12/06 04:00:07 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1005,7 +1005,7 @@
ETHER_LOCK(ec);
while ((enm = LIST_FIRST(&ec->ec_multiaddrs)) != NULL) {
LIST_REMOVE(enm, enm_list);
- kmem_intr_free(enm, sizeof(*enm));
+ kmem_free(enm, sizeof(*enm));
ec->ec_multicnt--;
}
ETHER_UNLOCK(ec);
@@ -1223,8 +1223,7 @@
int error = 0;
/* Allocate out of lock */
- /* XXX still can be called in softint */
- enm = kmem_intr_alloc(sizeof(*enm), KM_SLEEP);
+ enm = kmem_alloc(sizeof(*enm), KM_SLEEP);
if (enm == NULL)
return ENOBUFS;
@@ -1269,7 +1268,7 @@
out:
ETHER_UNLOCK(ec);
if (enm != NULL)
- kmem_intr_free(enm, sizeof(*enm));
+ kmem_free(enm, sizeof(*enm));
return error;
}
@@ -1311,7 +1310,7 @@
ec->ec_multicnt--;
ETHER_UNLOCK(ec);
- kmem_intr_free(enm, sizeof(*enm));
+ kmem_free(enm, sizeof(*enm));
/*
* Return ENETRESET to inform the driver that the list has changed
* and its reception filter should be adjusted accordingly.
Home |
Main Index |
Thread Index |
Old Index