Module Name:    src
Committed By:   martin
Date:           Mon Feb  5 14:18:00 UTC 2018

Modified Files:
        src/sys/net [netbsd-8]: bpf.c bpfdesc.h

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #526):
        sys/net/bpfdesc.h: revision 1.45
        sys/net/bpf.c: revision 1.223
Abandon unnecessary softint
The softint was introduced to defer fownsignal that was called in bpf_wakeup to
softint at v1.139, but now bpf_wakeup always runs in softint so we don't need
the softint anymore.


To generate a diff of this commit:
cvs rdiff -u -r1.216.6.4 -r1.216.6.5 src/sys/net/bpf.c
cvs rdiff -u -r1.44 -r1.44.6.1 src/sys/net/bpfdesc.h

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/bpf.c
diff -u src/sys/net/bpf.c:1.216.6.4 src/sys/net/bpf.c:1.216.6.5
--- src/sys/net/bpf.c:1.216.6.4	Tue Jan  2 10:20:33 2018
+++ src/sys/net/bpf.c	Mon Feb  5 14:18:00 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf.c,v 1.216.6.4 2018/01/02 10:20:33 snj Exp $	*/
+/*	$NetBSD: bpf.c,v 1.216.6.5 2018/02/05 14:18:00 martin Exp $	*/
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.216.6.4 2018/01/02 10:20:33 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.216.6.5 2018/02/05 14:18:00 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_bpf.h"
@@ -268,7 +268,6 @@ static int	bpf_poll(struct file *, int);
 static int	bpf_stat(struct file *, struct stat *);
 static int	bpf_close(struct file *);
 static int	bpf_kqfilter(struct file *, struct knote *);
-static void	bpf_softintr(void *);
 
 static const struct fileops bpf_fileops = {
 	.fo_read = bpf_read,
@@ -562,8 +561,6 @@ bpfopen(dev_t dev, int flag, int mode, s
 	d->bd_atime = d->bd_mtime = d->bd_btime;
 	callout_init(&d->bd_callout, CALLOUT_MPSAFE);
 	selinit(&d->bd_sel);
-	d->bd_sih = softint_establish(SOFTINT_CLOCK|SOFTINT_MPSAFE,
-	    bpf_softintr, d);
 	d->bd_jitcode = NULL;
 	d->bd_filter = NULL;
 	BPF_DLIST_ENTRY_INIT(d);
@@ -620,7 +617,6 @@ bpf_close(struct file *fp)
 	bpf_freed(d);
 	callout_destroy(&d->bd_callout);
 	seldestroy(&d->bd_sel);
-	softint_disestablish(d->bd_sih);
 	mutex_obj_free(d->bd_mtx);
 	mutex_obj_free(d->bd_buf_mtx);
 	cv_destroy(&d->bd_cv);
@@ -755,20 +751,8 @@ bpf_wakeup(struct bpf_d *d)
 	mutex_exit(d->bd_buf_mtx);
 
 	if (d->bd_async)
-		softint_schedule(d->bd_sih);
-	selnotify(&d->bd_sel, 0, 0);
-}
-
-static void
-bpf_softintr(void *cookie)
-{
-	struct bpf_d *d;
-
-	d = cookie;
-	mutex_enter(d->bd_mtx);
-	if (d->bd_async)
 		fownsignal(d->bd_pgid, SIGIO, 0, 0, NULL);
-	mutex_exit(d->bd_mtx);
+	selnotify(&d->bd_sel, 0, 0);
 }
 
 static void

Index: src/sys/net/bpfdesc.h
diff -u src/sys/net/bpfdesc.h:1.44 src/sys/net/bpfdesc.h:1.44.6.1
--- src/sys/net/bpfdesc.h:1.44	Thu Feb  9 09:30:26 2017
+++ src/sys/net/bpfdesc.h	Mon Feb  5 14:18:00 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpfdesc.h,v 1.44 2017/02/09 09:30:26 ozaki-r Exp $	*/
+/*	$NetBSD: bpfdesc.h,v 1.44.6.1 2018/02/05 14:18:00 martin Exp $	*/
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -113,6 +113,7 @@ struct bpf_d {
 	pid_t		bd_pid;		/* corresponding PID */
 	/* DEPRECATED. Keep it to avoid breaking kvm(3) users */
 	LIST_ENTRY(bpf_d) _bd_list;	/* list of all BPF's */
+	/* DEPRECATED. Keep it to avoid breaking kvm(3) users */
 	void		*bd_sih;	/* soft interrupt handle */
 	struct timespec bd_atime;	/* access time */
 	struct timespec bd_mtime;	/* modification time */

Reply via email to