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/lmc/if_lmc.c | |
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/lmc/if_lmc.c')
-rw-r--r-- | sys/dev/lmc/if_lmc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/lmc/if_lmc.c b/sys/dev/lmc/if_lmc.c index cf220f7..3bec1fa 100644 --- a/sys/dev/lmc/if_lmc.c +++ b/sys/dev/lmc/if_lmc.c @@ -184,7 +184,6 @@ static struct ng_type typestruct = { NULL, ng_lmc_connect, ng_lmc_rcvdata, - ng_lmc_rcvdata, ng_lmc_disconnect, ng_lmc_cmdlist }; @@ -623,9 +622,11 @@ lmc_rx_intr(lmc_softc_t * const sc) } } if (accept) { + int error; + ms->m_pkthdr.len = total_len; ms->m_pkthdr.rcvif = NULL; - ng_queue_data(sc->lmc_hook, ms, NULL); + NG_SEND_DATA_ONLY(error, sc->lmc_hook, ms); } ms = m0; } @@ -1396,7 +1397,7 @@ ng_lmc_rcvmsg(node_p node, struct ng_mesg *msg, */ static int ng_lmc_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; @@ -1462,6 +1463,8 @@ ng_lmc_rmnode(node_p node) static int ng_lmc_connect(hook_p hook) { + /* We are 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); } |