summaryrefslogtreecommitdiffstats
path: root/sys/net/netisr.h
Commit message (Collapse)AuthorAgeFilesLines
* Slight whitespace cleanup. Whitespace sync to MAC tree.rwatson2002-07-271-2/+2
|
* Remove __P.alfred2002-03-191-5/+5
|
* Device Polling code for -current.luigi2001-12-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Non-SMP, i386-only, no polling in the idle loop at the moment. To use this code you must compile a kernel with options DEVICE_POLLING and at runtime enable polling with sysctl kern.polling.enable=1 The percentage of CPU reserved to userland can be set with sysctl kern.polling.user_frac=NN (default is 50) while the remainder is used by polling device drivers and netisr's. These are the only two variables that you should need to touch. There are a few more parameters in kern.polling but the default values are adequate for all purposes. See the code in kern_poll.c for more details on them. Polling in the idle loop will be implemented shortly by introducing a kernel thread which does the job. Until then, the amount of CPU dedicated to polling will never exceed (100-user_frac). The equivalent (actually, better) code for -stable is at http://info.iet.unipi.it/~luigi/polling/ and also supports polling in the idle loop. NOTE to Alpha developers: There is really nothing in this code that is i386-specific. If you move the 2 lines supporting the new option from sys/conf/{files,options}.i386 to sys/conf/{files,options} I am pretty sure that this should work on the Alpha as well, just that I do not have a suitable test box to try it. If someone feels like trying it, I would appreciate it. NOTE to other developers: sure some things could be done better, and as always I am open to constructive criticism, which a few of you have already given and I greatly appreciated. However, before proposing radical architectural changes, please take some time to possibly try out this code, or at the very least read the comments in kern_poll.c, especially re. the reason why I am using a soft netisr and cannot (I believe) replace it with a simple timeout. Quick description of files touched by this commit: sys/conf/files.i386 new file kern/kern_poll.c sys/conf/options.i386 new option sys/i386/i386/trap.c poll in trap (disabled by default) sys/kern/kern_clock.c initialization and hardclock hooks. sys/kern/kern_intr.c minor swi_net changes sys/kern/kern_poll.c the bulk of the code. sys/net/if.h new flag sys/net/if_var.h declaration for functions used in device drivers. sys/net/netisr.h NETISR_POLL sys/dev/fxp/if_fxp.c sys/dev/fxp/if_fxpvar.h sys/pci/if_dc.c sys/pci/if_dcreg.h sys/pci/if_sis.c sys/pci/if_sisreg.h device driver modifications
* Remove the last of the MD netisr code. It is now all MI. Removejake2000-12-051-1/+5
| | | | | | | | spending, which was unused now that all software interrupts have their own thread. Make the legacy schednetisr use an atomic op for setting bits in the netisr mask. Reviewed by: jhb
* - Overhaul the software interrupt code to use interrupt threads for eachjhb2000-10-251-1/+3
| | | | | | | | | | | | | | | | | | | type of software interrupt. Roughly, what used to be a bit in spending now maps to a swi thread. Each thread can have multiple handlers, just like a hardware interrupt thread. - Instead of using a bitmask of pending interrupts, we schedule the specific software interrupt thread to run, so spending, NSWI, and the shandlers array are no longer needed. We can now have an arbitrary number of software interrupt threads. When you register a software interrupt thread via sinthand_add(), you get back a struct intrhand that you pass to sched_swi() when you wish to schedule your swi thread to run. - Convert the name of 'struct intrec' to 'struct intrhand' as it is a bit more intuitive. Also, prefix all the members of struct intrhand with 'ih_'. - Make swi_net() a MI function since there is now no point in it being MD. Submitted by: cp
* Do some cleanups of the HARP atm codes interface into the system:phk2000-10-121-0/+1
| | | | | | | | Define the NETISR just like all the other NETISRs. unifdef -Usun -D__FreeBSD__ we will probably never support sun4c and if we do we can't use the solaris code anyway and I doubt anybody will be running Fore ATM cards in then in the first place.
* Clean up some loose ends in the network code, including the X.25 and ISOpeter2000-02-131-18/+3
| | | | | | | #ifdefs. Clean out unused netisr's and leftover netisr linker set gunk. Tested on x86 and alpha, including world. Approved by: jkh
* Attempt to fix a problem with receiving packets on USB ethernet interfaces.wpaul2000-01-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Packets are received inside USB bulk transfer callbacks, which run at splusb() (actually splbio()). The packet input queues are meant to be manipulated at splimp(). However the locking apparently breaks down under certain circumstances and the input queues can get trampled. There's a similar problem with if_ppp, which is driven by hardware/tty interrupts from the serial driver, but which must also manipulate the packet input queues at splimp(). The fix there is to use a netisr, and that's the fix I used here. (I can hear you groaning back there. Hush up.) The usb_ethersubr module maintains a single queue of its own. When a packet is received in the USB callback routine, it's placed on this queue with usb_ether_input(). This routine also schedules a soft net interrupt with schednetisr(). The ISR routine then runs later, at splnet, outside of the USB callback/interrupt context, and passes the packet to ether_input(), hopefully in a safe manner. The reason this is implemented as a separate module is that there are a limited number of NETISRs that we can use, and snarfing one up for each driver that needs it is wasteful (there will be three once I get the CATC driver done). It also reduces code duplication to a certain small extent. Unfortunately, it also needs to be linked in with the usb.ko module in order for the USB ethernet drivers to share it. Also removed some uneeded includes from if_aue.c and if_kue.c Fix suggested by: peter Not rejected as a hairbrained idea by: n_hibma
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-1/+1
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* KAME related header files additions and merges.shin1999-11-051-2/+3
| | | | | | | (only those which don't affect c source files so much) Reviewed by: cvs-committers Obtained from: KAME project
* Whistle's Netgraph link-layer (sometimes more) networking infrastructure.julian1999-10-211-0/+1
| | | | | | | | | | Been in production for 3 years now. Gives Instant Frame relay to if_sr and if_ar drivers, and PPPOE support soon. See: ftp://ftp.whistle.com/pub/archie/netgraph/index.html for on-line manual pages. Reviewed by: Doug Rabson (dfr@freebsd.org) Obtained from: Whistle CVS tree
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Make NETISR_SET use a SYSINIT() rather than a linker set.peter1999-04-261-5/+5
|
* Fixed pedantic syntax errors caused by a trailing semicolon in a macrobde1998-06-071-2/+2
| | | | definition.
* Fixed gratuitous ANSIisms.bde1997-09-161-2/+2
|
* merge ATM driverkjc1997-05-091-1/+2
|
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Obtained from: netatalk distribution netatalk@itd.umich.edujulian1996-05-241-1/+2
| | | | | | | Kernel Appletalk protocol support both CAP and netatalk can make use of this.. still needs some owrk but it seemd the right tiime to commit it so other can experiment.
* Add a simplistic netisr register routine - I need this now for ppp-2.2.peter1995-10-311-1/+4
|
* Reviewed by: julian and jhay@mikom.csir.co.zajulian1995-10-261-1/+2
| | | | | | | | | | | | | | | | | | | | | Submitted by: Mike Mitchell, supervisor@alb.asctmd.com This is a bulk mport of Mike's IPX/SPX protocol stacks and all the related gunf that goes with it.. it is not guaranteed to work 100% correctly at this time but as we had several people trying to work on it I figured it would be better to get it checked in so they could all get teh same thing to work on.. Mikes been using it for a year or so but on 2.0 more changes and stuff will be merged in from other developers now that this is in. Mike Mitchell, Network Engineer AMTECH Systems Corporation, Technology and Manufacturing 8600 Jefferson Street, Albuquerque, New Mexico 87113 (505) 856-8000 supervisor@alb.asctmd.com
* Make networking domains drop-ins, through the magic of GNU ld. (Some day,wollman1995-05-111-2/+14
| | | | | | there may even be LKMs.) Also, change the internal name of `unixdomain' to `localdomain' since AF_LOCAL is now the preferred name of this family. Declare netisr correctly and in the right place.
* Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de>se1995-01-051-1/+2
| | | | | | Reviewed by: <wollman> First hooks and defines for the ISDN driver, that soon will see the light ...
* Make idempotent.paul1994-08-211-1/+6
| | | | Submitted by: Paul
* Added $Id$dg1994-08-021-0/+1
|
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-251-20/+1
| | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+87
OpenPOWER on IntegriCloud