#
ac72fc11 |
| 03-Aug-2008 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
Add serializer assertion in all NIC driver interfaces.
|
#
297c8124 |
| 27-Jul-2008 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
Switch to ETHER_INPUT2 on ethernet input path by default: - Nuke old ether_input_chain and ether_demux_chain - Nuke old vlan_input - Nuke ETHER_INPUT2 kernel option - Adjust comment about functions o
Switch to ETHER_INPUT2 on ethernet input path by default: - Nuke old ether_input_chain and ether_demux_chain - Nuke old vlan_input - Nuke ETHER_INPUT2 kernel option - Adjust comment about functions on old ether input path - Adjust NIC drivers which aware ETHER_INPUT2
vlan(4): Clearing of ifnet.if_vlantrunks is now protected in the following way trunks = ifp->if_vlantrunks; ifp->if_vlantrunks = NULL; netmsg_service_sync(); kfree(trunks); Users of ifnet.if_vlantrunks have already been adjusted to aware of this.
bridge(4): Clearing of ifnet.if_bridge is now protected in the following way ifp->if_bridge = NULL; netmsg_service_sync(); Users of ifnet.if_bridge have already been adjusted to aware of this.
carp(4): Remove the LK_NOWAIT lockmgr lock flags; using LK_NOWAIT was actually a workaround for that lockmgr lock was used in NIC's interrupt routine (i.e. old ether_input) Dragonfly-bug: <http://bugs.dragonflybsd.org/issue957>
ipflow: - Now per-cpu ipflow hash table installs its own ipflow entry instead of having ipflow entry duplicated onto each cpu - Remove the serializer parameter to ipflow_fastforward() - Comment out ipflow_fastforward() in ef(4) and ppp(4), they need to be changed to fit the current ipflow cpu localization model
show more ...
|
#
334b9734 |
| 27-Jun-2008 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
fxp_stop needs to be serialized
|
#
21f7a7d1 |
| 25-Jun-2008 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
Make fxp(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2
|
#
883c716a |
| 15-Jun-2008 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
- Add FXP_USABLE_TXCB, which equals (FXP_NTXCB - 1) - Turn off IFF_OACTIVE if queued TCBs is less than FXP_USABLE_TXCB - Call if_devstart() in fxp_tick(), if ifnet.if_snd is not empty - Remove unnece
- Add FXP_USABLE_TXCB, which equals (FXP_NTXCB - 1) - Turn off IFF_OACTIVE if queued TCBs is less than FXP_USABLE_TXCB - Call if_devstart() in fxp_tick(), if ifnet.if_snd is not empty - Remove unnecessary comment about ifnet.if_timer in fxp_init()
show more ...
|
#
be2f29ea |
| 25-May-2008 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
- Count and defrag mbuf before setup TX desc - Drop excessively fragmented packets - Set ifnet.if_timer, if TX desc has been setup - Reset ifnet.if_timer, only if there are no pending TX descs - Add
- Count and defrag mbuf before setup TX desc - Drop excessively fragmented packets - Set ifnet.if_timer, if TX desc has been setup - Reset ifnet.if_timer, only if there are no pending TX descs - Add IFF_OACTIVE and ifnet.if_timer related processing in fxp_tick(), which performs TXEOF operation - Add XXX comment about a possible missing ifnet.if_timer setting in fxp_init()
show more ...
|
#
9db4b353 |
| 14-May-2008 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
Reduce ifnet.if_serializer contention on output path: - Push ifnet.if_serializer holding down into each ifnet.if_output implementation - Add a serializer into ifaltq, which is used to protect send qu
Reduce ifnet.if_serializer contention on output path: - Push ifnet.if_serializer holding down into each ifnet.if_output implementation - Add a serializer into ifaltq, which is used to protect send queue instead of its parent's if_serializer. This change has following implication: o On output path, enqueueing packets and calling ifnet.if_start are decoupled o In device drivers, poll->dev_encap_ok->dequeue operation sequence is no longer safe, instead dequeue->dev_encap_fail->prepend should be used This serializer will be held by using lwkt_serialize_adaptive_enter() - Add altq_started field into ifaltq, which is used to interlock the calling of its parent's if_start, to reduce ifnet.if_serializer contention. if_devstart(), a helper function which utilizes ifaltq.altq_started, is added to reduce code duplication in ethernet device drivers. - Add if_cpuid into ifnet. This field indicates on which CPU device driver's interrupt will happen. - Add ifq_dispatch(). This function will try to hold ifnet.if_serializer in order to call ifnet.if_start. If this attempt fails, this function will schedule ifnet.if_start to be called on CPU located by ifnet.if_start_cpuid if_start_nmsg, which is per-CPU netmsg, is added to ifnet to facilitate ifnet.if_start scheduling. ifq_dispatch() is called by ether_output_frame() currently - Use ifq_classic_ functions, if altq is not enabled - Fix various device drivers bugs in their if_start implementation - Add ktr for ifq classic enqueue and dequeue - Add ktr for ifnet.if_start
show more ...
|
#
10d1b534 |
| 15-Sep-2007 |
Sascha Wildner <swildner@dragonflybsd.org> |
Fix 'type qualifiers ignored on function return type' warnings.
|
#
149fe16d |
| 30-Mar-2007 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
Add support for 82562GX
Obtained-from: FreeBSD (remko@freebsd.org)
|
#
6378a54d |
| 24-Dec-2006 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
Add more chip id for fxp(4)
Obtained-from: FreeBSD
|
#
1f7ab7c9 |
| 25-Oct-2006 |
Matthew Dillon <dillon@dragonflybsd.org> |
Do a major clean-up of the BUSDMA architecture. A large number of essentially machine-independant drivers use the structures and definitions in machine-dependant directories that are really machine-
Do a major clean-up of the BUSDMA architecture. A large number of essentially machine-independant drivers use the structures and definitions in machine-dependant directories that are really machine-independant in nature.
Split <machine/bus_dma.h> into machine-depdendant and machine-independant parts and make the primary access run through <sys/bus_dma.h>.
Remove <machine/bus.h>, <machine/bus_memio.h> and <machine/bus_pio.h>. The optimizations related to bus_memio.h and bus_pio.h made a huge mess, introduced machine-specific knowledge into essentially machine-independant drivers, and required specific #include file orderings to do their job. They may be reintroduced in some other form later on.
Move <machine/resource.h> to <sys/bus_resource.h>. The contents of the file is machine-independant or can be made a superset across many platforms.
Make <sys/bus.h> include <sys/bus_dma.h> and <sys/bus_resource.h> and include <sys/bus.h> where necessary. Remove all #include's of <machine/resource.h> and <machine/bus.h>. That is, make the BUSDMA infrastructure integral to I/O-mapped and memory-mapped accesses to devices and remove a large chunk of machine-specific dependancies from drivers. bus_if.h and device_if.h are now required to be present when using <sys/bus.h>.
show more ...
|
#
8cae915b |
| 23-Sep-2006 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
Whitespace adjustment.
Add two device ids: - Intel Pro/100 VE Network Connection card - NIC found on ICH7 based systems
Submitted-by: Rauf Kuliyev <rauf@kuliyev.com> Obtained-from: FreeBSD
|
#
77652cad |
| 05-Sep-2006 |
Matthew Dillon <dillon@dragonflybsd.org> |
Rename malloc->kmalloc, free->kfree, and realloc->krealloc. Pass 2
|
#
efda3bd0 |
| 05-Sep-2006 |
Matthew Dillon <dillon@dragonflybsd.org> |
Rename malloc->kmalloc, free->kfree, and realloc->krealloc. Pass 1
|
#
7b9f668c |
| 06-Aug-2006 |
Sascha Wildner <swildner@dragonflybsd.org> |
Perform the following cleanup in sys/dev/netif:
* Ansify function definitions.
* Remove (void) casts for discarded return values.
* Remove register keywords.
* Move types and names in function de
Perform the following cleanup in sys/dev/netif:
* Ansify function definitions.
* Remove (void) casts for discarded return values.
* Remove register keywords.
* Move types and names in function definitions on separate lines.
In-collaboration-with: Alexey Slynko <slynko@tronet.ru> Reviewed-by: sephe
show more ...
|
#
cdf89432 |
| 31-Dec-2005 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
{ether,ieee80211}_ifdetach() can't be called with serializer being held, since they will go through code which tries to hold serializer again, e.g. ether_ifdetach() -> if_detach() -> in_control()
So
{ether,ieee80211}_ifdetach() can't be called with serializer being held, since they will go through code which tries to hold serializer again, e.g. ether_ifdetach() -> if_detach() -> in_control()
So in various NICs' xxx_detach(): - Move bus_teardown_intr() under "(device_is_attached())", whenever it is applicable. Since it is not possible that intrhandle is NULL here, nuke original "(intrhandle != NULL)". This can: 1) Avoid holding serializer, if xxx_attach() fails 2) Release serializer ASAP 3) Ease following tasks - Hold serializer only for xxx_stop()(or similar functions which stops NIC) and bus_teardown_intr() - Call {ether,ieee80211}_ifdetach() after serializer is released
Other stuffs: - Serialize xxx_detach() for awi(4), ep(4), sn(4) and xe(4) - Release serializer before returning from {ed_pccard,ray}_detach() - Make ipw(4)'s ipw_detach() suitable for error handling, adjust ipw_attach() accordingly - Fix a bug in ex_pccard_detach(): instead of if_detach(), ether_ifdetach() should be used here - For ndis(4), "ifp->serializer" ==> "ifp->if_serializer" Reported-by: esmith <esmith@postmark.net>
Discussed-with: dillon and joerg Partially-Reviewed-by: dillon and joerg Reported-by: Steve Mynott <steve.mynott@gmail.com> and me
show more ...
|
#
71fdcbe1 |
| 28-Dec-2005 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
In fxp_detach(), disable interrupts after fxp_stop(), since software resetting in fxp_stop() may leave interrupts turned on (*).
(*) My "Intel 82559 Pro/100 Ethernet" always does this
|
#
654dbb2a |
| 17-Dec-2005 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
1) Add support for NIC found in Sony FS570 laptops 2) Add support for NIC found in Sony Vaio VGN-TX1XP laptops
Obtained-from: FreeBSD dev/fxp/if_fxp.c rev 1.226, 1.252
# 1) was submitted to FreeBSD
1) Add support for NIC found in Sony FS570 laptops 2) Add support for NIC found in Sony Vaio VGN-TX1XP laptops
Obtained-from: FreeBSD dev/fxp/if_fxp.c rev 1.226, 1.252
# 1) was submitted to FreeBSD by: # Gavin Atkinson <gavin.atkinson at ury.york.ac.uk>
# 2) was submitted to FreeBSD by: # Thomas Hurst <tom at hur.st>
show more ...
|
#
78195a76 |
| 28-Nov-2005 |
Matthew Dillon <dillon@dragonflybsd.org> |
Make all network interrupt service routines MPSAFE part 1/3.
Replace the critical section that was previously used to serialize access with the LWKT serializer. Integrate the serializer into the IF
Make all network interrupt service routines MPSAFE part 1/3.
Replace the critical section that was previously used to serialize access with the LWKT serializer. Integrate the serializer into the IFNET structure. Note that kern.intr_mpsafe must be set to 1 for network interrupts to actually run MPSAFE. Also note that any interrupts shared with othre non-MP drivers will cause all drivers on that interrupt to run with the Big Giant Lock.
Network interrupt - Each network driver then simply passes that serializer to bus_setup_intr() so only a single serializer is required to process the entire interrupt path. LWKT serialization support is already 100% integrated into the interrupt subsystem so it will already be held as of when the registered interrupt procedure is called.
Ioctl and if_* functions - All callers of if_* functions (such as if_start, if_ioctl, etc) now obtain the IFNET serializer before making the call. Thus all of these entry points into the driver will now be serialized.
if_input - All code that calls if_input now ensures that the serializer is held. It will either already be held (when called from a driver), or the serializer will be wrapped around the call. When packets are forwarded or bridged between interfaces, the target interface serializer will be dropped temporarily to avoid a deadlock.
Device Driver access - dev_* entry points into certain pseudo-network devices now obtain and release the serializer. This had to be done on a device-by-device basis (but there are only a few such devices).
Thanks to several people for helping test the patch, in particular Sepherosa Ziehau.
show more ...
|
#
d2c71fa0 |
| 22-Nov-2005 |
Matthew Dillon <dillon@dragonflybsd.org> |
Fix the design of ifq_dequeue/altq_dequeue by adding an mbuf pointer and requiring that a polled mbuf be passed as an argument to the dequeue function. Assert that the passed argument matches the mb
Fix the design of ifq_dequeue/altq_dequeue by adding an mbuf pointer and requiring that a polled mbuf be passed as an argument to the dequeue function. Assert that the passed argument matches the mbuf that is actually dequeued. Also remove assignments of the return value from ifq_dequeue() in such cases which implied that the mbuf might be different when, in fact, it had better not be.
show more ...
|
#
2b71c8f1 |
| 24-Oct-2005 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
- Move DEVICE_POLLING from opt_global.h to opt_polling.h(newly added), so that polling(4) can be enabled in modules that are not built during kernel building - Add opt_polling.h to files that dep
- Move DEVICE_POLLING from opt_global.h to opt_polling.h(newly added), so that polling(4) can be enabled in modules that are not built during kernel building - Add opt_polling.h to files that depend on DEVICE_POLLING - Change related netif modules' Makefile to enable polling(4) support - Add comment in net/if_var.h to prevent DEVICE_POLLING related incompatibilities from being introduced Suggested-by: dillon
NOTE: As of this commit, any file that will depend on DEVICE_POLLING *must* include opt_polling.h at its beginning
With-helps-from: joerg Reviewed-by: dillon, submit@
show more ...
|
#
ee61f228 |
| 12-Oct-2005 |
Matthew Dillon <dillon@dragonflybsd.org> |
Remove the INTR_TYPE_* flags. The interrupt type is no longer used to figure out which spl*() set an interrupt belongs to, because, well, spl's no longer exist.
|
#
a3e0c8f8 |
| 15-Jun-2005 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
Missing ether_ifdetach in error path.
Noticed-by: Sepherosa Ziehau <sepherosa@gmail.com>
|
#
37103068 |
| 14-Jun-2005 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
- convert to critical sections - hook up bus_setup_intr last
|
#
32761bf2 |
| 31-May-2005 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
No need to bzero softc.
|