#
2cc36323 |
| 26-Feb-2009 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
em(4): Adjust RDTR/RADV comment that they should not be used
|
#
17e92400 |
| 26-Feb-2009 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
em(4): Don't configure RADV (default is 0), which is deprecated.
- In 82573 workaround, we still need to configure RADV, since RDTR is used. - Revoke tunable/sysctl node for RADV.
|
#
395a802d |
| 25-Feb-2009 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
em(4): Revoke tunable/sysctl node for RDTR, which is dangerous and deprecated.
|
#
9f60d74b |
| 22-Feb-2009 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
em(4): Reduce TX interrupt rate and device's TX desc write requests
The RS (report status) bit in the TX desc controls whether DD bit should be set by device (via write request) and whether TX inter
em(4): Reduce TX interrupt rate and device's TX desc write requests
The RS (report status) bit in the TX desc controls whether DD bit should be set by device (via write request) and whether TX interrupt should be generated. By setting RS bit in the last TX desc of int_tx_nsegs TX descs, we greatly reduce the TX interrupt rate (from 20000/s to 1200/s for full speed 1472bytes UDP datagrams) and the number of device's TX desc write requests. This also gives me additional +10Kpps on 82573E_IAMT. Add sysctl node for int_tx_nsegs, its default value is 1/16 number of TX descs. The implementation details are commented near struct adapter's related fields.
show more ...
|
#
51e6819f |
| 20-Feb-2009 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
em(4): Avoid allocating a csum offloading TX desc whenever possible.
According to Intel's PCIe GbE Controllers Open Source Software Developer's Manual Revision 1.8: a csum offloading TX desc will pr
em(4): Avoid allocating a csum offloading TX desc whenever possible.
According to Intel's PCIe GbE Controllers Open Source Software Developer's Manual Revision 1.8: a csum offloading TX desc will prevent TX data read requests from being pipelined, thus reduce TX performance. The pipelining effect is not obvious when transmitting bulk data (e.g. 1472 bytes UDP datagram), but it could be dominant when transmitting tiny packets. So we should avoid allocating a csum offloading TX desc whenever possible to take advantage of the pipelining effect.
On 82573E_IAMT, Before this commit: ~700Kpps After this commit: ~990Kpps
The funny thing about this commit is: Old driver code from Intel's FreeBSD driver 6.2.9 roughly did what we are doing in this commit, while Intel's FreeBSD driver 6.9.6 simply follows Linux's way to flush the performance to the toilet ...
show more ...
|
#
002b3a05 |
| 16-Feb-2009 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
em(4): On TX path, make sure that ether header and ip.ip_hl are contiguous.
This must be done mainly because if hardware TX csum offloading is enabled, setting up context TX descriptor will need to
em(4): On TX path, make sure that ether header and ip.ip_hl are contiguous.
This must be done mainly because if hardware TX csum offloading is enabled, setting up context TX descriptor will need to access ip.ip_hl.
show more ...
|
#
9c80d176 |
| 15-Feb-2009 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
em(4): Sync with Intel's em-6.9.6(FreeBSD)
In addition to adding support for some chips (e.g. 82574L), this also gives me the chance to rearrange and clean up if_em.[ch] :)
Noticable changes to the
em(4): Sync with Intel's em-6.9.6(FreeBSD)
In addition to adding support for some chips (e.g. 82574L), this also gives me the chance to rearrange and clean up if_em.[ch] :)
Noticable changes to the FreeBSD driver: - The hardware abstraction layer is put into a seperate module (ig_hal) - IP csum offloading is supported when hardware TX csum offloading is enabled - mbufs on RX/TX ring are freed in em_stop(), i.e. during "ifconfig emX down" - TX pattern is adjusted that we test number of avaiable TX descs before dequeuing mbuf from ifq. We also reserve double spare TX descs for 82544 cards on PCI-X bus, so we will not need to unload the loaded mbuf in the mid way due to short of TX descs; this at least makes the logic a little bit simpler.
show more ...
|
#
cd8b12e0 |
| 22-Jul-2008 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
Don't let PROMISC interfere hardware vlan tagging operation. Enable hardware vlan tagging after this change.
|
#
87307ba1 |
| 23-Dec-2006 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
Sync with Intel's em-6.2.9 - Support more chips. - Implement suspend/resume device methods. - Correct promisc mode support. - Code and comment clean up. - Avoid reinitializing the hardware if only IP
Sync with Intel's em-6.2.9 - Support more chips. - Implement suspend/resume device methods. - Correct promisc mode support. - Code and comment clean up. - Avoid reinitializing the hardware if only IP address is changed. This is implemented in a different way from Intel's: If IFF_RUNNING is set, em_init() will return immediately. So for some situation in which em_init() must run, IFF_RUNNING is cleared before calling em_init(). - Rework TX processing: In em_encap(), save the index of the packet's last TX descriptor (EOP) in the packet's first descriptor. In em_txeof(), test E1000_TXD_STAT_DD bit only for last TX descriptor (EOP) of certain packet. If it is set, then reap the TX descriptors of the packet in an inner loop. "This change is important for future chips, where DD bit is going to be set only on the EOP descriptors." -- Jack Vogel at Intel
show more ...
|
#
e3869ec7 |
| 22-Dec-2006 |
Sascha Wildner <swildner@dragonflybsd.org> |
Rename printf -> kprintf in sys/ and add some defines where necessary (files which are used in userland, too).
|
#
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 ...
|
#
1eca7b82 |
| 12-Aug-2006 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
Sync with Intel's em(4) driver version 6.1.4 - Add support for new chipset revisions embedded in the ESB2 and ICH8 core logic chipsets. - Add PCI id for the PCIe quad port copper adapter. [*] - Imp
Sync with Intel's em(4) driver version 6.1.4 - Add support for new chipset revisions embedded in the ESB2 and ICH8 core logic chipsets. - Add PCI id for the PCIe quad port copper adapter. [*] - Improve media support for fiber adapters. [*] - Instead of creating TX DMA map in em_encap(), create all of the during em_init(). Fix a bug in Intel's code: The TX desc used to hold mbuf, does not necessarily have the DMA map that is used to load the mbuf, so in em_clean_transmit_interrupts() or during em_stop(), wrong DMA map may be used. - Update README
Bug fixes: - Properly serialize em_shutdown() - (BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD) -> BUS_DMASYNC_PREWRITE - Correct polling(4) support: disable interrupt if polling(4) is enabled.
Tested with an 82540EM.
# I have committed a slightly different version(6.1.4) than the version(6.0.5) # posted to submit@, since 6.1.4 came immediately after my submission for # testing/reviewing, and the difference between it and the submitted version # is really very small (only added [*] part).
show more ...
|
#
a8d45119 |
| 25-Jun-2006 |
Simon Schubert <corecode@dragonflybsd.org> |
Remove OLDBRIDGE
|
#
07855a48 |
| 10-Dec-2005 |
Matthew Dillon <dillon@dragonflybsd.org> |
Add KTR logging for IF_EM to measure interrupt overhead and packet receive / transmit / transmit-cleanup operations.
|
#
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 ...
|
#
7ea52455 |
| 08-Nov-2005 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
Sync with Intel's em(4) driver version 3.2.15 - Add support for 82571EB, 82572EI and 82573E adapters - Nuke DBG_STATS related code and struct adapter's fields - Flow control water marks are now calcu
Sync with Intel's em(4) driver version 3.2.15 - Add support for 82571EB, 82572EI and 82573E adapters - Nuke DBG_STATS related code and struct adapter's fields - Flow control water marks are now calculated from hardware's register value instead of using hardwired values(FC_DEFAULT_{LOW, HIGH}_THRESH) - Flow control pause time is bumped to 512us (old value is 131us) (*) - In em_detach(), call bus_teardown_intr() if adapter.int_handler_tag != NULL - Update Intel's LICENSE and README - Update README to reflect recent changes to device polling - Minor style changes
(*) Original code misuses 0x1000 (should be 1000) as em_hw.fc_pause_time
show more ...
|
#
eac00e59 |
| 17-Oct-2005 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
Sync with FreeBSD dev/em
if_em.c rev 1.2.2.{20,21,22} 1.47 1.63 if_em.h rev 1.1.2.17 if_em_hw.c rev 1.1.2.12 if_em_hw.h rev 1.1.2.12
- Add support for Intel PRO/1000 GT Desktop Adapter - Add supp
Sync with FreeBSD dev/em
if_em.c rev 1.2.2.{20,21,22} 1.47 1.63 if_em.h rev 1.1.2.17 if_em_hw.c rev 1.1.2.12 if_em_hw.h rev 1.1.2.12
- Add support for Intel PRO/1000 GT Desktop Adapter - Add support for Intel 82546GB dual port PCIE adapter - Add fix for 82547 which corrects an issue with Jumbo frames larger than 10k - Add fix for vlan tagged frames not being properly bridged - Correct TBI workaround - Correct LED operation issues - Do not count RNBC (internal buffer full) towards the RX error count, since it's not really an error - Correct a workaround that should only be applied to one adapter. Workaround was causing device hangs when incorrectly applied to other adapters (*) - Run em_local_timer() once per second instead of running it once per 2 seconds. This makes gathering of stats more precise
(*) Detailed problem description is in FreeBSD's PR kern/66634
show more ...
|
#
9c095379 |
| 25-May-2005 |
Matthew Dillon <dillon@dragonflybsd.org> |
Rewrite the polling code. Instead of trying to do fancy polling enablement from inside the IF interrupt itself, which creates a headache in the code, simply allow IFF_POLLING to be set and cleared v
Rewrite the polling code. Instead of trying to do fancy polling enablement from inside the IF interrupt itself, which creates a headache in the code, simply allow IFF_POLLING to be set and cleared via ifconfig. This greatly simplifies both the networking code and the polling code and allows polling to be enabled and disabled at will on a per-network-interface basis.
* Drivers no longer have to have polling checks in the interrupt path. * An if_poll function vector has been added. Polling is supported if the driver initializes the vector. * Registration command added to the poll function command list. * Driver code for registration and deregistration is now greatly simplified.
The kernel polling code no longer randomly turns off the polling bit if an interface goes down or is reset.
Remove IFCAP_POLLING, it serves no purpose.
Fix a couple of bugs in the serializer code. Add a warning in nexus_setup_intr if a driver tries to specify a serializer and an SPL. A driver can specify one or the other, not both.
Convert the EM driver to use the new serializer API instead of SPLs.
Add ifconfig poll and ifconfig -poll support to ifconfig, and fix bugs in the rtsock code that only returned the low 16 bits of the interface flags so ifconfig properly reports when polling mode is turned on for an interface.
NOTE to people using polling. You must first enable polling via kern.polling.enable, and then may specify the 'poll' directive in ifconfig to enable it on a per interface basis. If IFF_POLLING refuses to be set, the device does not support polling.
show more ...
|
#
e9cb6d99 |
| 24-May-2005 |
Matthew Dillon <dillon@dragonflybsd.org> |
Get rid of bus_{disable,enable}_intr(), it wasn't generic enough for our needs.
Implement some generic atomic.h functions to aid in the implementation of a low level mutex.
Implement a generic low
Get rid of bus_{disable,enable}_intr(), it wasn't generic enough for our needs.
Implement some generic atomic.h functions to aid in the implementation of a low level mutex.
Implement a generic low level sleep-mutex serializer, kern/lwkt_serialize.c. The serializer is designed to be a replacement for SPL calls but may also be used for other very low level work (e.g. lockmgr interlocks).
Add a serializer argument to BUS_SETUP_INTR(). When non-NULL, the interrupt handler will no longer be protected by an SPL so e.g. spl*() will no longer protect against that device's interrupts.
The IF queueing and dequeueing mechanisms may no longer depend on outside SPL state because network driver interrupt handlers are no longer required to enter splnet(). Use critical sections for the moment. The IFQ and IFF_OACTIVE interactions are not yet MP safe.
show more ...
|
#
d0870c72 |
| 22-Nov-2004 |
Matthew Dillon <dillon@dragonflybsd.org> |
Add support for adjusting the interrupt throttling rate via hw.emX.int_throttle_ceil, and change the default from 8000hz to 10000hz to improve throughput with default TCP window sizes through a GiGE
Add support for adjusting the interrupt throttling rate via hw.emX.int_throttle_ceil, and change the default from 8000hz to 10000hz to improve throughput with default TCP window sizes through a GiGE switch in a LAN environment.
Note the following test results using iperf between two machines:
* Shuttle Athlon 64 3200+ box, EM card in 32 bit PCI slot * 2 machines connected through a GiGE switch * All other hw.em0 delays set to 0 on both sides * throttle settings set on both sides * -w option set on iperf client AND server for 63.5KB window * software interrupt throttling has been turned off for these tests
throttle result result freq (32.5KB win) (63.5KB win) (default) -------- -------------- -----------
maxrate 481 MBit/s 533 MBit/s (not sure what's going on here) 120000 518 MBit/s 558 MBit/s (not sure what's going on here) 100000 613 MBit/s 667 MBit/s (not sure what's going on here) 70000 679 MBit/s 691 MBit/s 60000 668 MBit/s 694 MBit/s 50000 678 MBit/s 684 MBit/s 40000 694 MBit/s 696 MBit/s 30000 694 MBit/s 696 MBit/s 20000 698 MBit/s 703 MBit/s 10000 707 MBit/s 716 MBit/s 9000 708 MBit/s 716 MBit/s 8000 710 MBit/s 717 MBit/s <--- drop off pt 32.5KB win 7000 683 MBit/s 716 MBit/s 6000 680 MBit/s 720 MBit/s 5000 652 MBit/s 718 MBit/s <--- drop off pt 63.5KB win 4000 555 Mbit/s 695 MBit/s 3000 522 MBit/s 533 MBit/s <--- GiGE throttling likely 2000 449 MBit/s 384 MBit/s (256 ring descriptors = 1000 260 MBit/s 193 MBit/s 2500 hz minimum)
show more ...
|
#
af82d4bb |
| 04-Jun-2004 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
Continue cleaning em(4).
Merge PCI resource allocation / deallocation into em_attach and em_detach. Change the order of allocations in em_attach to work without splimp() protection. Remove adapter->
Continue cleaning em(4).
Merge PCI resource allocation / deallocation into em_attach and em_detach. Change the order of allocations in em_attach to work without splimp() protection. Remove adapter->unit, adapter->next and adapter->prev. Use em_detach for the error handling in em_attach as well. Move the reset of if_timer into em_stop. Use adapter->hw.mac_addr instead of arpcom's entry.
show more ...
|
#
9ccd8c1f |
| 10-May-2004 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
Sync em(4) with FreeBSD current. Most important is the initial bus DMA support. Also use callout directly and not timeout.
|
#
d8edf95f |
| 16-Apr-2004 |
Matthew Dillon <dillon@dragonflybsd.org> |
Change WAIT_FOR_AUTO_NEG_DEFAULT to 0. Do not wait for auto-negotiation to complete before continuing. if_em can take over two seconds to autoneg, and it renegotiates virtually every time the inter
Change WAIT_FOR_AUTO_NEG_DEFAULT to 0. Do not wait for auto-negotiation to complete before continuing. if_em can take over two seconds to autoneg, and it renegotiates virtually every time the interface is manipulated. For example, running dhclient will cause if_em to renegotiate 3 times in a row.
Note that even when we were waiting for autoneg, the interface would not always be completely up after the autoneg completed. This is possibly due to the watchdog timer (which is on a 2 second interval). In fact, on my test box this is what was tickling the recently fixed DNS bug (timing out on part of the dns search path) and subsequent NFS mount failures.
show more ...
|
#
0d366ee7 |
| 17-Mar-2004 |
Matthew Dillon <dillon@dragonflybsd.org> |
Update the 825xx GigE support. Add a large number of new device id's and support for the 82541 (e.g. Intel PRO/1000 MT DESKTOP ADAPTER) and 82544. Also add sysctl support for various interrupt relat
Update the 825xx GigE support. Add a large number of new device id's and support for the 82541 (e.g. Intel PRO/1000 MT DESKTOP ADAPTER) and 82544. Also add sysctl support for various interrupt related delay parameters, and add workarounds for chip issues.
In-Discussion-With: "Peter Avalos" <pavalos@theshell.com> Submitted-by: Hiten Pandya <hmp@backplane.com> Adapted-from: FreeBSD-5
show more ...
|
#
1f2de5d4 |
| 07-Aug-2003 |
Matthew Dillon <dillon@dragonflybsd.org> |
kernel tree reorganization stage 1: Major cvs repository work (not logged as commits) plus a major reworking of the #include's to accomodate the relocations.
* CVS repository files manually move
kernel tree reorganization stage 1: Major cvs repository work (not logged as commits) plus a major reworking of the #include's to accomodate the relocations.
* CVS repository files manually moved. Old directories left intact and empty (temporary).
* Reorganize all filesystems into vfs/, most devices into dev/, sub-divide devices by function.
* Begin to move device-specific architecture files to the device subdirs rather then throwing them all into, e.g. i386/include
* Reorganize files related to system busses, placing the related code in a new bus/ directory. Also move cam to bus/cam though this may not have been the best idea in retrospect.
* Reorganize emulation code and place it in a new emulation/ directory.
* Remove the -I- compiler option in order to allow #include file localization, rename all config generated X.h files to use_X.h to clean up the conflicts.
* Remove /usr/src/include (or /usr/include) dependancies during the kernel build, beyond what is normally needed to compile helper programs.
* Make config create 'machine' softlinks for architecture specific directories outside of the standard <arch>/include.
* Bump the config rev.
WARNING! after this commit /usr/include and /usr/src/sys/compile/* should be regenerated from scratch.
show more ...
|