diff options
author | julian <julian@FreeBSD.org> | 2000-12-12 18:52:14 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2000-12-12 18:52:14 +0000 |
commit | 2d1192e61200eb8fc54319899e014acefd14ae74 (patch) | |
tree | 7cea4425abc67a898f27d4352a634cfa82aad7cc /sys/dev/sr | |
parent | 66009fc30e546f777cfc59b5d148551c44f649e2 (diff) | |
download | FreeBSD-src-2d1192e61200eb8fc54319899e014acefd14ae74.zip FreeBSD-src-2d1192e61200eb8fc54319899e014acefd14ae74.tar.gz |
Reviewed by: Archie@freebsd.org
This clears out my outstanding netgraph changes.
There is a netgraph change of design in the offing and this is to some
extent a superset of soem of the new functionality and some of the old
functionality that may be removed.
This code works as before, but allows some new features that I want to
work with and evaluate. It is the basis for a version of netgraph
with integral locking for SMP use.
This is running on my test machine with no new problems :-)
Diffstat (limited to 'sys/dev/sr')
-rw-r--r-- | sys/dev/sr/if_sr.c | 8 | ||||
-rw-r--r-- | sys/dev/sr/if_sr_isa.c | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/sys/dev/sr/if_sr.c b/sys/dev/sr/if_sr.c index b27d2f5..86efdb7 100644 --- a/sys/dev/sr/if_sr.c +++ b/sys/dev/sr/if_sr.c @@ -2408,6 +2408,8 @@ sr_get_packets(struct sr_softc *sc) sca_descriptor *rxdesc; /* descriptor in memory */ #ifndef NETGRAPH struct ifnet *ifp; /* network intf ctl table */ +#else + int error; #endif /* NETGRAPH */ struct mbuf *m = NULL; /* message buffer */ @@ -2533,7 +2535,7 @@ sr_get_packets(struct sr_softc *sc) bp[9], bp[10], bp[11]); } #endif - ng_queue_data(sc->hook, m, NULL); + NG_SEND_DATA_ONLY(error, sc->hook, m); sc->ipackets++; #endif /* NETGRAPH */ /* @@ -3239,7 +3241,7 @@ ngsr_rcvmsg(node_p node, struct ng_mesg *msg, const char *retaddr, */ static int ngsr_rcvdata(hook_p hook, struct mbuf *m, meta_p meta, - struct mbuf **ret_m, meta_p *ret_meta) + struct mbuf **ret_m, meta_p *ret_meta, struct ng_mesg **resp) { int s; int error = 0; @@ -3306,6 +3308,8 @@ ngsr_rmnode(node_p node) static int ngsr_connect(hook_p hook) { + /* probably not at splnet, force outward queueing */ + hook->peer->flags |= HK_QUEUE; /* be really amiable and just say "YUP that's OK by me! " */ return (0); } diff --git a/sys/dev/sr/if_sr_isa.c b/sys/dev/sr/if_sr_isa.c index b27d2f5..86efdb7 100644 --- a/sys/dev/sr/if_sr_isa.c +++ b/sys/dev/sr/if_sr_isa.c @@ -2408,6 +2408,8 @@ sr_get_packets(struct sr_softc *sc) sca_descriptor *rxdesc; /* descriptor in memory */ #ifndef NETGRAPH struct ifnet *ifp; /* network intf ctl table */ +#else + int error; #endif /* NETGRAPH */ struct mbuf *m = NULL; /* message buffer */ @@ -2533,7 +2535,7 @@ sr_get_packets(struct sr_softc *sc) bp[9], bp[10], bp[11]); } #endif - ng_queue_data(sc->hook, m, NULL); + NG_SEND_DATA_ONLY(error, sc->hook, m); sc->ipackets++; #endif /* NETGRAPH */ /* @@ -3239,7 +3241,7 @@ ngsr_rcvmsg(node_p node, struct ng_mesg *msg, const char *retaddr, */ static int ngsr_rcvdata(hook_p hook, struct mbuf *m, meta_p meta, - struct mbuf **ret_m, meta_p *ret_meta) + struct mbuf **ret_m, meta_p *ret_meta, struct ng_mesg **resp) { int s; int error = 0; @@ -3306,6 +3308,8 @@ ngsr_rmnode(node_p node) static int ngsr_connect(hook_p hook) { + /* probably not at splnet, force outward queueing */ + hook->peer->flags |= HK_QUEUE; /* be really amiable and just say "YUP that's OK by me! " */ return (0); } |