aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph
Commit message (Collapse)AuthorAgeFilesLines
* o add a flags parameter to netisr_register that is used to specifySam Leffler2003-11-081-1/+2
| | | | | | | | | | | | | | | | | | | whether or not the isr needs to hold Giant when running; Giant-less operation is also controlled by the setting of debug_mpsafenet o mark all netisr's except NETISR_IP as needing Giant o add a GIANT_REQUIRED assertion to the top of netisr's that need Giant o pickup Giant (when debug_mpsafenet is 1) inside ip_input before calling up with a packet o change netisr handling so swi_net runs w/o Giant; instead we grab Giant before invoking handlers based on whether the handler needs Giant o change netisr handling so that netisr's that are marked MPSAFE may have multiple instances active at a time o add netisr statistics for packets dropped because the isr is inactive Supported by: FreeBSD Foundation Notes: svn path=/head/; revision=122320
* The layer 3 (signalling) of NgATM netgraph node: ng_uni. This nodeHartmut Brandt2003-11-073-0/+1203
| | | | | | | handles user and network side signaling and partly PNNI. Notes: svn path=/head/; revision=122219
* Replace the lock-less algorithm for the free item list with a moreHartmut Brandt2003-11-051-64/+36
| | | | | | | | | | | | | | conservative lock. The problem with the lock-less algorithm is that it suffers from the ABA problem. Running an application with funnels a couple of 100kpkts/s through the netgraph system on a dual CPU system with MPSAFE drivers will panic almost immediatly with the old algorithm. It may be possible to eliminate the contention between threads that insert free items into the list and those that get free items by using the Michael/Scott queue algorithm that has two locks. Notes: svn path=/head/; revision=122110
* Replace the if_name and if_unit members of struct ifnet with new membersBrooks Davis2003-10-317-62/+43
| | | | | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname) Notes: svn path=/head/; revision=121816
* Netgraph part of the NgATM signalling AA layer. These nodes canHartmut Brandt2003-10-248-0/+2715
| | | | | | | | also be used as a general-purpose transport protocol above any packet layer (IP, UDP). Notes: svn path=/head/; revision=121461
* Remove a gcc-ism: declaring a variable array at the end of a structureHartmut Brandt2003-10-221-4/+4
| | | | | | | | as [0] and replace it with the ISO way of writing []. This has caused warnings with WARNS=6. Notes: svn path=/head/; revision=121325
* Change all SYSCTLS which are readonly and have a related TUNABLEMike Silbersack2003-10-211-2/+2
| | | | | | | | from CTLFLAG_RD to CTLFLAG_RDTUN so that sysctl(8) can provide more useful error messages. Notes: svn path=/head/; revision=121307
* Update Bluetooth code.Maksim Yevmenkin2003-10-1217-357/+459
| | | | | | | | Reviewed by: M. Warner Losh <imp@bsdimp.com>; John Hay <jhay@freebsd.org> Approved by: M. Warner Losh <imp@bsdimp.com> (mentor) Notes: svn path=/head/; revision=121054
* I don't know from where the notion that device driver should orPoul-Henning Kamp2003-09-282-29/+2
| | | | | | | | | | | | | | | | | even could call VOP_REVOKE() on vnodes associated with its dev_t's has originated, but it stops right here. If there are things people belive destroy_dev() needs to learn how to do, please tell me about it, preferably with a reproducible test case. Include <sys/uio.h> in bluetooth code rather than rely on <sys/vnode.h> to do so. The fact that some of the USB code needs to include <sys/vnode.h> still disturbs me greatly, but I do not have time to chase that. Notes: svn path=/head/; revision=120559
* Add Protocol Independent Multicast protocol.Jeffrey Hsu2003-08-201-0/+1
| | | | | | | Submitted by: Pavlin Radoslavov <pavlin@icir.org> Notes: svn path=/head/; revision=119187
* Add ng_atmpif: a HARP physical interface emulation. This allows oneHartmut Brandt2003-08-114-0/+1963
| | | | | | | | | to run the HARP ATM stack without real hardware. Submitted by: Vincent Jardin <vjardin@wanadoo.fr> Notes: svn path=/head/; revision=118774
* Process events from the ATM drivers. Carrier change and PVC changeHartmut Brandt2003-07-292-49/+126
| | | | | | | | | | | | messages are forwarded as netgraph control messages to the node that is connected to the manage hook. If that hook is not connected, the event is lost. Flow control events are converted to netgraph flow control messages and send along the hook that is connected to the flow controlled VC. ACR change events are converted to control messages and sent along the hook for the given VC. Notes: svn path=/head/; revision=118175
* add missing machine/bus.h that is necessary to build now that usb is bus_dmaJohn-Mark Gurney2003-07-161-0/+1
| | | | | | | aware. Notes: svn path=/head/; revision=117663
* Test the OPEN flag to see whether a VCI is already open on the hook insteadHartmut Brandt2003-07-151-2/+2
| | | | | | | to look for vci != 0. We can now open VCI 0 for monitoring purposes. Notes: svn path=/head/; revision=117642
* Remove three unneccessary comparisons that were always true.Hartmut Brandt2003-07-151-6/+0
| | | | | | | Spotted by: gcc Notes: svn path=/head/; revision=117631
* Allow the caller to get an erro direclty if we sent the packet immediatly.Julian Elischer2003-07-031-1/+1
| | | | | | | | Submitted by: Ian Dowse <iedowse@maths.tcd.ie> MFC after: 1 day Notes: svn path=/head/; revision=117209
* Allow VPI/VCI 0/0 to be opened. This will be used by the IDT77252 driverHartmut Brandt2003-07-021-9/+22
| | | | | | | | | to provide a "receive all cells" mode that can be used for monitoring. Check only the relevant MTU size when NOTX or NORX flags are set. Notes: svn path=/head/; revision=117157
* Fix a commentJulian Elischer2003-06-251-1/+1
| | | | | | | MFC after: 1 day Notes: svn path=/head/; revision=116839
* This is a netgraph node to access ATM interfaces. It works with theHartmut Brandt2003-06-252-0/+1598
| | | | | | | hatm(4) and fatm(4) drivers, en(4) will follow soon. Notes: svn path=/head/; revision=116808
* Use the <sys/bitstring.h> rather than <bitstring.h>Poul-Henning Kamp2003-06-135-5/+5
| | | | Notes: svn path=/head/; revision=116307
* fix a cut-n-paste error.Julian Elischer2003-05-151-1/+1
| | | | | | | | | | | in the case where the bridge node was closed down but a timeout still applied to it, the final reference to the node was freeing the private data structure using the wrong malloc type. Approved by: re@ Notes: svn path=/head/; revision=115036
* Last commit of the bluetooth upgrade. (this patch was forgotten in the firstJulian Elischer2003-05-101-2/+2
| | | | | | | | | | commit) Submitted by: Maksim Yevmenkin <m_evmenkin@yahoo.com> Approved by: re@ Notes: svn path=/head/; revision=114883
* Part one of undating the bluetooth code to the newest versionJulian Elischer2003-05-1053-1472/+7187
| | | | | | | | Submitted by: Maksim Yevmenkin <m_evmenkin@yahoo.com> Approved by: re@ Notes: svn path=/head/; revision=114878
* Deprecate machine/limits.h in favor of new sys/limits.h.Alexander Kabaev2003-04-292-3/+2
| | | | | | | | | | Change all in-tree consumers to include <sys/limits.h> Discussed on: standards@ Partially submitted by: Craig Rodrigues <rodrigc@attbi.com> Notes: svn path=/head/; revision=114216
* Add missing braces.Archie Cobbs2003-04-281-1/+2
| | | | | | | Submitted by: Andrew Lankford <arlankfo@141.com> Notes: svn path=/head/; revision=114178
* Remove extraneous reference to intrq.h, which broke the kernel build.Robert Watson2003-04-211-1/+0
| | | | Notes: svn path=/head/; revision=113781
* KASSERT that NG_MKMESSAGE() is not called with mbuf flags.Poul-Henning Kamp2003-04-181-0/+4
| | | | Notes: svn path=/head/; revision=113663
* Introduce an M_ASSERTPKTHDR() macro which performs the very common taskDag-Erling Smørgrav2003-04-083-7/+4
| | | | | | | | | | of asserting that an mbuf has a packet header. Use it instead of hand- rolled versions wherever applicable. Submitted by: Hiten Pandya <hiten@unixdaemons.com> Notes: svn path=/head/; revision=113255
* Don't use ovbcopy().Dag-Erling Smørgrav2003-04-042-2/+2
| | | | Notes: svn path=/head/; revision=113073
* Include correct opt_* headers for supported address families. Dike outJonathan Lemon2003-03-081-10/+5
| | | | | | | | | the unused ATM cases. Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=111997
* Fix a use-after-free bug that could cause multi-link fragment reassembly toArchie Cobbs2003-03-051-2/+4
| | | | | | | | | | fail for a long time (until the incoming sequence numbers wrapped around). Reported by: Matthew Impett <mimpett@Glue.umd.edu> MFC after: 3 days Notes: svn path=/head/; revision=111934
* Finish driving a stake through the heart of netns and the associatedPeter Wemm2003-03-054-9/+0
| | | | | | | | | ifdefs scattered around the place - its dead Jim! The SMB stuff had stolen AF_NS, make it official. Notes: svn path=/head/; revision=111926
* Update netisr handling; Each SWI now registers its queue, and all queueJonathan Lemon2003-03-043-6/+50
| | | | | | | | | | | | | drain routines are done by swi_net, which allows for better queue control at some future point. Packets may also be directly dispatched to a netisr instead of queued, this may be of interest at some installations, but currently defaults to off. Reviewed by: hsu, silby, jayanth, sam Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=111888
* Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp2003-03-031-13/+8
| | | | | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl) Notes: svn path=/head/; revision=111815
* Add two loader tuneables that allow one to change the maximum number ofHartmut Brandt2003-03-021-1/+11
| | | | | | | | | | | | | | | | | | | | | queue items that can be allocated by netgraph and the number of free queue items that are cached on a private list. Netgraph places an upper limit on the number of queue items it may allocate. When there is a large number of netgraph messages travelling through the system (100k/sec and more) there is a high probability, that messages get queued at the nodes and netgraph runs out of queue items. In this case the data flow through netgraph gets blocked. The tuneable for the number of free items lets one trade memory for performance. The tunables are also available as read-only sysctls. PR: kern/47393 Reviewed by: julian Approved by: jake (mentor) Notes: svn path=/head/; revision=111749
* Some more updates for the new world order:Bill Paul2003-02-261-24/+37
| | | | | | | | | | | | | | | | | | | | | | | - Make transmission of packets work again. This stopped working because ether_ifattach() was forcing ifp->if_output to be ether_output() and clobbering our attempt to override this vector with a pointer to ng_fec_output(). Move the overriding of ifp->if_output to after ether_ifattach(). - Abandon the use of the netgraph ng_ether_input_p hook for snagging incoming frames, and instead override the ifp->if_input vector for interfaces that have been aggregated into our bundle. (I would have loved to have written things this way in the first place, but I didn't want to have to be the one to implement the if_input hook and change all the drivers.) This avoids collisions with the ng_ether module, which uses the same hook. Each aggregated device now calls ng_fec_input() directly, which then fakes up the rcvif pointer before invoking ifp->if_input itself. This module should actually work now. Notes: svn path=/head/; revision=111565
* Attempt to make the ng_fec module play nice with BPF again. Things haveBill Paul2003-02-261-16/+6
| | | | | | | | | | | | | | | | | | changed since this code was written: - The ng_ether_input_p hook only accepts two arguments now: the pointer to the ether header structure is gone. - It's no longer necessary to cons up a fake ether header before passing incoming packets to BPF_MTAP(). ng_fec_input() has been modified to account for these two changes. Running tcpdump on fec0 should work now. PR: kern/46720 Notes: svn path=/head/; revision=111537
* Introduce a new taskqueue that runs completely free of Giant, and inScott Long2003-02-263-7/+7
| | | | | | | | | | turns runs its tasks free of Giant too. It is intended that as drivers become locked down, they will move out of the old, Giant-bound taskqueue and into this new one. The old taskqueue has been renamed to taskqueue_swi_giant, and the new one keeps the name taskqueue_swi. Notes: svn path=/head/; revision=111528
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-1933-91/+91
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Take the rc4 code out of ng_mppc module so we don't fail to load whenDoug Ambrisko2003-02-051-0/+5
| | | | | | | | | | we have the rc4 code already in the kernel (via wlan stuff or awi). Add a dependency on the rc4 module so if it doesn't exist then load it. Reviewed by: archie Notes: svn path=/head/; revision=110409
* Catch more uses of MIN().Alfred Perlstein2003-02-021-3/+0
| | | | Notes: svn path=/head/; revision=110234
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-2133-91/+91
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* Bow to the whining masses and change a union back into void *. RetainMatthew Dillon2003-01-131-1/+1
| | | | | | | | removal of unnecessary casts and throw in some minor cleanups to see if anyone complains, just for the hell of it. Notes: svn path=/head/; revision=109153
* Change struct file f_data to un_data, a union of the correct structMatthew Dillon2003-01-121-1/+1
| | | | | | | | | | | | | pointer types, and remove a huge number of casts from code using it. Change struct xfile xf_data to xun_data (ABI is still compatible). If we need to add a #define for f_data and xf_data we can, but I don't think it will be necessary. There are no operational changes in this commit. Notes: svn path=/head/; revision=109123
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,Jens Schweikhardt2003-01-013-5/+5
| | | | | | | especially in troff files. Notes: svn path=/head/; revision=108533
* Make ng_fec.c compile again since Sam's changes.Julian Elischer2002-12-231-5/+8
| | | | | | | Submitted by: Hiten Pandya (hiten@unixdaemons.com) Notes: svn path=/head/; revision=108240
* SMP locking for ifnet list.Jeffrey Hsu2002-12-223-0/+6
| | | | Notes: svn path=/head/; revision=108172
* o Untangle the confusion with the malloc flags {M_WAITOK, M_NOWAIT} andBosko Milekic2002-12-199-15/+15
| | | | | | | | | | | | | the mbuf allocator flags {M_TRYWAIT, M_DONTWAIT}. o Fix a bpf_compat issue where malloc() was defined to just call bpf_alloc() and pass the 'canwait' flag(s) along. It's been changed to call bpf_alloc() but pass the corresponding M_TRYWAIT or M_DONTWAIT flag (and only one of those two). Submitted by: Hiten Pandya <hiten@unixdaemons.com> (hiten->commit_count++) Notes: svn path=/head/; revision=108107
* Fix two bugs:Archie Cobbs2002-12-141-12/+27
| | | | | | | | | | | (a) Save control message return address only if NGM_MPPC_CONFIG_DECOMP (b) Properly count the number of required re-key operations when we loose synchronization and have to resync MFC after: 3 days Notes: svn path=/head/; revision=107845
* fixes for this driver:Julian Elischer2002-11-261-2/+38
| | | | | | | | | | | 1) "ubt" driver did not work when system is booted with the device attached 2) missing "break;" in ubt_rcvmsg() function; Submitted by: Maksim Yevmenkin <Maksim.Yevmenkin@cw.com> Approved by: re (jhb) Notes: svn path=/head/; revision=107287