Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/net Pull up following revision(s) (requested by ozaki...



details:   https://anonhg.NetBSD.org/src/rev/ba77a6894902
branches:  netbsd-8
changeset: 434606:ba77a6894902
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Feb 05 14:18:00 2018 +0000

description:
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.

diffstat:

 sys/net/bpf.c     |  22 +++-------------------
 sys/net/bpfdesc.h |   3 ++-
 2 files changed, 5 insertions(+), 20 deletions(-)

diffs (85 lines):

diff -r 8545a785fd3c -r ba77a6894902 sys/net/bpf.c
--- a/sys/net/bpf.c     Mon Feb 05 14:00:37 2018 +0000
+++ b/sys/net/bpf.c     Mon Feb 05 14:18:00 2018 +0000
@@ -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_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 @@
        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_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,23 +751,11 @@
        mutex_exit(d->bd_buf_mtx);
 
        if (d->bd_async)
-               softint_schedule(d->bd_sih);
+               fownsignal(d->bd_pgid, SIGIO, 0, 0, NULL);
        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);
-}
-
-static void
 bpf_timed_out(void *arg)
 {
        struct bpf_d *d = arg;
diff -r 8545a785fd3c -r ba77a6894902 sys/net/bpfdesc.h
--- a/sys/net/bpfdesc.h Mon Feb 05 14:00:37 2018 +0000
+++ b/sys/net/bpfdesc.h Mon Feb 05 14:18:00 2018 +0000
@@ -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 @@
        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 */



Home | Main Index | Thread Index | Old Index