Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpnet Schedule only those netisr's that h...
details: https://anonhg.NetBSD.org/src/rev/8143f0c2fb66
branches: trunk
changeset: 327021:8143f0c2fb66
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Feb 25 22:40:53 2014 +0000
description:
Schedule only those netisr's that have registered handlers.
diffstat:
sys/rump/librump/rumpnet/netisr.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r 6e7c7b0b3f1a -r 8143f0c2fb66 sys/rump/librump/rumpnet/netisr.c
--- a/sys/rump/librump/rumpnet/netisr.c Tue Feb 25 22:18:09 2014 +0000
+++ b/sys/rump/librump/rumpnet/netisr.c Tue Feb 25 22:40:53 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netisr.c,v 1.7 2014/02/14 01:43:13 pooka Exp $ */
+/* $NetBSD: netisr.c,v 1.8 2014/02/25 22:40:53 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netisr.c,v 1.7 2014/02/14 01:43:13 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netisr.c,v 1.8 2014/02/25 22:40:53 pooka Exp $");
#include <sys/param.h>
#include <sys/intr.h>
@@ -42,7 +42,14 @@
schednetisr(int isr)
{
- softint_schedule(netisrs[isr]);
+ /*
+ * Do not schedule a softint that is not registered.
+ * This might cause the inq to fill, but the one calling us
+ * should start dropping packets once the inq is full,
+ * so no big harm done.
+ */
+ if (__predict_true(netisrs[isr]))
+ softint_schedule(netisrs[isr]);
}
void
Home |
Main Index |
Thread Index |
Old Index