summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
Commit message (Collapse)AuthorAgeFilesLines
* Use log() instead of printf(), to reduce flood on console.glebius2005-01-202-5/+9
| | | | MFC after: 1 week
* Ups, misprint, change and => add.rik2005-01-161-1/+1
| | | | Submitted by: ru
* Fix comment. Code 0x95 means locking shift to codeset 5 according torik2005-01-161-2/+2
| | | | | | | T1.617 AnnexD. Locking shift procedure is described in ANSI T1.607. MFC after: 3 days
* Fix variable name in comment num=>alen. (Lost part of commit rev 1.2)rik2005-01-161-1/+1
| | | | MFC after: 3 days
* Raise & drop IFF_RUNNING upon receival of netgraph flow controlglebius2005-01-141-0/+12
| | | | messages.
* Consider IFF_UP as "administratively up" flag, and IFF_RUNNING asglebius2005-01-141-2/+2
| | | | "operationally up" flag. Hence this, revert 1.35 to use IFF_RUNNING.
* Locking and cleanup of tty netgraph node. Tty stack is Giant-locked,glebius2005-01-131-176/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | so we need to acquire Giant in netgraph methods, so that we don't race with line discipline methods. Remove NET_NEEDS_GIANT. - Packets coming into node from netgraph are queued in ifqueue attached to node private data. - Mutex in struct ifqueue is used to lock not only the queue, but the whole private data, and tp->t_lsc field. - tp->t_lsc pointer is used to indicate whether line discipline is attached to netgraph or not. - Use FLG_DIE flag to indicate that node may be destroyed. (This protection doesn't work, and it didn't before. Must be redesigned.) - Increment ngt_unit atomically, removing mutex. - Acquire Giant, when executing ngt_start() from netgraph context. - Acquire Giant, when {,de}registering line discipline. - Uncomment forcing queue mode on peers hook, since this is reasonable. - Force queue mode on our hook, to avoid acquiring Giant when coming from network stack. We may already hold some mutexes at this point. Cleanups: - Use callout_pending() instead of our own flag. - Remove spl(9) calls. Now we can use return() instead of ERROUT(). style(9): - Sort includes. - Sparse initializer for struct linesw. - Remove some empty lines, sort declarations. Reviewed by: julian, phk MFC after: 1 month
* Utilize callout_pending() macroglebius2005-01-112-3/+3
|
* - Use ng_callout() instead of timeout(9).glebius2005-01-111-12/+14
| | | | | | - Remove spl(9) calls. XXX: not tested
* - Use ng_callout() instead of home-grown implementation.glebius2005-01-112-22/+4
| | | | Submitted by: emax
* - Use ng_callout() instead of callout_reset(9).glebius2005-01-111-93/+36
| | | | | | | | | - Use callout_pending() instead of our own flags. - Remove home-grown protection of node, which has a scheduled callout(). - Remove spl(9) calls. Tested by: bz
* Make default RFCOMM session MTU match default L2CAP MTU.emax2005-01-111-3/+3
| | | | | | | | | | | | | | | | | | | | This is just a workaround for a know problem with Motorola E1000 phone. Something is wrong with the configuration of L2CAP/RFCOMM channel. Even though we set L2CAP MTU to 132 bytes (default RFCOMM MTU 127 + 5 bytes RFCOMM frame header) and the phone accepts it, the phone still sends oversized L2CAP packets. It appears that the phone wants to use bigger (667 bytes) RFCOMM frames, but it does not segment them according to the configured L2CAP MTU. The 667 bytes RFCOMM frame size corresponds to the default L2CAP MTU of 672 bytes (667 + 5 bytes RFCOMM frame header). This problem only appears if connection was initiated from the phone. I'm not sure who is at fault here, so for now just put workaround in place. Quick look at the spec did not reveal any anwser. Tested by: Jes < jjess at freebsd dot polarhome dot com > MFC after: 3 days
* This change adds reliability for Ethernet trunks built with ng_one2many:glebius2005-01-081-0/+31
| | | | | | | | | | - Introduce another ng_ether(4) callback ng_ether_link_state_p, which is called from if_link_state_change(), every time link is changed. - In ng_ether_link_state() send netgraph control message notifying of link state change to a node connected to "lower" hook. Reviewed by: sam MFC after: 2 weeks
* /* -> /*- for license, minor formatting changesimp2005-01-07142-188/+383
|
* Introduce new startup level SI_SUB_NETGRAPH that is afteremax2005-01-061-1/+1
| | | | | | | | | | | | | | SI_SUB_INIT_IF but before SI_SUB_DRIVERS. Make Netgraph(4) framework initialize at SI_SUB_NETGRAPH level. This does not address the bigger problem: MODULE_DEPEND does not seem to work when modules are compiled in the kernel, but it fixes the problem with Netgraph Bluetooth device drivers reported by a few folks. PR: i386/69876 Reviewed by: julian, rik, scottl MFC after: 3 days
* Kill a half dead comment. It's first half was killed in rev 1.12.rik2005-01-041-1/+0
| | | | MFC after: 3 days
* Rename 'class' field to 'uclass' in the ng_hci_inquiry_response structure.emax2005-01-041-1/+1
| | | | | | | class is a reserved word in C++ Submitted by: Markus Brueffer < markus AT brueffer DOT de > MFC after: 3 days
* Remove a check that never returns true, because in this case we have panicglebius2004-12-301-2/+0
| | | | before the check.
* - Plug a memory leak in ng_netflow_cache_init().glebius2004-12-281-5/+10
| | | | | | | - Initialize error to 0 in ng_netflow_flow_add() (a nop change). - Update cache statistics holding workqueue mutex. MFC after: 3 days
* tsleep => msleeprik2004-12-261-2/+2
| | | | | | | | | read sys/kern/kern_synch.c, msleep (): KASSERT(timo != 0 || mtx_owned(&Giant) || mtx != NULL, ("sleeping without a mutex")); MFC after: 3 days
* Fix creation on "dlciX" hook in ng_sample.rik2004-12-231-2/+3
| | | | | Approved by: julian MFC after: 3 days
* Fix counting length of leadin for hook name (sizeof () => strlen ()).rik2004-12-231-1/+1
| | | | | Approved by: julian MFC after: 3 days
* Move systm.h up, since it is required by mbuf.h.glebius2004-12-231-1/+1
| | | | Requested by: ru
* - sort includesglebius2004-12-231-5/+4
| | | | - remove duplicate include sys/sysctl.h
* Assert queue mutex in ng_dequeue() and ng_queue_rw().glebius2004-12-191-0/+4
|
* - Use ng_callout() instead of timeout.glebius2004-12-141-13/+7
| | | | | | | | - Schedule next timeout *after* finishing job of the current one. - Remove spl(9) calls. Tested by: ru Reviewed by: julian
* Use ng_callout() and ng_uncallout() instead of home-grownglebius2004-12-091-108/+17
| | | | | | | | implementation. Tested by: Savchuk Taras Reviewed by: archie Approved by: julian (mentor)
* - Use ng_callout() instead of timeout()glebius2004-12-081-30/+23
| | | | | | | - remove spl(9) calls Tested by: Ilya Pizik Approved by: julian (mentor)
* - Use ng_callout() instead of timeout(9).glebius2004-12-061-37/+14
| | | | | | | | | | - Do not put/remove node references, since this no longer needed. - Remove timerActive flag, use callout flags. - Schedule next callout after doing current one. Reviewed by: archie Approved by: julian (mentor)
* Use ng_callout() instead of timeout(9).glebius2004-12-051-7/+7
| | | | Approved by: julian (mentor)
* - Use uint16_t to pass argument for NGM_NETFLOW_IFINFO, bump cookie.glebius2004-12-052-6/+12
| | | | | | | | | | - Always check that index number passed from userland is <= NG_NETFLOW_MAXIFACES. [1] - Increase NG_NETFLOW_MAXIFACES up to 512. [2] Noticed by: Roman Palagin [1] Requested by: Yuri Y. Bushmelev [2] MFC after: 1 week
* Mechanically rename s/ng_timeout/ng_callout/g, s/ng_untimeout/ng_uncallout/g.glebius2004-12-018-33/+33
| | | | | | | This is done to keep both versions in RELENG_5 and support both APIs. Reviewed by: scottl Approved by: julian (mentor), implicitly
* Move ng_socket and ng_btsocket initialization to SI_SUB_PROTO_DOMAIN as theymlaier2004-11-302-2/+3
| | | | | | | | | | | | | | | call net_add_domain(). Calling this function too early (or late) breaks assertations about the global domains list. Actually it should be forbidden to call net_add_domain() outside of SI_SUB_PROTO_DOMAIN completely as there are many places where we traverse the domains list unprotected, but for now we allow late calls (mostly to support netgraph). In order to really fix this we have to lock the domains list in all places or find another way to ensure that we can safely walk the list while another thread might be adding a new domain. Spotted by: se Reviewed by: julian, glebius PR: kern/73321 (partly)
* Disable protocol field compression on the inner PPP frame when also doingarchie2004-11-271-1/+1
| | | | | | | normal PPP compression, as a workaround for certain (arguably) broken Linux PPP implementations that can't handle this particular case. MFC after: 1 week
* Netgraph flow control: change interface status when node receiveglebius2004-11-231-0/+12
| | | | | | | LINK_IS_UP/LINK_IS_DOWN messages. Approved by: julian (mentor), implicitly MFC after: 1 week
* Introduce new failure detection algorithm, called NG_ONE2MANY_FAIL_NOTIFY.glebius2004-11-232-1/+66
| | | | | | | | | | It means, that node listens to flow control messages from downstreams and removes link from list of active links whenever a LINK_IS_DOWN message is received. If LINK_IS_UP message is received, then links is put back into list of active links. Approved by: julian (mentor), implicitly MFC after: 1 week
* o Use ng_timeout() instead of timeout(9).glebius2004-11-231-11/+33
| | | | | | | | | | | o Implement some netgraph flow control: - Whenever status of HDLC heartbeat from pear is timed out, send NGM_LINK_IS_DOWN message. - If HDLC link changes status from down to up, send NGM_LINK_IS_UP message. Approved by: julian (mentor), implicitly MFC after: 1 week
* Remove unused macro.glebius2004-11-191-3/+0
| | | | Approved by: julian (mentor)
* Cancel pending timeout before scheduling a new one. This fixesglebius2004-11-191-0/+1
| | | | | | item leak, I've introduced with previous change. Approved by: julian (mentor)
* Correct typo. Return ENXIO instead of EIO.emax2004-11-191-1/+1
|
* Add myself to copyright.glebius2004-11-101-0/+1
| | | | Approved by: marks
* Initialize struct pr_userreqs in new/sparse style and fill in commonphk2004-11-082-126/+68
| | | | | | default elements in net_init_domain(). This makes it possible to grep these structures and see any bogosities.
* Partically backout previous commit. Since _callout_stop_safe() clearsglebius2004-11-041-2/+7
| | | | | | | | | | out c->c_func, we can't take it after callout_stop(). To take it before we need to acquire callout_lock, to avoid race. This commit narrows down area where lock is held, but hack is still present. This should be redesigned. Approved by: julian (mentor)
* Adapt to the new ng_timeout/ng_untimeout arguments. These now useharti2004-11-042-17/+11
| | | | | | the callout instead of the timeout interface. Submitted by: glebius
* Fix kernel build (caused by recent ng_{un}timeout API change)emax2004-11-035-23/+23
| | | | Submitted by: glebius
* - Make ng_timeout() to use callout() interface instead of timeout().glebius2004-11-023-30/+28
| | | | | | | - Remove callout-hacking from ng_untimeout(). Approved by: julian (mentor) MFC after: 1 month
* Fix a harmless error in order of ng_timeout() arguments.glebius2004-11-021-2/+2
| | | | Approved by: julian (mentor)
* Fix broken ng_h4(4). Basically, do not abuse t_sc field and use new t_lscemax2004-11-021-7/+9
| | | | | field created for line disciplne drivers private use. Also add NET_NEEDS_GIANT warning. For whatever reason ng_tty(4) was fixed but ng_h4(4) was not :(
* Removed bogus comment.glebius2004-11-011-2/+0
|
* o style changes:glebius2004-11-011-13/+11
| | | | | | | | | | - tabs after defines - tabs instead of many spaces - sort local variables by size o remove spl(9) calls Approved by: julian (mentor)
OpenPOWER on IntegriCloud