364879 |
27-Aug-2020 |
vmaffione |
MFC r363995
em(4): honor vlanhwtag offload
The FreeBSD em driver fails to properly reset the VME flag in the e1000 CTRL register oneg the following ifconfig command
ifconfig em1 -vlanhwtag
Tested on the e1000 device emulated by QEMU, and on a real NIC (chip=0x10d38086).
PR: 236584 Submitted by: murat@sunnyvalley.io Reported by: murat@sunnyvalley.io Differential Revision: https://reviews.freebsd.org/D25286 |
360688 |
06-May-2020 |
dim |
MFC r318297 (by tsoome):
e1000api: misleading-indentation
Two blocks in e1000_ich8lan.c are misaligned, causing noise with some compilers (gcc 6).
Reviewed by: imp, erj Differential Revision: https://reviews.freebsd.org/D10741 |
354208 |
30-Oct-2019 |
marius |
MFC: r353778 (partial)
In em_handle_link(), only re-arm the link state change interrupt for 82574 and also only if such a device uses MSI-X, i. e. takes advantage of autoclearing. In case of INTx and MSI re-arming isn't appropriate here and setting EM_MSIX_LINK isn't either. |
347210 |
06-May-2019 |
erj |
MFC r344817: Remove references to CONTIGMALLOC_WORKS in iflib and em
Sponsored by: Intel Corporation |
342789 |
05-Jan-2019 |
marius |
MFC: r336610 (partial), r339207, r339267
- Or in the DMA coalescing Rx threshold so the other bits set in E1000_DMACR remain intact as intended in igb_init_dmac(). [1]
- Fix igb corrupting checksums with BPF and VLAN In stable/11, this merely syncs the code with head as the problem was introduced with r311849 in the latter and then fixed by r339207 with a different approach than the code used pre-r311849 and in stable/11.
- Use mbuf defines to construct csum offload masks rather than literals
Reported by: Coverity CID: 1304929 [1] |
341477 |
04-Dec-2018 |
vmaffione |
MFC r339639
netmap: align codebase to the current upstream (sha 8374e1a7e6941)
Changelist: - Move large parts of VALE code to a new file and header netmap_bdg.[ch]. This is useful to reuse the code within upcoming projects. - Improvements and bug fixes to pipes and monitors. - Introduce nm_os_onattach(), nm_os_onenter() and nm_os_onexit() to handle differences between FreeBSD and Linux. - Introduce some new helper functions to handle more host rings and fake rings (netmap_all_rings(), netmap_real_rings(), ...) - Added new sysctl to enable/disable hw checksum in emulated netmap mode. - nm_inject: add support for NS_MOREFRAG
Approved by: gnn (mentor) Differential Revision: https://reviews.freebsd.org/D17364 |
340148 |
05-Nov-2018 |
mmacy |
e1000: Don't use 9k jumbo clusters
Backported to 11-STABLE from 12-CURRENT. Avoids the issue with 9k jumbo cluster fragmentation by maxing out at page size jumbo clusters for RX mbufs.
Submitted by: Ryan Moeller Reviewed by: erj@ Differential Revision: https://reviews.freebsd.org/D16534 |
334246 |
26-May-2018 |
sbruno |
Activate Wake On Lan features for Ice Lake and Cannon Lake devices.
This is a direct commit to stable/11 as its not needed in -current.
PR: 228302 Submitted by: Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp> Approved by: re (kib) |
333215 |
03-May-2018 |
marius |
MFC: r330803
Use FALLTHROUGH. |
333213 |
03-May-2018 |
marius |
MFC: r327312, r327842, r327865
- Add initial support for Intel Ice Lake and Cannon Lake Ethernet MACs. - Add workaround for Intel Sky Lake and Kabby Lake Ethernet MAC erratum 1.5.4.5. - Fix uses of 1 << 31. |
331722 |
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re) |
330897 |
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg |
330446 |
05-Mar-2018 |
eadler |
MFC r327231,r327232:
kernel: Fix several typos and minor errors lib: Fix several typos and minor errors
- duplicate words - typos - references to old versions of FreeBSD |
323292 |
08-Sep-2017 |
marius |
- Ever since the workaround for the silicon bug of TSO4 causing MAC hangs was committed in r295133, CSUM_TSO gets always disabled by em(4) on the first invocation of em_init_locked() given that at that point no link is established, yet. In turn, this causes CSUM_TSO also to be off when em(4) is used as a parent device for vlan(4), i. e. besides IFCAP_TSO4, also IFCAP_VLAN_HWTSO effectively doesn't work.
In head an attempt to fix this was made with r308345, but that revision had several problems on its own. One of which was that r308345 caused IFCAP_TSO4 to also be cleared from both the interface capability and capability enable bits. Thus, once a link switched from gigabit to a lower speed, TSO no longer could be enabled, even not via ifconfig(8). So this change moves the aforementioned WAR to em_update_link_status() like r308345 did, but only alters the hardware assist bits accordingly, leaving IFCAP_TSO4 flags alone.
Still, this isn't the only problem r308345 had. Another one is that there just is no way to atomically flush TSO-using descriptors already queued at the point in time a link speed switch to below GbE occurs. Thus, such in-flight descriptors still may hang the MAC. Moreover, at least currently there also is no way of triggering a reconfiguration of vlan(4) when the state of IFCAP_VLAN_HWTSO support changes at runtime, causing vlan(4) to continue employing TSO. Last but not least, testing shows that - despite all the WARs for TSO-related silicon bugs in em(4) - at least 82579 still may hang at gigabit speed with IFCAP_TSO4 enabled. Therefore, this change further removes IFCAP_TSO4 and IFCAP_VLAN_HWTSO from interface capability enable bits as set by em(4). While at it, the use of CSUM_TCP is replaced with CSUM_IP_TSO as em(4) only implements support for IFCAP_TSO4 but not IFCAP_TSO6 (although in principle available with a subset of the supported MACs).
At the bottom line, this change allows IFCAP_TSO4 and IFCAP_VLAN_HWTSO to be used again with em(4), but these hardware offloading capabilities now need to be explicitly enabled via ifconfig(8). Beware that it's only considered safe to do so (and also only may work) in environments where the link speed is not to be expected to change from GbE. Moreover, em(4) appears to still be missing some more TSO workarounds for at least some models, specifically the 82579 (I could not find an errata sheet and "specification update" respectively for these latter, though, and the generic ICH8 one doesn't list any TSO related bugs).
- Let igb_tso_setup() handle EtherType protocols that are unsupported or for which support hasn't been compiled in gracefully instead of calling panic(9).
- Make em_allocate_{legacy,msix}() and lem_allocate_irq() match their prototypes WRT static.
This is a direct commit to stable/11 as corresponding code is no longer present in head. |
323079 |
01-Sep-2017 |
marius |
MFC: r322986
Don't set any WOL enabling hardware bits if WOL isn't requested according to the enabled interface capability bits. Also remove some dead code, which tried to preserve already set contents of E1000_WUC while that register is completely overwritten shortly after in all cases. |
322956 |
27-Aug-2017 |
marius |
MFC: r312641
Enable WOL features also for igb(4) class of devices.
PR: 208343 Submitted by: Kaho Tashikazu <kaho@elam.kais.kyoto-u.ac.jp> |
322955 |
27-Aug-2017 |
marius |
MFC: r308643, r312427
- Update WOL support for newer em(4) devices. [1] - Add support for Kaby Lake generation i219 (4) and i219 (5) devices.
PR: 208343 [1] |
320102 |
19-Jun-2017 |
sbruno |
Direct commit to stable/11 to correctly setting the EIAC and IMS registers to the same values when processing interrupts. This reverts a change made in r286831 that was not fully reverted in r311979
This resolves PR https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211219
PR: 211219 Submitted by: Franco Fitchner <franco@opnsense.org> Approved by: re (marius) |
316540 |
05-Apr-2017 |
sbruno |
Direct commit of fixes to stable/11, resolving PCI passthrough and initialization issues when trying to passthrough a i340 (igb) to VMware.
While here, cleanup some bits of em(4) to DTRT as well.
PR: 218113 Submitted by: Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp> |
314281 |
25-Feb-2017 |
loos |
Disable the driver managed queue for igb(4) when the legacy transmit interface is used.
The legacy API (IGB_LEGACY_TX) is enabled when ALTQ is built into kernel.
As noted in altq(9), it is responsibility of the caller to protect this queue against concurrent access and, in the igb case, the interface send queue is protected by tx queue mutex. This obviously cannot protect the driver managed queue against concurrent access from different tx queues and leads to numerous and quite strange panic traces (usually shown as packets disappearing into thin air).
Improving the locking to cope with this means serialize all access to this (single) queue and produces no gain, it actually affects the performance quite noticeabily.
The driver managed queue is already disabled when an ALTQ queue discipline is set on interface (in altq_enable()), because the driver managed queue can interfere with ALTQ timing (whence the reports that setting an ALTQ queue discipline on interface also fixes the issue).
Disabling this additional queue keeps the ability to use if_start() to send packets to individual NIC queues while it simply eliminate the race.
This is a direct commit to stable/11 as -head driver does not support ALTQ anymore.
PR: 213257 PR: 212413 Discussed with: sbruno Tested by: Konstantin Kormashev <konstantin@netgate.com> Obtained from: pfSense Sponsored by: Rubicon Communications, LLC (Netgate) |
314102 |
22-Feb-2017 |
marius |
MFC: r311979
Reset the EIAC register to include the LINK status bit and restore link up/down notifications. |
308207 |
02-Nov-2016 |
kib |
MFC r307649: Partial workaround for Intel PCI adapters reading past the end of the host-programmed DMA regions. |
304337 |
18-Aug-2016 |
sbruno |
MFC r304149
e1000: Add support for Kaby Lake IDs
Fixup some errors when transitioning to/from low power states. |
303664 |
02-Aug-2016 |
sbruno |
MFC r303638
Unbreak NETMAP usage with em(4) broken in r293331.
Approved by: re (gjb) |
302408 |
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
302384 |
07-Jul-2016 |
sbruno |
Do not initialize the adapter on MTU change when adapter status is down. This fixes long-standing problems when changing settings of the adapter.
Discussed in: https://lists.freebsd.org/pipermail/freebsd-net/2016-June/045509.html
Submitted by: arnaud.ysmal@stormshield.eu Reviewed by: erj@freebsd.org Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7030
|
301538 |
07-Jun-2016 |
sephe |
net: Use M_HASHTYPE_OPAQUE_HASH if the mbuf flowid has hash properties
Reviewed by: hps, erj, tuexen Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6688
|
300050 |
17-May-2016 |
eadler |
Don't repeat the the word 'the'
(one manual change to fix grammar)
Confirmed With: db Approved by: secteam (not really, but this is a comment typo fix)
|
299200 |
06-May-2016 |
pfg |
dev/e1000,ixgbe: minor spelling fixes.
No functional change.
Differential Revision: https://reviews.freebsd.org/D6177
|
299188 |
06-May-2016 |
sbruno |
Since igb_detach() cleans up all the data structures that will be free'd by the functions following its call, we can simply return instead of crashing and burning in the event of igb_detach() failing.
PR: 197139 Submitted by: rupavath@juniper.net MFC after: 2 weeks
|
299182 |
06-May-2016 |
sbruno |
If ALTQ is defined in the kern conf, switch to Legacy Mode.
PR: 208409 Submitted by: freebsd@mcwest.org MFC after: 2 weeks
|
298224 |
18-Apr-2016 |
sbruno |
Correct possible underflow conditions when checking for available space in the tx h/w ring buffer.
Reviewed by: gnn jeb.j.cramer@intel.com MFC after: 1 week Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D5918
|
297482 |
01-Apr-2016 |
sephe |
tcp/lro: Use tcp_lro_flush_all in device drivers to avoid code duplication
And factor out tcp_lro_rx_done, which deduplicates the same logic with netinet/tcp_lro.c
Reviewed by: gallatin (1st version), hps, zbb, np, Dexuan Cui <decui microsoft com> Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5725
|
297187 |
22-Mar-2016 |
tuexen |
Support checksum offloading for TCP/IPV6 and UDP/IPV6. Support SCTP checksum offloading for SCTP/IPV6. Support SCTP checksum offloading on all controllers except 82575.
Reviewed by: sbruno@, erj@ MFC after: 4 weeks Differential Revision: D5193
|
296385 |
04-Mar-2016 |
sbruno |
The register read/write mphy functions have misleading whitespace around the locked check. This cleanup merely preserves the existing functionality while improving the ready check.
Submitted by: Jim Thompson Reviewed by: gnn erj Obtained from: Netgate MFC after: 2 weeks Sponsored by: Netgate Differential Revision: https://reviews.freebsd.org/D5448
|
295906 |
23-Feb-2016 |
marius |
Fix and clean up usage of DMA and TSO segments: - At Intel it is believed that most of their products support "only" 40 DMA segments so lower {EM,IGB}_MAX_SCATTER accordingly. Actually, 40 is more than plenty to handle full size TSO packets so it doesn't make sense to further distinguish between MAC variants that really can do 64 DMA segments. Moreover, capping at 40 DMA segments limits the stack usage of {em,igb}_xmit() that - given the rare use of more than these - previously hardly was justifiable, while still being sufficient to avoid the problems seen with em(4) and EM_MAX_SCATTER set to 32. - In igb(4), pass the actually supported TSO parameters up the stack. Previously, the defaults set in if_attach_internal() were applied, i. e. a maximum of 35 TSO segments, which made supporting more than these in the driver pointless. However, this might explain why no problems were seen with IGB_MAX_SCATTER at 64. - In em(4), take the 5 m_pullup(9) invocations performed by em_xmit() in the TSO case into account when reporting TSO parameters upwards. In the worst case, each of these calls will add another mbuf and, thus, the requirement for an additional DMA segment. So for best performance, it doesn't make sense to advertize a maximum of TSO segments that typically will require defragmentation in em_xmit(). Again, this leaves enough room to handle full size TSO packets. - Drop TSO macros from if_lem.h given that corresponding MACS don't support TSO in the first place.
Reviewed by: erj, sbruno, jeffrey.e.pieper_intel.com Approved by: erj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D5238
|
295323 |
05-Feb-2016 |
erj |
Update em(4) to 7.6.1; update igb(4) to 2.5.3.
Major changes:
- Add i219/i219(2) hardware support. (Found on Skylake generation and newer chipsets.) - Further to the last Skylake support diff, this one also includes support for the Lewisburg chipset (i219(3)).
- Add a workaround to an igb hardware errata. All 1G server products need to have IPv6 extension header parsing turned off. This should be listed in the specification updates for current 1G server products, e.g. for i350 it's errata #37 in this document: http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/ethernet-controller-i350-spec-update.pdf
- Avoton (i354) PHY errata workaround added
And a bunch of minor fixes, as well as #defines for things that the current em(4)/igb(4) drivers don't implement.
Differential Revision: https://reviews.freebsd.org/D3162 Reviewed by: sbruno, marius, gnn Approved by: gnn MFC after: 2 weeks Sponsored by: Intel Corporation
|
295133 |
01-Feb-2016 |
marius |
As it turns out, one of the more or less recent changes to em(4) causes watchdog timeouts when using TSO4 at link speeds below Gigabit, at least with 82573E. So disable the assist automatically when at lower speeds.
Submitted by: jfv Approved by: erj Obtained from: D3162 MFC after: 3 days
|
294327 |
19-Jan-2016 |
hselasky |
Add optimizing LRO wrapper:
- Add optimizing LRO wrapper which pre-sorts all incoming packets according to the hash type and flowid. This prevents exhaustion of the LRO entries due to too many connections at the same time. Testing using a larger number of higher bandwidth TCP connections showed that the incoming ACK packet aggregation rate increased from ~1.3:1 to almost 3:1. Another test showed that for a number of TCP connections greater than 16 per hardware receive ring, where 8 TCP connections was the LRO active entry limit, there was a significant improvement in throughput due to being able to fully aggregate more than 8 TCP stream. For very few very high bandwidth TCP streams, the optimizing LRO wrapper will add CPU usage instead of reducing CPU usage. This is expected. Network drivers which want to use the optimizing LRO wrapper needs to call "tcp_lro_queue_mbuf()" instead of "tcp_lro_rx()" and "tcp_lro_flush_all()" instead of "tcp_lro_flush()". Further the LRO control structure must be initialized using "tcp_lro_init_args()" passing a non-zero number into the "lro_mbufs" argument.
- Make LRO statistics 64-bit. Previously 32-bit integers were used for statistics which can be prone to wrap-around. Fix this while at it and update all SYSCTL's which expose LRO statistics.
- Ensure all data is freed when destroying a LRO control structures, especially leftover LRO entries.
- Reduce number of memory allocations needed when setting up a LRO control structure by precomputing the total amount of memory needed.
- Add own memory allocation counter for LRO.
- Bump the FreeBSD version to force recompilation of all KLDs due to change of the LRO control structure size.
Sponsored by: Mellanox Technologies Reviewed by: gallatin, sbruno, rrs, gnn, transport Tested by: Netflix Differential Revision: https://reviews.freebsd.org/D4914
|
293854 |
13-Jan-2016 |
marius |
Given that em(4), lem(4) and igb(4) hardware doesn't require the alignment guarantees provided by m_defrag(9), use m_collapse(9) instead for performance reasons. While at it, sanitize the statistics softc members, i. e. retire unused ones and add SYSCTL nodes missing for actually used ones.
Differential Revision: https://reviews.freebsd.org/D4717
|
293332 |
07-Jan-2016 |
sbruno |
Disable the reuse of checksum offload context descriptors in the case of multiple queues in em(4). Document errata in the code.
MFC after: 2 weeks Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D3995
|
293331 |
07-Jan-2016 |
sbruno |
Switch em(4) to the extended RX descriptor format. This matches the e1000/e1000e split in linux.
Split rxbuffer and txbuffer apart to support the new RX descriptor format structures. Move rxbuffer manipulation to em_setup_rxdesc() to unify the new behavior changes.
Add a RSSKEYLEN macro for help in generating the RSSKEY data structures in the card.
Change em_receive_checksum() to process the new rxdescriptor format status bit.
MFC after: 2 weeks Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D3447
|
293330 |
07-Jan-2016 |
sbruno |
Wow, um ... sorry about that. The commit log for this code should have read that it was for EM_MULTIQUEUE. Revert this and try again.
|
293329 |
07-Jan-2016 |
sbruno |
Switch em(4) to the extended RX descriptor format. This matches the e1000/e1000e split in linux.
MFC after: 2 weeks Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D3447
|
292670 |
23-Dec-2015 |
sbruno |
Add support for sysctl knobs to live tune the tx packet processing limits in igb and fix a wrap-around bug.
Reviewed by: hiren Obtained from: Jason (j@nitrology.com) MFC after: 2 weeks Sponsored by: LimeLight Networks Differential Revision: https://reviews.freebsd.org/D4039
|
290641 |
10-Nov-2015 |
tuexen |
Add support for SCTP checksum offloading for the 82580 controller similar to the 82576 controller. Tested with Intel i340 cards.
Reviewed by: erj@ MFC after: 1 week
|
287990 |
19-Sep-2015 |
sbruno |
Revert 287914,287762.
Reports of breakage on igb(4) have been narrowed down to 287762 and 287914 is an dependant change.
Submitted by: erj
|
287914 |
17-Sep-2015 |
sbruno |
Add Intel Skylake/I219 Support - New em(4) device in currently shipping products
Differential Revision: https://reviews.freebsd.org/D3163 Submitted by: erj@freebsd.org Reviewed by: jfv@freebsd.org MFC after: 2 weeks Sponsored by: Intel Corporation
|
287762 |
13-Sep-2015 |
sbruno |
Update em(4) with D3162 after testing further on hardware that failed to attach with the last version of this commit. This commit fixes attach failures on "ICH8" class devices via modifications to e1000_init_nvm_params_ich8lan()
- Fix compiler warning in 80003es2lan.c - Add return value handler for e1000_*_kmrn_reg_80003es2lan - Fix usage of DEBUGOUT - Remove unnecessary variable initializations. - Removed unused variables (complaints from gcc). - Edit defines in 82571.h. - Add workaround for igb hw errata. - Shared code changes for Skylake/I219 support. - Remove unused OBFF and LTR functions.
Tested by some of the folks that reported breakage in previous incarnation. Thanks to AllanJude, gjb, gnn, tijl for tempting fate with their machines.
Submitted by: erj@freebsd.org MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D3162
|
287492 |
05-Sep-2015 |
sbruno |
Revert last two commits to em(4)/igb(4). Reports are coming in that this breaks initialization and reads from EEPROM on boot/driver load.
r287469 is being reverted as a dependancy on r287467
|
287469 |
04-Sep-2015 |
sbruno |
em(4): Add Skylake/I219 support. - driver rev 7.5.2 - use new functions em_flush* for i219 devices
Differential Revision: https://reviews.freebsd.org/D3163 Submitted by: erj jfv Reviewed by: jfv MFC after: 1 month Relnotes: Yes Sponsored by: Intel Corporation
|
287467 |
04-Sep-2015 |
sbruno |
e1000: Shared code updates - Fix compiler warning in 80003es2lan.c - Add return value handler for e1000_*_kmrn_reg_80003es2lan - Fix usage of DEBUGOUT - Remove unnecessary variable initializations. - Removed unused variables (complaints from gcc). - Edit defines in 82571.h. - Add workaround for igb hw errata. - Shared code changes for Skylake/I219 support. - Remove unused OBFF and LTR functions.
Differential Revision: https://reviews.freebsd.org/D3162 Submitted by: erj MFC after: 1 month Sponsored by: Intel Corporation
|
287465 |
04-Sep-2015 |
sbruno |
igb(4): Update and fix HW errata - HW errata workaround for IPv6 offload w/ extension headers - Edited start of if_igb.c (Device IDs / #includes) to match ixgbe/ixl
Differential Revision: https://reviews.freebsd.org/D3165 Submitted by: erj MFC after: 1 month Sponsored by: Intel Corporation
|
287330 |
31-Aug-2015 |
sbruno |
Restrict tso_max to IP_MAXPACKET to avoid the panic reported in: https://lists.freebsd.org/pipermail/freebsd-current/2015-August/057192.html
Submitted by: pyunyh@gmail.com MFC after: 2 weeks
|
287112 |
24-Aug-2015 |
sbruno |
Style/whitespace cleanup in shared/common code.
Differential Revision: https://reviews.freebsd.org/D3159 Submitted by: erj MFC after: 2 weeks
|
286833 |
16-Aug-2015 |
sbruno |
Bump all copywrite dates to 2015
Differential Revision: https://reviews.freebsd.org/D3160 Submitted by: erj MFC after: 2 weeks Sponsored by: Intel Corportation
|
286832 |
16-Aug-2015 |
sbruno |
e1000/if_lem.c bump to 1.1.0 - deprecate fbsd 8
Differential Revision: https://reviews.freebsd.org/D3164 Submitted by: erj MFC after: 2 weeks Sponsored by: Intel Corporation
|
286831 |
16-Aug-2015 |
sbruno |
Increase EM_MAX_SCATTER to 64 such that the size of em_xmit()::segs[EM_MAX_SCATTER] doesn't get overrun by things like NFS that can and do shove more than 32 segs when being used with em(4) and TSO4.
Update tso handling code in em_xmit() with update from jhb@ in email thread: https://lists.freebsd.org/pipermail/freebsd-net/2014-July/039306.html
set ifp->if_hw_tsomax, ifp->if_hw_tsomaxsegcount & ifp->if_hw_tsomaxsegsize to appropriate values.
Define a TSO workaround "magic" number of 4 that is used to avoid an alignment issue in hardware.
Change a couple of integer values that were used as booleans to actual bool types.
Ensure that em_enable_intr() enables the appropriate mask of interrupts and not just a hardcoded define of values.
PR: 200221 199174 195078 Differential Revision: https://reviews.freebsd.org/D3192 Reviewed by: erj jhb hiren MFC after: 2 weeks Sponsored by: Limelight Networks
|
286829 |
16-Aug-2015 |
sbruno |
Add capability to disable CRC stripping. This breaks IPMI/BMC capabilities on certain adatpers. Linux has been doing the exact same thing since 2008
https://github.com/torvalds/linux/commit/eb7c3adb1ca92450870dbb0d347fc986cd5e2af4
PR: 161277 Differential Revision: https://reviews.freebsd.org/D3282 Submitted by: Fravadona@gmail.com Reviewed by: erj wblock MFC after: 2 weeks Relnotes: yes Sponsored by: Limelight Networks
|
286162 |
01-Aug-2015 |
hselasky |
Free mbufs when busdma loading fails.
Reviewed by: erj, sbruno MFC after: 1 month
|
285879 |
25-Jul-2015 |
sbruno |
Remove unused txd_saved.
Intialize txd_upper, txd_lower and txd_used at declaration.
Differential Revision: D3174 Reviewed by: erj hiren MFC after: 2 weeks Sponsored by: Limelight Networks
|
285639 |
16-Jul-2015 |
sbruno |
Add an adapter CORE lock in the DDB hook em_dump_queue to avoid WITNESS panic in em_init_locked() while debugging.
MFC after: 2 weeks Sponsored by: Limelight Networks
|
285623 |
16-Jul-2015 |
kevlo |
Fix typo in register definition.
Submitted by: James Hung Reviewed by: sbruno
|
285349 |
10-Jul-2015 |
luigi |
Sync netmap sources with the version in our private tree. This commit contains large contributions from Giuseppe Lettieri and Stefano Garzarella, is partly supported by grants from Verisign and Cisco, and brings in the following:
- fix zerocopy monitor ports and introduce copying monitor ports (the latter are lower performance but give access to all traffic in parallel with the application)
- exclusive open mode, useful to implement solutions that recover from crashes of the main netmap client (suggested by Patrick Kelsey)
- revised memory allocator in preparation for the 'passthrough mode' (ptnetmap) recently presented at bsdcan. ptnetmap is described in S. Garzarella, G. Lettieri, L. Rizzo; Virtual device passthrough for high speed VM networking, ACM/IEEE ANCS 2015, Oakland (CA) May 2015 http://info.iet.unipi.it/~luigi/research.html
- fix rx CRC handing on ixl
- add module dependencies for netmap when building drivers as modules
- minor simplifications to device-specific routines (*txsync, *rxsync)
- general code cleanup (remove unused variables, introduce macros to access rings and remove duplicate code,
Applications do not need to be recompiled, unless of course they want to use the new features (monitors and exclusive open).
Those willing to try this code on stable/10 can just update the sys/dev/netmap/*, sys/net/netmap* with the version in HEAD and apply the small patches to individual device drivers.
MFC after: 1 month Sponsored by: (partly) Verisign, Cisco
|
283959 |
03-Jun-2015 |
sbruno |
Change EM_MULTIQUEUE to a real kernconf entry and enable support for up to 2 rx/tx queues for the 82574.
Program the 82574 to enable 5 msix vectors, assign 1 to each rx queue, 1 to each tx queue and 1 to the link handler.
Inspired by DragonFlyBSD, enable some RSS logic for handling tx queue handling/processing.
Move multiqueue handler functions so that they line up better in a diff review to if_igb.c
Always enqueue tx work to be done in em_mq_start, if unable to acquire the TX lock, then this will be processed in the background later by the taskqueue. Remove mbuf argument from em_start_mq_locked() as the work is always enqueued. (stolen from igb)
Setup TARC, TXDCTL and RXDCTL registers for better performance and stability in multiqueue and singlequeue implementations. Handle Intel errata 3 and generic multiqueue behavior with the initialization of TARC(0) and TARC(1)
Bind interrupt threads to cpus in order. (stolen from igb)
Add 2 new DDB functions, one to display the queue(s) and their settings and one to reset the adapter. Primarily used for debugging.
In the multiqueue configuration, bump RXD and TXD ring size to max for the adapter (4096). Setup an RDTR of 64 and an RADV of 128 in multiqueue configuration to cut down on the number of interrupts. RADV was arbitrarily set to 2x RDTR and can be adjusted as needed.
Cleanup the display in top a bit to make it clearer where the taskqueue threads are running and what they should be doing.
Ensure that both queues are processed by em_local_timer() by writing them both to the IMS register to generate soft interrupts.
Ensure that an soft interrupt is generated when em_msix_link() is run so that any races between assertion of the link/status interrupt and a rx/tx interrupt are handled.
Document existing tuneables: hw.em.eee_setting, hw.em.msix, hw.em.smart_pwr_down, hw.em.sbp
Document use of hw.em.num_queues and the new kernel option EM_MULTIQUEUE
Thanks to Intel for their continued support of FreeBSD.
Reviewed by: erj jfv hiren gnn wblock Obtained from: Intel Corporation MFC after: 2 weeks Relnotes: Yes Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D1994
|
283923 |
02-Jun-2015 |
sbruno |
Simplify hang detection by stealing the techniques used in ixl(4) and applying them to em(4).
Rely on iterations through the local timer, and the tx queue state to determine if an actual hang has occurred. Any time a descriptor is used (packet sent), the tx queue is flagged as busy. Then when txeof runs, it either clears the flag when all is clean, or resets it to 1 if ANY are cleaned, if nothing is cleaned it increments the flag.
Local timer simply checks to see if busy ever reaches MAX (10, which is compile time configurable), and then sets it as HUNG, at that point there is one more timer cycle in which to have any cleans, if not a watchdog reset will occur.
Differential Revision: https://reviews.freebsd.org/D2019 Submitted by: jfv Reviewed by: hiren Obtained from: Intel Corporation MFC after: 2 weeks Relnotes: Yes Sponsored by: Limelight Networks
|
283290 |
22-May-2015 |
sbruno |
Bump rx_overruns when indicated by the ICR mask.
PR: 199716 MFC after: 3 days Sponsored by: Limelight Networks
|
282280 |
30-Apr-2015 |
jhb |
Various fixes to the stats in igb(4), ixgbe(4), and ixl(4). - Use hardware counters for ifnet stats in igb(4) when possible. This ensures these stats include packets that bypass the regular stack via netmap. - Don't derefence values off the end of the igb(4) VF stats structure. Instead, add a dedicated if_get_counter method for igb(4) VF interfaces. - Report missed packets on igb(4) as input queue drops rather than an input error. - Report bug_ring drop counts as output queue drops for igb(4) and ixgbe(4). - Export the buf_ring drop stats for individual rings via sysctl on ixgbe(4). - Fix a typo that in ixl(4) that caused output queue drops to be reported as input queue drops and input queue drops to be unreported.
Differential Revision: https://reviews.freebsd.org/D2402 Reviewed by: jfv, rstone (6) Sponsored by: Norse Corp, Inc.
|
281838 |
21-Apr-2015 |
hiren |
For igb(4), when we are doing multiqueue, we are all setup to have full 32bit RSS hash from the card. We do not need to hide that under "ifdef RSS" and should expose that by default so others like lagg(4) can use that and avoid hashing the traffic by themselves. While here, improve comments and get rid of hidden/unimplemented RSS support code for UDP.
Differential Revision: https://reviews.freebsd.org/D2296 Reviewed by: jfv, erj Discussed with: adrian Sponsored by: Limelight Networks
|
279299 |
25-Feb-2015 |
adrian |
Migrate using CPU_ZERO() + CPU_SET() -> CPU_SETOF().
Tested:
* ixgbe, igb, RSS enabled
Submitted by: jhb Sponsored by: Norse Corp, Inc.
|
279255 |
24-Feb-2015 |
adrian |
Change uses of taskqueue_start_threads_pinned() -> taskqueue_start_threads_cpuset()
Differential Revision: https://reviews.freebsd.org/D1897 Reviewed by: jfv
|
277331 |
18-Jan-2015 |
adrian |
Refactor / restructure the RSS code into generic, IPv4 and IPv6 specific bits.
The motivation here is to eventually teach netisr and potentially other networking subsystems a bit more about how RSS work queues / buckets are configured so things have a hope of auto-configuring in the future.
* net/rss_config.[ch] takes care of the generic bits for doing configuration, hash function selection, etc; * topelitz.[ch] is now in net/ rather than netinet/; * (and would be in libkern if it didn't directly include RSS_KEYSIZE; that's a later thing to fix up.) * netinet/in_rss.[ch] now just contains the IPv4 specific methods; * and netinet/in6_rss.[ch] now just contains the IPv6 specific methods.
This should have no functional impact on anyone currently using the RSS support.
Differential Revision: D1383 Reviewed by: gnn, jfv (intel driver bits)
|
275431 |
02-Dec-2014 |
jfv |
Revert r275136, it was not approved, it was sloppy, if a feature like this is needed please resubmit for Intel's approval.
|
275358 |
01-Dec-2014 |
hselasky |
Start process of removing the use of the deprecated "M_FLOWID" flag from the FreeBSD network code. The flag is still kept around in the "sys/mbuf.h" header file, but does no longer have any users. Instead the "m_pkthdr.rsstype" field in the mbuf structure is now used to decide the meaning of the "m_pkthdr.flowid" field. To modify the "m_pkthdr.rsstype" field please use the existing "M_HASHTYPE_XXX" macros as defined in the "sys/mbuf.h" header file.
This patch introduces new behaviour in the transmit direction. Previously network drivers checked if "M_FLOWID" was set in "m_flags" before using the "m_pkthdr.flowid" field. This check has now now been replaced by checking if "M_HASHTYPE_GET(m)" is different from "M_HASHTYPE_NONE". In the future more hashtypes will be added, for example hashtypes for hardware dedicated flows.
"M_HASHTYPE_OPAQUE" indicates that the "m_pkthdr.flowid" value is valid and has no particular type. This change removes the need for an "if" statement in TCP transmit code checking for the presence of a valid flowid value. The "if" statement mentioned above is now a direct variable assignment which is then later checked by the respective network drivers like before.
Additional notes: - The SCTP code changes will be committed as a separate patch. - Removal of the "M_FLOWID" flag will also be done separately. - The FreeBSD version has been bumped.
MFC after: 1 month Sponsored by: Mellanox Technologies
|
275136 |
26-Nov-2014 |
alfred |
Make igb and ixgbe check tunables at probe time.
This allows one to make a kernel module to tune the number of queues before the driver loads.
This is needed so that a module at SI_SUB_CPU can set tunables for these drivers to take. Otherwise getenv is called too early by the TUNABLE macros.
Reviewed by: smh Phabric: https://reviews.freebsd.org/D1149
|
273377 |
21-Oct-2014 |
hselasky |
Fix multiple incorrect SYSCTL arguments in the kernel:
- Wrong integer type was specified.
- Wrong or missing "access" specifier. The "access" specifier sometimes included the SYSCTL type, which it should not, except for procedural SYSCTL nodes.
- Logical OR where binary OR was expected.
- Properly assert the "access" argument passed to all SYSCTL macros, using the CTASSERT macro. This applies to both static- and dynamically created SYSCTLs.
- Properly assert the the data type for both static and dynamic SYSCTLs. In the case of static SYSCTLs we only assert that the data pointed to by the SYSCTL data pointer has the correct size, hence there is no easy way to assert types in the C language outside a C-function.
- Rewrote some code which doesn't pass a constant "access" specifier when creating dynamic SYSCTL nodes, which is now a requirement.
- Updated "EXAMPLES" section in SYSCTL manual page.
MFC after: 3 days Sponsored by: Mellanox Technologies
|
272897 |
10-Oct-2014 |
jhb |
Various fixes to stats: - Read the counts of received, dropped, and transmitted management packets and add sysctl nodes for them. - Fix the total octets received/transmitted to read all 64 bits of the counters. - Add missing sysctl nodes for rlec, tncrs, fcruc, tor, and tot. - Remove spurious spaces.
Reviewed by: Eric Joyner @ Intel MFC after: 1 week
|
272257 |
28-Sep-2014 |
glebius |
- Remove empty wrappers ether_poll_[de]register_drv(). [1] - Move polling(9) declarations out of ifq.h back to if_var.h they are absolutely unrelated to queues.
Submitted by: Mikhail <mp lenta.ru> [1]
|
271870 |
19-Sep-2014 |
glebius |
- Provide igb_get_counter() to return counters that are not collected, but taken from hardware. - Mechanically convert to if_inc_counter() the rest of counters.
|
271784 |
18-Sep-2014 |
adrian |
Fix the handling of EOP in status descriptors for if_igb(4) and don't double-free mbufs.
Like ixgbe(4) chipsets, EOP is only set on the final descriptor in a chain of descriptors. So, to free the whole list of descriptors, we should free the current slot _and_ the assembled list of descriptors that make up the fragment list.
The existing code was setting discard once it saw EOP + an error status; it then freed all the subsequent descriptors until the next EOP. That's totally the wrong order.
|
271782 |
18-Sep-2014 |
glebius |
- Use if_inc_counter() to increment various counters. - Do not ever set a counter to a value. For those counters that we don't increment, but return directly from hardware create cases in if_get_counter() method.
Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
271645 |
15-Sep-2014 |
adrian |
Set DROP_EN on each RX queue if transmit flow-control is disabled.
This allows the NIC to drop frames on the receive queue and not cause the MAC to block on receiving to _any_ queue.
Tested:
igb0@pci0:5:0:0: class=0x020000 card=0x152115d9 chip=0x15218086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = 'I350 Gigabit Network Connection' class = network subclass = ethernet
Discussed with: Eric Joyner <eric.joyner@intel.com>
MFC after: 1 week Sponsored by: Norse Corp, Inc.
|
270876 |
31-Aug-2014 |
glebius |
It is actually possible to have if_t a typedef to non-void type, and keep both converted to drvapi and non-converted drivers compilable.
o Make if_t typedef to struct ifnet *. o Remove shim functions.
Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
270856 |
30-Aug-2014 |
glebius |
Use define from if_var.h to access a field inside struct if_data, that resides in struct ifnet.
Sponsored by: Nginx, Inc.
|
270063 |
16-Aug-2014 |
luigi |
Update to the current version of netmap. Mostly bugfixes or features developed in the past 6 months, so this is a 10.1 candidate.
Basically no user API changes (some bugfixes in sys/net/netmap_user.h).
In detail:
1. netmap support for virtio-net, including in netmap mode. Under bhyve and with a netmap backend [2] we reach over 1Mpps with standard APIs (e.g. libpcap), and 5-8 Mpps in netmap mode.
2. (kernel) add support for multiple memory allocators, so we can better partition physical and virtual interfaces giving access to separate users. The most visible effect is one additional argument to the various kernel functions to compute buffer addresses. All netmap-supported drivers are affected, but changes are mechanical and trivial
3. (kernel) simplify the prototype for *txsync() and *rxsync() driver methods. All netmap drivers affected, changes mostly mechanical.
4. add support for netmap-monitor ports. Think of it as a mirroring port on a physical switch: a netmap monitor port replicates traffic present on the main port. Restrictions apply. Drive carefully.
5. if_lem.c: support for various paravirtualization features, experimental and disabled by default. Most of these are described in our ANCS'13 paper [1]. Paravirtualized support in netmap mode is new, and beats the numbers in the paper by a large factor (under qemu-kvm, we measured gues-host throughput up to 10-12 Mpps).
A lot of refactoring and additional documentation in the files in sys/dev/netmap, but apart from #2 and #3 above, almost nothing of this stuff is visible to other kernel parts.
Example programs in tools/tools/netmap have been updated with bugfixes and to support more of the existing features.
This is meant to go into 10.1 so we plan an MFC before the Aug.22 deadline.
A lot of this code has been contributed by my colleagues at UNIPI, including Giuseppe Lettieri, Vincenzo Maffione, Stefano Garzarella.
MFC after: 3 days.
|
269009 |
23-Jul-2014 |
adrian |
Fix the igb(4) redirection table to correctly populate.
This is similar to the ixgbe(4) fix.
Tested:
* Intel I350 gigabit adapter
|
268847 |
18-Jul-2014 |
hiren |
The description is a bit misleading. Trying to make it more obvious.
Phabric: https://phabric.freebsd.org/D435 Reviewed by: gnn
|
268726 |
15-Jul-2014 |
rmacklem |
Move the "retry:" label so that the calls to m_pullup() are not done after the call to m_defrag(). This fixes a problem where m_pullup() would prepend an mbuf to the list created by m_defrag() making the chain greater than 32 again.
Tested by: rcarter@pinyon.org Reviewed by: yongari, jfv MFC after: 2 weeks
|
268501 |
10-Jul-2014 |
markj |
Correct the setting of the VID in transmit descriptors when hardware VLAN tagging is enabled. This was broken in r266978.
Reported by: gjb Tested by: gjb
|
268067 |
30-Jun-2014 |
adrian |
Initialise these variables so gcc doesn't complain.
Submitted by: luigi
|
268028 |
30-Jun-2014 |
adrian |
Add initial RSS awareness to the igb(4) driver.
The igb(4) hardware is capable of RSS hashing RX packets and doing RSS queue selection for up to 8 queues. (I believe some hardware is limited to 4 queues, but I haven't tested on that.)
However, even if multi-queue is enabled for igb(4), the RX path doesn't use the RSS flowid from the received descriptor. It just uses the MSIX queue id.
This patch does a handful of things if RSS is enabled:
* Instead of using a random key at boot, fetch the RSS key from the RSS code and program that in to the RSS redirection table.
That whole chunk of code should be double checked for endian correctness.
* Use the RSS queue mapping to CPU ID to figure out where to thread pin the RX swi thread and the taskqueue threads for each queue.
* The software queue is now really an "RSS bucket".
* When programming the RSS indirection table, use the RSS code to figure out which RSS bucket each slot in the indirection table maps to.
* When transmitting, use the flowid RSS mapping if the mbuf has an RSS aware hash. The existing method wasn't guaranteed to align correctly with the destination RSS bucket (and thus CPU ID.)
This code warns if the number of RSS buckets isn't the same as the automatically configured number of hardware queues. The administrator will have to tweak one of them for better performance.
There's currently no way to re-balance the RSS indirection table after startup. I'll worry about that later.
Additionally, it may be worthwhile to always use the full 32 bit flowid if multi-queue is enabled. It'll make things like lagg(4) behave better with respect to traffic distribution.
|
267992 |
28-Jun-2014 |
hselasky |
Pull in r267961 and r267973 again. Fix for issues reported will follow.
|
267985 |
27-Jun-2014 |
gjb |
Revert r267961, r267973:
These changes prevent sysctl(8) from returning proper output, such as:
1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
|
267961 |
27-Jun-2014 |
hselasky |
Extend the meaning of the CTLFLAG_TUN flag to automatically check if there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel.
Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change.
MFC after: 2 weeks Sponsored by: Mellanox Technologies
|
267935 |
26-Jun-2014 |
jfv |
Sync the E1000 shared code with Intel internal, this adds fixes, and more importantly, new I218 adapter support to the em driver.
MFC after: 1 week
|
267385 |
12-Jun-2014 |
jhb |
- Don't compare bus_dma map pointers for static DMA allocations against NULL to determine if bus_dmamap_unload() or bus_dmamem_free() should be called. Instead, check the associated bus and virtual addresses. - Don't clear static DMA maps to NULL.
Reviewed by: jfv
|
267187 |
06-Jun-2014 |
luigi |
make sure if_transmit returns 0 if the mbuf is enqueued. ixgbe/ixv.c still needs a similar fix but it takes a little more restructuring of the code.
MFC after: 3 days
|
266978 |
02-Jun-2014 |
marcel |
Convert em(4) to use the driver API.
Submitted by: Anuranjan Shukla <anshukla@juniper.net> Obtained from: Juniper Networks, Inc.
|
266790 |
28-May-2014 |
luigi |
reference the correct variable in a comment
MFC after: 3 days
|
266677 |
26-May-2014 |
eadler |
e1000: add missing braces
Obtained from: DragonFlyBSD
|
261291 |
30-Jan-2014 |
gnn |
The timestamp bit is number 17, and not number 9, in the stat error field of the receive descriptor.
MFC after: 1 week
|
261169 |
25-Jan-2014 |
glebius |
Fix compilation with IGB_LEGACY_TX defined.
PR: 185909 Submitted by: Aurelien Rougemont <beorn binaries.fr>
|
260368 |
06-Jan-2014 |
luigi |
It is 2014 and we have a new version of netmap. Most relevant features:
- netmap emulation on any NIC, even those without native netmap support.
On the ixgbe we have measured about 4Mpps/core/queue in this mode, which is still a lot more than with sockets/bpf.
- seamless interconnection of VALE switch, NICs and host stack.
If you disable accelerations on your NIC (say em0)
ifconfig em0 -txcsum -txcsum
you can use the VALE switch to connect the NIC and the host stack:
vale-ctl -h valeXX:em0
allowing sharing the NIC with other netmap clients.
- THE USER API HAS SLIGHTLY CHANGED (head/cur/tail pointers instead of pointers/count as before). This was unavoidable to support, in the future, multiple threads operating on the same rings. Netmap clients require very small source code changes to compile again. On the plus side, the new API should be easier to understand and the internals are a lot simpler.
The manual page has been updated extensively to reflect the current features and give some examples.
This is the result of work of several people including Giuseppe Lettieri, Vincenzo Maffione, Michio Honda and myself, and has been financially supported by EU projects CHANGE and OPENLAB, from NetApp University Research Fund, NEC, and of course the Universita` di Pisa.
|
259907 |
26-Dec-2013 |
luigi |
use the correct netmap <-> nic slot mapping on the transmit ring for 'lem'. This bug would manifest only in netmap mode and on packets transmitted after a NIC reset while netmap mode is active.
MFC after: 3 days
|
258780 |
30-Nov-2013 |
eadler |
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this shifts into the sign bit. Instead use (1U << 31) which gets the expected result.
This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases.
A similar change was made in OpenBSD.
Discussed with: -arch, rdivacky Reviewed by: cperciva
|
257541 |
02-Nov-2013 |
kib |
Fix several issues with the busdma(9) KPI use in the e1000 drivers. The problems do not affect bouncing busdma in a visible way, but are critical for the dmar backend.
- The bus_dmamap_create(9) is not documented to take BUS_DMA_NOWAIT flag. - Unload descriptor map after receive. - Do not reset descriptor map to NULL, bus_dmamap_load(9) requires valid map, and also this leaks the map.
Reported and tested by: pho Approved by: jfv Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
|
257529 |
01-Nov-2013 |
luigi |
update to the latest netmap snapshot. This includes the following: - use separate memory regions for VALE ports - locking fixes - some simplifications in the NIC-specific routines - performance improvements for the VALE switch - some new features in the pkt-gen test program - documentation updates
There are small API changes that require programs to be recompiled (NETMAP_API has been bumped so you will detect old binaries at runtime).
In particular: - struct netmap_slot now is 16 bytes to support an extra pointer, which may save one data copy when using VALE ports or VMs; - the struct netmap_if has two extra fields;
MFC after: 3 days
|
257176 |
26-Oct-2013 |
glebius |
The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h
Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
256200 |
09-Oct-2013 |
jfv |
Update the Intel igb driver to version 2.4.0 - This version has support for the new Intel Avoton systems, including 2.5Gb support, further it now has IPv6/TSO6 support as well. Shared code has been updated where necessary as well. Thanks to my new assistant Eric Joyner for doing the transmit path changes to bring in the IPv6/TSO6 support. Thanks to Gleb for catching the one bug and change needed in NETMAP.
Approved by: re
|
256069 |
05-Oct-2013 |
hiren |
Expose system level ixgbe sysctls. Device level sysctls are already exposed as dev.ix.<device>
Fixing the case where number of queues for igb is auto-tuned and hw.igb.num_queues does not return current/updated value.
Reviewed by: jfv Approved by: re (delphij) MFC after: 2 weeks
|
254804 |
24-Aug-2013 |
andre |
Restructure the mbuf pkthdr to make it fit for upcoming capabilities and features. The changes in particular are:
o Remove rarely used "header" pointer and replace it with a 64bit protocol/ layer specific union PH_loc for local use. Protocols can flexibly overlay their own 8 to 64 bit fields to store information while the packet is worked on.
o Mechanically convert IP reassembly, IGMP/MLD and ATM to use pkthdr.PH_loc instead of pkthdr.header.
o Extend csum_flags to 64bits to allow for additional future offload information to be carried (e.g. iSCSI, IPsec offload, and others).
o Move the RSS hash type enumerator from abusing m_flags to its own 8bit rsstype field. Adjust accessor macros.
o Add cosqos field to store Class of Service / Quality of Service information with the packet. It is not yet supported in any drivers but allows us to get on par with Cisco/Juniper in routing applications (plus MPLS QoS) with a modernized ALTQ.
o Add four 8 bit fields l[2-5]hlen to store the relative header offsets from the start of the packet. This is important for various offload capabilities and to relieve the drivers from having to parse the packet and protocol headers to find out location of checksums and other information. Header parsing in drivers is a lot of copy-paste and unhandled corner cases which we want to avoid.
o Add another flexible 64bit union to map various additional persistent packet information, like ether_vtag, tso_segsz and csum fields. Depending on the csum_flags settings some fields may have different usage making it very flexible and adaptable to future capabilities.
o Restructure the CSUM flags to better signify their outbound (down the stack) and inbound (up the stack) use. The CSUM flags used to be a bit chaotic and rather poorly documented leading to incorrect use in many places. Bring clarity into their use through better naming. Compatibility mappings are provided to preserve the API. The drivers can be corrected one by one and MFC'd without issue.
o The size of pkthdr stays the same at 48/56bytes (32/64bit architectures).
Sponsored by: The FreeBSD Foundation
|
254264 |
13-Aug-2013 |
jfv |
Alter the mq_start routine to do a TRYLOCK and call to the locked routine rather than just queueing. The former code was an attempt at getting UDP performance up, but there have been customer reports of problems with it, so the ixgbe approach seems the best solution for now.
|
254263 |
12-Aug-2013 |
scottl |
Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI command register. The lazy BAR allocation code in FreeBSD sometimes disables this bit when it detects a range conflict, and will re-enable it on demand when a driver allocates the BAR. Thus, the bit is no longer a reliable indication of capability, and should not be checked. This results in the elimination of a lot of code from drivers, and also gives the opportunity to simplify a lot of drivers to use a helper API to set the busmaster enable bit.
This changes fixes some recent reports of disk controllers and their associated drives/enclosures disappearing during boot.
Submitted by: jhb Reviewed by: jfv, marius, achadd, achim MFC after: 1 day
|
254262 |
12-Aug-2013 |
jfv |
Improve the MSIX setup code in the drivers, thanks to Marius for the changes. Make sure that pci_alloc_msix() does give us the vectors we need and fall back to MSI when it doesn't, also release any that were allocated when insufficient.
MFC after: 3 days
|
254008 |
06-Aug-2013 |
jfv |
Make the various driver MSIX setup routines fallback to MSI more gracefully. This change was suggested by Marius Strobl, thank you.
PR: kern/181016 MFC after: ASAP
|
254002 |
06-Aug-2013 |
jfv |
When the igb driver is static there are cases when early interrupts occur, resulting in a panic in refresh_mbufs, to prevent this add a check in the interrupt handler for DRV_RUNNING.
MFC after: 1 day (critical for 9.2)
|
253303 |
12-Jul-2013 |
jfv |
Change the E1000 driver option header handling to match the ixgbe driver. As it was, when building them as a module INET and INET6 are not defined. In these drivers it does not cause a panic, however it does result in different behavior in the ioctl routine when you are using a module vs static, and I think the behavior should be the same.
MFC after: 3 days
|
250414 |
09-May-2013 |
luigi |
if_lem.c: make sure that lem_rxeof() can drain the entire rx queue irrespective of the setting of lem_rx_process_limit, while giving a chance to the taskqueue scheduler to act after each chunk. This makes lem_rxeof similar to the one in if_em.c and if_igb.c .
if_lem.c and if_em.c: add a sysctl to manually configure the 'itr' moderation register.
Approved by: Jack Vogel
|
250413 |
09-May-2013 |
luigi |
simplify the code to initialize the RDT while in netmap mode.
|
250168 |
02-May-2013 |
eadler |
Update Intel email address.
PR: docs/175349 Submitted by: Lars Eggert <lars@netapp.com> Discussed with: jfv
|
250109 |
30-Apr-2013 |
luigi |
use netmap_rx_irq() and netmap_tx_irq() instead of replicating the logic in the individual driver.
|
250108 |
30-Apr-2013 |
luigi |
use netmap_rx_irq() / netmap_tx_irq() to handle interrupts in netmap mode, removing the logic from individual drivers.
(note: if_lem.c not updated yet due to some other pending modifications)
|
249509 |
15-Apr-2013 |
jfv |
Corrections to the RX checksum code, make sure its disabled as well as enabled when necessary. And simplify the checksum routine itself, adding UDP bit to the test. Thanks to Kevin Lo for pointing out the problems and code suggestions.
|
249339 |
10-Apr-2013 |
jfv |
Simplify allocate_legacy code, txr pointer was breaking LEGACY compile, thanks to Nick Rogers for pointing this out.
|
249074 |
03-Apr-2013 |
jfv |
Correct the multicast handling in the E1000 drivers as was done in ixgbe, thanks to Mike Karels for this fix. When exiting promiscuous mode MPE bit was being unconditionally cleared, this should not be done if we are in MAX multicast groups.
|
249070 |
03-Apr-2013 |
sbruno |
Update man page for igb(4) with a little bit of information about hw.igb.num_queues for those so inclined.
PR: kern/177384 Submitted by: hiren.panchasara@gmail.com Reviewed by: sbruno@ Approved by: jfv@ Obtained from: Yahoo! Inc. MFC after: 2 weeks
|
248908 |
29-Mar-2013 |
jfv |
Change the define in the header to eliminate unnecessary data when using LEGACY TX.
|
248906 |
29-Mar-2013 |
jfv |
Change defines in the igb driver to allow an easier selection of the older if_start/non-multiqueue interface from the stack. This is not the default, but can be turned on in the Makefile now regardless of the OS level to allow either testing or use of ALTQ.
MFC after: one week
|
247064 |
21-Feb-2013 |
jfv |
Refresh on the shared code for the E1000 drivers. - bear with me, there are lots of white space changes, I would not do them, but I am a mere consumer of this stuff and if these drivers are to stay in shape they need to be taken.
em driver changes: support for the new i217/i218 interfaces
igb driver changes: - TX mq start has a quick turnaround to the stack - Link/media handling improvement - When link status changes happen the current flow control state will now be displayed. - A few white space/style changes.
lem driver changes: - the shared code uncovered a bogus write to the RLPML register (which does not exist in this hardware) in the vlan code,this is removed.
|
246482 |
07-Feb-2013 |
rrs |
This fixes a out-of-order problem with several of the newer drivers. The basic problem was that the driver was pulling the mbuf off the drbr ring and then when sending with xmit(), encounting a full transmit ring. Thus the lower layer xmit() function would return an error, and the drivers would then append the data back on to the ring. For TCP this is a horrible scenario sure to bring on a fast-retransmit.
The fix is to use drbr_peek() to pull the data pointer but not remove it from the ring. If it fails then we either call the new drbr_putback or drbr_advance method. Advance moves it forward (we do this sometimes when the xmit() function frees the mbuf). When we succeed we always call advance. The putback will always copy the mbuf back to the top of the ring. Note that the putback *cannot* be used with a drbr_dequeue() only with drbr_peek(). We most of the time, in putback, would not need to copy it back since most likey the mbuf is still the same, but sometimes xmit() functions will change the mbuf via a pullup or other call. So the optimial case for the single consumer is to always copy it back. If we ever do a multiple_consumer (for lagg?) we will need a test and atomic in the put back possibly a seperate putback_mc() in the ring buf.
Reviewed by: jhb@freebsd.org, jlv@freebsd.org
|
246128 |
30-Jan-2013 |
sbz |
Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays
Reviewed by: cognet Approved by: cognet
|
245334 |
12-Jan-2013 |
smh |
Fixed mbuf free when receive structures fail to allocate.
This prevents quad igb card on high core machines, without any nmbcluster or igb queue tuning wedging the boot process if all nics are configured.
Reviewed by: jfv Approved by: pjd (mentor) MFC after: 1 week
|
243857 |
04-Dec-2012 |
glebius |
Mechanically substitute flags from historic mbuf allocator with malloc(9) flags in sys/dev.
|
243570 |
26-Nov-2012 |
glebius |
drbr_enqueue() awlays consumes mbuf, no matter did it fail or not. The mbuf pointer is no longer valid, so can't be reused after.
Fix igb_mq_start() where mbuf pointer was used after drbr_enqueue().
This eventually leads us to all invocations of igb_mq_start_locked() called with third argument as NULL. This allows us to simplify this function.
Submitted by: Karim Fodil-Lemelin <fodillemlinkarim gmail.com> Reviewed by: jfv
|
241917 |
22-Oct-2012 |
eadler |
Now that device disabling is generic, remove extraneous code from the device drivers that used to provide this feature.
This is a subset of 241856 (which was reverted)
Reviewed by: des Approved by: cperciva (implicit) MFC after: 1 week
|
241885 |
22-Oct-2012 |
eadler |
This isn't functionally identical. In some cases a hint to disable unit 0 would in fact disable all units.
This reverts r241856
Approved by: cperciva (implicit)
|
241856 |
22-Oct-2012 |
eadler |
Now that device disabling is generic, remove extraneous code from the device drivers that used to provide this feature.
Reviewed by: des Approved by: cperciva MFC after: 1 week
|
241844 |
22-Oct-2012 |
eadler |
remove duplicate semicolons where possible.
Approved by: cperciva MFC after: 1 week
|
241037 |
28-Sep-2012 |
glebius |
The drbr(9) API appeared to be so unclear, that most drivers in tree used it incorrectly, which lead to inaccurate overrated if_obytes accounting. The drbr(9) used to update ifnet stats on drbr_enqueue(), which is not accurate since enqueuing doesn't imply successful processing by driver. Dequeuing neither mean that. Most drivers also called drbr_stats_update() which did accounting again, leading to doubled if_obytes statistics. And in case of severe transmitting, when a packet could be several times enqueued and dequeued it could have been accounted several times.
o Thus, make drbr(9) API thinner. Now drbr(9) merely chooses between ALTQ queueing or buf_ring(9) queueing. - It doesn't touch the buf_ring stats any more. - It doesn't touch ifnet stats anymore. - drbr_stats_update() no longer exists.
o buf_ring(9) handles its stats itself: - It handles br_drops itself. - br_prod_bytes stats are dropped. Rationale: no one ever reads them but update of a common counter on every packet negatively affects performance due to excessive cache invalidation. - buf_ring_enqueue_bytes() reduced to buf_ring_enqueue(), since we no longer account bytes.
o Drivers handle their stats theirselves: if_obytes, if_omcasts.
o mlx4(4), igb(4), em(4), vxge(4), oce(4) and ixv(4) no longer use drbr_stats_update(), and update ifnet stats theirselves.
o bxe(4) was the most correct driver, it didn't call drbr_stats_update(), thus it was the only driver accurate under moderate load. Now it also maintains stats itself.
o ixgbe(4) had already taken stats from hardware, so just - drop software stats updating. - take multicast packet count from hardware as well.
o mxge(4) just no longer needs NO_SLOW_STATS define.
o cxgb(4), cxgbe(4) need no change, since they obtain stats from hardware.
Reviewed by: jfv, gnn
|
240968 |
26-Sep-2012 |
jhb |
Merge similar fixes from 223198 from igb to ixgbe: - Use a dedicated task to handle deferred transmits from the if_transmit method instead of reusing the existing per-queue interrupt task. Reusing the per-queue interrupt task could result in both an interrupt thread and the taskqueue thread trying to handle received packets on a single queue resulting in out-of-order packet processing and lock contention. - Don't define ixgbe_start() at all where if_transmit is used.
Tested by: Vijay Singh Reviewed by: jfv MFC after: 2 weeks
|
240879 |
23-Sep-2012 |
sbruno |
This patch fixes a nit in the em, lem, and igb driver statistics. Increment adapter->dropped_pkts instead of if_ierrors because if_ierrors is overwritten by hw stats collection.
Submitted by: Andrew Boyer <aboyer@averesystems.com> Reviewed by: Jack F Vogel <jfv@freebsd.org> MFC after: 2 weeks
|
240693 |
19-Sep-2012 |
gavin |
Switch some PCI register reads from using magic numbers to using the names defined in pcireg.h
MFC after: 1 week
|
240680 |
18-Sep-2012 |
gavin |
Align the PCI Express #defines with the style used for the PCI-X #defines. This also has the advantage that it makes the names more compact, iand also allows us to correct the non-uniform naming of the PCIM_LINK_* defines, making them all consistent amongst themselves.
This is a mostly mechanical rename: s/PCIR_EXPRESS_/PCIER_/g s/PCIM_EXP_/PCIEM_/g s/PCIM_LINK_/PCIEM_LINK_/g
When this is MFC'd, #defines will be added for the old names to assist out-of-tree drivers.
Discussed with: jhb MFC after: 1 week
|
240518 |
14-Sep-2012 |
eadler |
Correct double "the the"
Approved by: cperciva MFC after: 3 days
|
239304 |
15-Aug-2012 |
jfv |
Customer report of a panic on boot due to the old "m_getjcl:invalid cluster type" that occurred some time back with the igb driver. This happens often when booting over the net. I believe the NIC hardware is left in a warm state when handed over to the driver, and a stray RX interrupt happens earlier than the code is prepared for it to happen. This change was verified to fix the problem, its kind of a bandaid... but it is similar to what was done in the igb code.
|
239109 |
06-Aug-2012 |
jfv |
Make the polling interface in igb able to handle multiqueue, and correct the rxdone handling. Update the polling man page to include igb as well.
Thanks to Mark Johnston for these changes.
|
239105 |
06-Aug-2012 |
jfv |
Correct the mq_start routine to avoid out-of-order packet delivery, always enqueue when possible. Also correct the DEPLETED test as multiple bits might be set. Thanks to Randall Stewart for the changes!
|
238981 |
02-Aug-2012 |
sbruno |
CPU_NEXT() already handles wrapping around to the beginning. Also, in a system with sparse CPU IDs, you can have a valid CPU ID > mp_ncpus (e.g. if you have two CPUs 0 and 4, with mp_maxid == 4 and mp_ncpus == 2).
Introduced at svn r235210
Submitted by: jhb@ Reviewed by: jfv@
|
238953 |
31-Jul-2012 |
jfv |
Clean up some unused leftover code from em Make IRQ style a tuneable Fix lock handling in the interrupt handler
MFC after:3 days
|
238770 |
25-Jul-2012 |
luigi |
remove some extra testing code that slipped into the previous commit
Reported-by: Alexander Motin
|
238765 |
25-Jul-2012 |
luigi |
Use legacy interrupts as a default. This gives up to 10% speedup when used in qemu (and this driver is for non-PCIe cards, so probably its largest use is in virtualized environments).
Approved by: Jack Vogel MFC after: 3 days
|
238214 |
07-Jul-2012 |
jfv |
Change the interface to the Energy Efficient Ethernet (EEE) setting in the igb and em driver. This was necessitated by a shared code change that I was given late in the game, a data type changed from bool to int, in the last update I dealt with it by a cast, but it was pointed out (thanks jhb) that there was a potential problem with this. John suggested this safer approach, and it is fine with me...
MFC after:2 days (to catch the 9.1 update)
|
238151 |
05-Jul-2012 |
jfv |
Correct small regressions pointed out by jhb, thanks John.
MFC after:5 days
|
238148 |
05-Jul-2012 |
jfv |
Sync with Intel internal source: shared code update and small changes in core required Add support for new i210/i211 devices Improve queue calculation based on mac type
MFC after:5 days
|
236406 |
01-Jun-2012 |
jhb |
Commit a portion of 233708 I missed earlier and don't include the definition of igb_start() and igb_start_locked() (nor set if_start in the ifnet) when igb(4) uses if_transmit.
|
235256 |
11-May-2012 |
kevlo |
Initialize "error" to zero when it's declared in em_setup_receive_ring()
|
235210 |
10-May-2012 |
sbruno |
Modify the binding of queues to attach to as many CPUs as possible when using more than one igb(4) adapter. This means that queues will not be bound to the same CPUs if there are more CPUs availble.
This is only applicable to a system that has multiple interfaces.
Obtained from: Yahoo! Inc. MFC after: 3 days
|
234665 |
25-Apr-2012 |
emaste |
Fix cut-and-paste comment error
Submitted by: sbruno
|
234154 |
11-Apr-2012 |
jhb |
Reapply r223198 which was reverted in the previous vendor import. Some portions were already reapplied in r233708: - Use a dedicated task to handle deferred transmits from the if_transmit method instead of reusing the existing per-queue interrupt task. Reusing the per-queue interrupt task could result in both an interrupt thread and the taskqueue thread trying to handle received packets on a single queue resulting in out-of-order packet processing. - Call ether_ifdetach() earlier in igb_detach(). - Drain tasks and free taskqueues during igb_detach().
MFC after: 1 week
|
233708 |
30-Mar-2012 |
jhb |
Fix a few issues with transmit handling in em(4) and igb(4): - Do not define the foo_start() methods or set if_start in the ifnet if multiq transmit is enabled. Also, set if_transmit and if_qflush before ether_ifattach rather than after when multiq transmit is enabled. This helps to ensure that the drivers never try to mix different transmit methods. - Properly restart transmit during resume. igb(4) was not restarting it at all, and em(4) was restarting even if the link was down and was calling the wrong method if multiq transmit was enabled. - Remove all the 'more' handling for transmit completions. Transmit completion processing does not have a processing limit, so it always runs to completion and never has more work to do when it returns. Instead, the previous code was returning 'true' anytime there were packets in the queue that weren't still in the process of being transmitted. The effect was that the driver would continuously reschedule a task to process TX completions in effect running at 100% CPU polling the hardware until it finished transmitting all of the packets in the ring. Now it will just wait for the next TX completion interrupt. - Restart packet transmission when the link becomes active. - Fix the MSI-X queue interrupt handlers to restart packet transmission if there are pending packets in the relevant software queue (IFQ or buf_ring) after processing TX completions. This is the root cause for the OACTIVE hangs as if the MSI-X queue handler drained all the pending packets from the TX ring, nothing would ever restart it. As such, remove some previously-added workarounds to reschedule a task to poll the TX ring anytime OACTIVE was set.
Tested by: sbruno Reviewed by: jfv MFC after: 1 week
|
233423 |
24-Mar-2012 |
marius |
Initialize the mutexes used for the NVM and the swflag as MTX_DUPOK in order to avoid otherwise harmless witness warnings when these are acquired at the same time and due to both using MTX_NETWORK_LOCK as their type. The right fix actually would be to use different, descriptive types for these. However, the latter would require undesirable changes to the shared code base. Another approach would be to just supply NULL as the type, which was deemed as less desirable though as it would cause the unique but cryptic name also to be used for the type and to diverge from the type used by other network device drivers.
MFC after: 1 week
|
232367 |
01-Mar-2012 |
jhb |
Properly handle failures in igb_setup_msix() by returning 0 if MSI or MSI-X allocation fails.
Reviewed by: jfv MFC after: 2 weeks
|
232238 |
27-Feb-2012 |
luigi |
A bunch of netmap fixes:
USERSPACE: 1. add support for devices with different number of rx and tx queues;
2. add better support for zero-copy operation, adding an extra field to the netmap ring to indicate how many buffers we have already processed but not yet released (with help from Eddie Kohler);
3. The two changes above unfortunately require an API change, so while at it add a version field and some spares to the ioctl() argument to help detect mismatches.
4. update the manual page for the two changes above;
5. update sample applications in tools/tools/netmap
KERNEL:
1. simplify the internal structures moving the global wait queues to the 'struct netmap_adapter';
2. simplify the functions that map kring<->nic ring indexes
3. normalize device-specific code, helps mainteinance;
4. start exploring the impact of micro-optimizations (prefetch etc.) in the ixgbe driver. Use 'legacy' descriptors on the tx ring and prefetch slots gives about 20% speedup at 900 MHz. Another 7-10% would come from removing the explict calls to bus_dmamap* in the core (they are effectively NOPs in this case, but it takes expensive load of the per-buffer dma maps to figure out that they are all NULL.
Rx performance not investigated.
I am postponing the MFC so i can import a few more improvements before merging.
|
231796 |
15-Feb-2012 |
luigi |
(This commit only touches code within the DEV_NETMAP blocks)
Introduce some functions to map NIC ring indexes into netmap ring indexes and vice versa. This way we can implement the bound checks only in one place (and hopefully in a correct way).
On passing, make the code and comments more uniform across the various drivers.
|
230742 |
29-Jan-2012 |
eadler |
GS105v3 exhibit the same behavior
PR: docs/135999 Submitted by: Boris Kochergin <spawky@acm.poly.edu> No objection from: jfv Approved by: cperciva MFC after: 3 days
|
230024 |
12-Jan-2012 |
luigi |
clear the pointer after freeing the mbuf. Without that, we risk a double free if the subsequent mbuf allocation fails. This bug is not netmap-related and was introduced in rev. 228387
|
230023 |
12-Jan-2012 |
luigi |
fix the initialization of the rings when netmap is used, to adapt it to the changes in 228387 . Now the code is similar to the one used in other drivers. Not applicable to stable/9 and stable/8
|
229939 |
10-Jan-2012 |
luigi |
small code cleanup in preparation for future modifications in the memory allocator used by netmap. No functional change, two small bug fixes: - in if_re.c add a missing bus_dmamap_sync() - in netmap.c comment out a spurious free() in an error handling block
|
229767 |
07-Jan-2012 |
kevlo |
ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again
Reviewed by: yongari
|
229606 |
05-Jan-2012 |
rwatson |
When extracting the VLAN tag from if_em and if_lem receive descriptor rings, copy the whole VLAN tag, not just the VLAN ID. This fixes a problem in which VLAN priority information was dropped when using offloaded VLAN processing with these drivers.
Discussed with: jfv, rrs Sponsored by: ADARA Networks, Inc. MFC after: 3 days
|
228803 |
22-Dec-2011 |
luigi |
put back netmap support, deleted by mistake in a previous commit
|
228788 |
21-Dec-2011 |
jhb |
Restore the sysctl changes from 223676 and 227309 lost in the previous import: - Add read-only sysctls for all of the tunables supported by the igb and em drivers. - Make the per-instance 'enable_aim' sysctl truly per-instance by having it change a per-instance variable (which is used to control AIM) rather than having all of the per-instance sysctls operate on a single global variable.
While here, restore the previously existing hw.igb.rx_processing_limit tunable as it is very useful to be able to set a default tunable that applies to all adapters in the system.
|
228441 |
12-Dec-2011 |
mdf |
Consistently use types in e1000 driver code:
- Two struct members eee_disable are used in a function that expects an int *, so declare them int, not bool. - igb_tx_ctx_setup() returns a boolean value, so declare it bool, not int. - igb_header_split is passed to TUNABLE_INT, so delcare it int, not bool. - igb_tso_setup() returns a bool, so declare it bool, not boolean_t. - Do not re-define bool/true/false if the symbols already exist.
MFC after: 2 weeks Sponsored by: Isilon Systems, LLC
|
228415 |
11-Dec-2011 |
jfv |
Last change still had an issue, one more time...
|
228405 |
11-Dec-2011 |
jfv |
Correct LINT build issues in the ioctl code.
|
228393 |
10-Dec-2011 |
jfv |
Fix NETMAP code problem in the build.
|
228387 |
10-Dec-2011 |
jfv |
Part 2 of 2 New deltas for the 1G drivers.
There have still been intermittent problems with apparent TX hangs for some customers. These have been problematic to reproduce but I believe these changes will address them. Testing on a number of fronts have been positive.
EM: there is an important 'chicken bit' fix for 82574 in the shared code this is supported in the core here. - The TX path has been tightened up to improve performance. In particular UDP with jumbo frames was having problems, and the changes here have improved that. - OACTIVE has been used more carefully on the theory that some hangs may be due to a problem in this interaction - Problems with the RX init code, the "lazy" allocation and ring initialization has been found to cause problems in some newer client systems, and as it really is not that big a win (its not in a hot path) it seems best to remove it. - HWTSO was broken when VLAN HWTAGGING or HWFILTER is used, I found this was due to an error in setting up the descriptors in em_xmit.
IGB: - TX is also improved here. With multiqueue I realized its very important to handle OACTIVE only under the CORE lock so there are no races between the queues. - Flow Control handling was broken in a couple ways, I have changed and I hope improved that in this delta. - UDP also had a problem in the TX path here, it was change to improve that. - On some hardware, with the driver static, a weird stray interrupt seems to sometimes fire and cause a panic in the RX mbuf refresh code. This is addressed by setting interrupts late in the init path, and also to set all interrupts bits off at the start of that.
|
228386 |
10-Dec-2011 |
jfv |
Part 1 of two parts, this is the shared code changes in support of new deltas for both em and igb drivers.
Note that I am not able to track all the bugs fixed in this code, I am a consumer of it as a component of my core drivers. It is important to keep the FreeBSD drivers up to date with it however.
One important note is there is a key fix for 82574 in this update. Also, there are lots of white space changes, I am not happy about them but have no control over it :)
|
228281 |
05-Dec-2011 |
luigi |
add netmap support for "em", "lem", "igb" and "re".
On my hardware, "em" in netmap mode does about 1.388 Mpps on one card (on an Asus motherboard), and 1.1 Mpps on another card (PCIe bus). Both seem to be NIC-limited, because i have the same rate even with the CPU running at 150 MHz.
On the "re" driver the tx throughput is around 420-450 Kpps on various (8111C and the like) chipsets. On the Rx side performance seems much better, and i can receive the full load generated by the "em" cards.
"igb" is untested as i don't have the hardware.
|
227309 |
07-Nov-2011 |
ed |
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.
The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
|
226436 |
16-Oct-2011 |
eadler |
- change "is is" to "is" or "it is" - change "the the" to "the"
Approved by: lstewart Approved by: sahil (mentor) MFC after: 3 days
|
225640 |
17-Sep-2011 |
rstone |
Clear transmit checksum offload context state upon lem(4) interface initialization. Prior to this change packets may be transmitted with an incorrect checksum.
Em(4) already has an equivalent change in r213234.
Obtained From: Sandvine MFC After: 1 week Approved by: re (bz)
|
223831 |
07-Jul-2011 |
jfv |
A fix to make the LINT-NOINET build happy, if this works out the ixgbe driver should be changed as well.
|
223676 |
29-Jun-2011 |
jhb |
- Add read-only sysctls for all of the tunables supported by the igb and em drivers. - Make the per-instance 'enable_aim' sysctl truly per-instance by having it change a per-instance variable (which is used to control AIM) rather than having all of the per-instance sysctls operate on a single global variable.
Reviewed by: jfv (earlier version) MFC after: 1 week
|
223482 |
23-Jun-2011 |
jfv |
Put back the global for rx processing due to popular demand.
|
223350 |
20-Jun-2011 |
jfv |
Eliminate some global tuneables in favor of adapter-specific, particular flow control and dma coalesce. Also improve the sysctl operation on those too.
Add IPv6 detection in the ioctl code, this was done for ixgbe first, carrying that over.
Add resource ability to disable particular adapter.
Add HW TSO capability so vlans can make use of TSO
|
223198 |
17-Jun-2011 |
jhb |
- Use a dedicated task to handle deferred transmits from the if_transmit method instead of reusing the existing per-queue interrupt task. Reusing the per-queue interrupt task could result in both an interrupt thread and the taskqueue thread trying to handle received packets on a single queue resulting in out-of-order packet processing. - Don't define igb_start() at all on 8.0 and where if_transmit is used. Replace last remaining call to igb_start() with a loop to kick off transmit on each queue instead. - Call ether_ifdetach() earlier in igb_detach(). - Drain tasks and free taskqueues during igb_detach().
Reviewed by: jfv MFC after: 1 week
|
221505 |
05-May-2011 |
jfv |
Add an initialization to the error variable, without this there is a rare return path that bogusly appears to fail when it should not. Also white space correction.
Thanks to Arnaud Lacombe for noticing the problem.
|
221187 |
28-Apr-2011 |
jfv |
Small change to make backporting to stable/7, thanks to Arnaud Lacombe for suggesting it.
|
220375 |
05-Apr-2011 |
jfv |
Important update for the igb driver: - Add the change made in em to the actual unrefreshed number of descriptors is used as a basis in rxeof on the way out to determine if more refresh is needed. NOTE: there is a difference in the ring setup in igb, this is not accidental, it is necessitated by hardware behavior, when you reset the newer adapters it will not let you write RDH, it ALWAYS sets it to 0. Thus the way em does it is not possible. - Change the sysctl handling of flow control, it will now make the change dynamically when the variable setting changes rather than requiring a reset. - Change the eee sysctl naming, validation found the old unintuitive :) - Last but not least, some important performance tweaks in the TX path, I found that UDP behavior could be drastically hindered or improved with just small changes in the start loop. What I have here is what testing has shown to be the best overall. Its interesting to note that changing the clean threshold to start at a full half of the ring, made a BIG difference in performance. I hope that this will prove to be advantageous for most workloads.
MFC in a week.
|
220254 |
01-Apr-2011 |
jfv |
Fix to an error condition case, when an mbuf chain get's defragged due to a mapping failure the header pointers will be invalidated and can result in a TSO or other failure down the line. So, when the remapping occurs force a retry thru the offload calculation code. Thanks to Andrew Boyer for discovering this and cooking up the fix!!
|
220251 |
01-Apr-2011 |
jfv |
Change the refresh_mbuf logic slightly, add an inline to calculate the outstanding descriptors that need to be refreshed at any time, and use THAT in rxeof to determine if refreshing needs to be done. Also change the local_timer to simply fire off the appropriate interrupt rather than schedule a tasklet, its simpler.
MFC in two weeks
|
219902 |
23-Mar-2011 |
jhb |
Do a sweep of the tree replacing calls to pci_find_extcap() with calls to pci_find_cap() instead.
|
219764 |
19-Mar-2011 |
jfv |
A cut and paste here was wrong also.
|
219763 |
19-Mar-2011 |
jfv |
Correct broken define
|
219753 |
18-Mar-2011 |
jfv |
This delta updates the em driver to version 7.2.2 which has been undergoing test for some weeks. This improves the RX mbuf handling to avoid system hang due to depletion. Thanks to all those who have been testing the code, and to Beezar Liu for the design changes.
Next the igb driver is updated for similar RX changes, but also to add new features support for our upcoming i350 family of adapters.
MFC after a week
|
218909 |
21-Feb-2011 |
brucec |
Fix typos - remove duplicate "the".
PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
|
218588 |
12-Feb-2011 |
jfv |
Fix the shared code to be consistent with Intel-internal, and now build.
|
218587 |
11-Feb-2011 |
dougb |
Restore 2 prototypes that seem to have been mistakenly removed in r218582.
I've manually twiddled the whitespace for e1000_commit_fc_settings_generic to match the others in the file.
Submitted by: dim Tested by: me
|
218583 |
11-Feb-2011 |
jfv |
Somehow the RX ring depletion fix got partially removed, replace the missing pieces.
|
218582 |
11-Feb-2011 |
jfv |
Revert changes made here, they will cause a conflict later on with our shared code.
|
218581 |
11-Feb-2011 |
jfv |
Inconsistencies in the updated igb shared code and the older em/lem, breaking the build, correcting that.
|
218548 |
11-Feb-2011 |
bz |
After r218530 export several functions which are no longer private to e1000_mac.c but part of the e1000_api.
X-MFC with: 218530 by jfv
|
218530 |
11-Feb-2011 |
jfv |
Add support for the new I350 family of 1G interfaces. - this also includes virtualization support on these devices
Correct some vlan issues we were seeing in test, jumbo frames on vlans did not work correctly, this was all due to confused logic around HW filters, the new code should now work for all uses.
Important fix: when mbuf resources are depeleted, it was possible to completely empty the RX ring, and then the RX engine would stall forever. This is fixed by a flag being set whenever the refresh code fails due to an mbuf shortage, also the local timer now makes sure that all queues get an interrupt when it runs, the interrupt code will then always call rxeof, and in that routine the first thing done is now to check the refresh flag and call refresh_mbufs. This has been verified to fix this type 'hang'. Similar code will follow in the other drivers.
Finally, sync up shared code for the I350 support.
Thanks to everyone that has been reporting issues, and helping in the debug/test process!!
|
217591 |
19-Jan-2011 |
jfv |
Fix for kern/152853, pullup at the wrong point is breaking UDP. Thanks to Petr Lampa for the patch.
|
217556 |
18-Jan-2011 |
mdf |
Specify a CTLTYPE_FOO so that a future sysctl(8) change does not need to rely on the format string.
|
217318 |
12-Jan-2011 |
mdf |
sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.
Commit the Intel drivers.
|
217295 |
12-Jan-2011 |
jfv |
A couple problems discovered by Andrew Boyer: - failure code in em_xmit got mangled along the way and was not properly handling errors. - local timer code had a leftover UNLOCK call that should be removed.
MFC after 3 days
|
216176 |
04-Dec-2010 |
jfv |
Correct build error.
|
216173 |
04-Dec-2010 |
jfv |
Remove the bogus test in the TX context setup for IPV6, the size can be smaller than the constant when you are doing HW TAGGING, and you still need to process this packet in a normal way. I'm not sure where the notion to just return came from, but its wrong.
MFC after: 3 days
|
216172 |
04-Dec-2010 |
jfv |
Small cut and paste bug in flow control string fixed. Second, correct the discard/refresh_mbufs code to behave more like igb, there have been panics due to discards and this should fix them.
MFC after: 3 days
|
215910 |
26-Nov-2010 |
jfv |
Unwanted extra call to set_vlan_hw added back by mistake.
|
215808 |
24-Nov-2010 |
jfv |
The purpose of this change is to add a routine to disable ASPM L0S and L1 LINK states on 82573, 82574, and 82583. The theory is that this is behind certain hangs being experienced by some customers.
Also included a small optimization in the rxeof routine that was in my internal code.
Change the PBA size for pchlan, it was incorrect.
MFC after: 3 days
|
215789 |
24-Nov-2010 |
jfv |
Add shared code glue for new 82580 devices.
|
215781 |
23-Nov-2010 |
jfv |
- New 82580 devices supported - Fixes from John Baldwin: vlan shadow tables made per/interface, make vlan hw setup only happen when capability enabled, and finally, make a tuneable interrupt rate. Thanks John! - Tweaked watchdog handling to avoid any false positives, now detection is in the TX clean path, with only the final check and init happening in the local timer. - limit queues to 8 for all devices, with 82576 or 82580 on larger machines it can get greater than this, and it seems mostly a resource waste to do so. Even 8 might be high but it can be manually reduced. - use 2k, 4k and now 9k clusters based on the MTU size. - rework the igb_refresh_mbuf() code, its important to make sure the descriptor is rewritten even when reusing mbufs since writeback clobbers things.
MFC: in a few days, this delta needs to get to 8.2
|
214646 |
01-Nov-2010 |
jfv |
Sync the lem code up with the vlan and other fixes in em. Delete a unneeded test from the beginning of em_xmit. CRITICAL: shared code fix for 82574, a mutex might not be released, this can cause hangs.
|
214441 |
28-Oct-2010 |
jfv |
In the data setup code for doing offloads the ip and tcp pointers were not reset after some pullups. In practice this led to an NFS mount failure when using UDP reported by Kevin Lo, thanks Kevin. Fix from yongari, thank you!
|
214363 |
26-Oct-2010 |
jfv |
Bug fix delta to the em driver: - Chasin down bogus watchdogs has led to an improved design to this handling, the hang decision takes place in the tx cleanup, with only a simple report check in local_timer. Our tests have shown no false watchdogs with this code. - VLAN fixes from jhb, the shadow vfta should be per interface, but as global it was not. Thanks John. - Bug fixes in the support for new PCH2 hardware. - Thanks for all the help and feedback on the driver, changes to lem with be coming shortly as well.
|
213234 |
28-Sep-2010 |
jfv |
Update code from Intel: - Sync shared code with Intel internal - New client chipset support added - em driver - fixes to 82574, limit queues to 1 but use MSIX - em driver - large changes in TX checksum offload and tso code, thanks to yongari. - some small changes for watchdog issues. - igb driver - local timer watchdog code was missing locking this and a couple other watchdog related fixes. - bug in rx discard found by Andrew Boyer, check for null pointer
MFC: a week
|
212902 |
20-Sep-2010 |
jhb |
Tweak the stats exported by the e1000 drivers: - Add a single sysctl procedure to all three drivers to read an arbitrary register (the register is passed as arg2). Use it to replace existing routines in igb(4) that used a separate routine for each register, and to add support for missing stats in em(4) and lem(4). - Move the 'rx_overruns' and 'watchdog_timeouts' stats out of the MAC stats section as they are driver stats, not MAC counters. - Simplify the code that creates per-queue stats in igb(4) to use a single loop and remove duplicated code. - Properly read all 64 bits of the 'good octets received/transmitted' in em(4) and lem(4). - Actually read the interrupt count registers in em(4), and drop the 'host to card' sysctl stats from em(4) as they are not implemented in any of the hardware this driver supports. - Restore several stats to em(4) that were lost in the earlier stats conversion including per-queue stats. - Export several MAC stats in em(4) that were exported in igb(4) but not in em(4). - Export stats in lem(4) using individual sysctls as in em(4) and igb(4).
Reviewed by: jfv MFC after: 1 week
|
212304 |
07-Sep-2010 |
jfv |
Code correction in refresh_mbufs, just continuing without index recalc was wrong.
|
212303 |
07-Sep-2010 |
jfv |
Tighten up the rx mbuf refresh code, there were some discrepencies from the igb version which was the target.
Change the message when neither MSI or MSIX are enabled and a fallback to Legacy interrupts happen, the existing message was confusing.
|
211913 |
28-Aug-2010 |
yongari |
Do not allocate multicast array memory in multicast filter configuration function. For failed memory allocations, em(4)/lem(4) called panic(9) which is not acceptable on production box. igb(4)/ixgb(4)/ix(4) allocated the required memory in stack which consumed 768 bytes of stack memory which looks too big.
To address these issues, allocate multicast array memory in device attach time and make multicast configuration success under any conditions. This change also removes the excessive use of memory in stack.
Reviewed by: jfv
|
211909 |
28-Aug-2010 |
yongari |
If em(4) failed to allocate RX buffers, do not call panic(9). Just showing some buffer allocation error is more appropriate action for drivers. This should fix occasional panic reported on em(4) when driver encountered resource shortage.
Reviewed by: jfv
|
211907 |
28-Aug-2010 |
yongari |
Do not call voluntary panic(9) in case of if_alloc() failure.
Reviewed by: jfv
|
211906 |
28-Aug-2010 |
yongari |
Make sure not to access unallocated stats memory.
Reviewed by: jfv
|
211516 |
19-Aug-2010 |
jfv |
Eliminate the ambiguous queue setting logic for the VF, it made it possible to have 2 queues which we don't want, the HOST is unable to handle it.
|
210968 |
06-Aug-2010 |
jfv |
Put the early setting of the MAC type back, its removal resulted in broken code in MSIX setup.
|
210569 |
28-Jul-2010 |
mdf |
Fix clang warning on empty statement.
Reviewed by: rdivacky, zml Approved by: zml (mentor)
|
210452 |
24-Jul-2010 |
gnn |
style(9) fix
MFC after: 1 week
|
210428 |
23-Jul-2010 |
gnn |
Fix a bug in the statistics code for tracking the head and tail pointers of the tx and rx queues. We needed a SYSCTL_PROC to correctly get the values at run time.
Submitted by: Andrew Boyer aboyer at averesystems.com MFC after: 1 week
|
209959 |
12-Jul-2010 |
jfv |
Fix for a panic when TX checksum offload is done and a packet has only a header in the first mbuf, the checksum code will dereference a pointer into the non-existing IP header. Do a check for the size and pullup if needed. Thanks to Michael Tuexen for this fix.
MFC: asap - should be in 8.1 IMHO
|
209859 |
09-Jul-2010 |
jfv |
Fix of a VLAN problem by jhb, the checksum capability got lost along the way.
MFC: asap
|
209616 |
30-Jun-2010 |
jfv |
OK, I was a bit sleep this morning and checked in the core changes but left out the shared code, lol. Well, and a couple fixes to the core... hopefully this will all be complete now.
Happy happy joy joy :)
|
209611 |
30-Jun-2010 |
jfv |
SR-IOV support added to igb
What this provides is support for the 'virtual function' interface that a FreeBSD VM may be assigned from a host like KVM on Linux, or newer versions of Xen with such support.
When the guest is set up with the capability, a special limited function 82576 PCI device is present in its virtual PCI space, so with this driver installed in the guest that device will be detected and function nearly like the bare metal, as it were.
The interface is only allowed a single queue in this configuration however initial performance tests have looked very good.
Enjoy!!
|
209512 |
24-Jun-2010 |
gnn |
Make sure that all the exposed counters and variables are actually being updated.
Pointed out by: jfv
|
209259 |
17-Jun-2010 |
jfv |
Two stats were duplicated, thanks to Andrew Boyer for pointing this out.
|
209242 |
16-Jun-2010 |
gnn |
Move statistics into the sysctl tree making it easier to find and use them. Add previously hidden statistics, some of which include interrupt and host/card communication counters.
|
209241 |
16-Jun-2010 |
gnn |
Move statistics into the sysctl tree making it easier to find and use them. Add previously hidden statistics, some of which include interrupt and host/card communication counters.
|
209238 |
16-Jun-2010 |
jfv |
Changes from John Baldwin adding to last commit, change rxeof api for poll friendliness, and eliminate unnecessary link tasklet use. Thanks John!
|
209218 |
15-Jun-2010 |
jfv |
Change to have legacy interrupts use the same handler had a flaw, thanks to John Baldwin for finding it. Change which queue legacy tasks are enqueued on.
MFC: soonest
|
209071 |
11-Jun-2010 |
jfv |
Put back the lost bus_describe_intr() calls.
|
209068 |
11-Jun-2010 |
jfv |
Add a couple fixes from Michael Tuexen. Remove unneeded rxtx handler, make que handler generic. Do not allocate header mbufs in rx ring if not doing hdr split. Release the lock in rxeof call to stack.
MFC for 8.1 asap
|
208362 |
20-May-2010 |
jhb |
Restore part of 200671 which was lost in previous driver changes: - Add interrupt descriptions when using mulitple MSI-X interrupts.
|
208117 |
15-May-2010 |
marius |
Fix a mismerge in r206001.
PR: 146614 Approved by: jfv (implicit) MFC afer: 3 days
|
208103 |
14-May-2010 |
jfv |
Small changes preparing for MFC, need to conditionalize the buf_ring_free call, and lem is missing the WOL change put into em.
|
207337 |
28-Apr-2010 |
jfv |
Address the LOD that some are seeing, put the RX lock back in rxeof (I could see little point in taking it out), and now release it before the stack entry.
Also, make it so the 82574 does not configure for multiqueue when its not used in the stack.
|
207331 |
28-Apr-2010 |
jfv |
Change default WOL back to MAGIC only, having multicast enabled causes problems in man environments.
|
206629 |
14-Apr-2010 |
jfv |
Add a missing fragment in the tx msix handler to invoke another if all work is not done.
Sync the igb driver with changes suggested by yongari and made in em, these made sense to be in both drivers.
|
206614 |
14-Apr-2010 |
jfv |
Remove multiqueue stack related stuff form lem, it is unneeded for legacy hardware. Also remove some TSO related cruft. Add some watchdog_time setting that was missing, thanks to Mikolaj Golub for pointing that out.
|
206460 |
10-Apr-2010 |
jfv |
The lock move in rxeof necessitated a couple more places to do the locking, fixes a panic.
|
206447 |
10-Apr-2010 |
jfv |
Correct broken build.
|
206437 |
09-Apr-2010 |
jfv |
A few more changes from yongari: - code flow in handler could let interrupt be reenabled when not wanted. - change where the RX lock is taken to improve performance. - adapter->msix is true for MSI systems also, it needs to explicitly test for 82574, good one :)
|
206431 |
09-Apr-2010 |
jfv |
DUH, must be tired, I missed the second instance... time for the weekend :)
|
206430 |
09-Apr-2010 |
jfv |
Thanks to Michael Tuexen for catching this, bit set that keeps the clock from being reset when writing to EITR was incorrect, also there is a shared code #define for it anyway.
|
206429 |
09-Apr-2010 |
jfv |
Incorporate suggested improvements from yongari.
Also, from feedback, make the multiqueue code an option (EM_MULTIQUEUE) that is off by default. Problems have been seen with UDP when its on.
|
206403 |
08-Apr-2010 |
jfv |
Three changes: - add CRC stripping to the RX side, this was handled by some obscure code in rxeof previously, its easier to simply have the hardware strip it now. - Add back an ALTQ change that slipped between the cracks - Add an update to the watchdog_time in the xmit code, not doing this in ixgbe caused problems, think its needed here as well.
|
206388 |
08-Apr-2010 |
jfv |
Important fix got clobbered in the em driver, keeping VLAN HWFILTER from being used by default, this breaks stacked pseudo devices, and as it turns out, also breaks virtual machines that happen to use VLANS (didn't know that before :). Put the fix back into the em driver, and for good measure add the same code to the igb driver where it should have been anyway.
|
206023 |
31-Mar-2010 |
jfv |
The POLL code was missed in the queue conversion, change the argument type to igb_rxeof() to the correct type. Note, any users of POLLING must be sure and set the number of queues to 1 for things to work correctly.
|
206001 |
31-Mar-2010 |
marius |
Hook the identification LEDs of igb(4), lem(4) and em(4) devices up with led(4) so they can be lit or f.e. made blink via `echo f2 > /dev/led/em0` for localization purposes.
Approved by: jfv MFC afer: 1 week (after r205869)
|
205987 |
31-Mar-2010 |
jfv |
Fix poll handler declaration.
|
205884 |
30-Mar-2010 |
jfv |
Fix lint build problem.
|
205869 |
29-Mar-2010 |
jfv |
Update to igb and em:
em revision 7.0.0: - Using driver devclass, seperate legacy (pre-pcie) code into a seperate source file. This will at least help protect against regression issues. It compiles along with em, and is transparent to end use, devices in each appear to be 'emX'. When using em in a modular form this also allows the legacy stuff to be defined out. - Add tx and rx rings as in igb, in the 82574 this becomes actual multiqueue for the first time (2 queues) while in other PCIE adapters its just make code cleaner. - Add RX mbuf handling logic that matches igb, this will eliminate packet drops due to temporary mbuf shortage.
igb revision 1.9.3: - Following the ixgbe code, use a new approach in what was called 'get_buf', the routine now has been made independent of rxeof, it now does the update to the engine TDT register, this design allows temporary mbuf resources to become non-critical, not requiring a packet to be discarded, instead it just returns and does not increment the tail pointer. - With the above change it was also unnecessary to keep 'spare' maps around, since we do not have the discard issue. - Performance tweaks and improvements to the code also.
MFC in a week
|
203834 |
13-Feb-2010 |
mlaier |
Fix drbr and altq interaction: - introduce drbr_needs_enqueue that returns whether the interface/br needs an enqueue operation: returns true if altq is enabled or there are already packets in the ring (as we need to maintain packet order) - update all drbr consumers - fix drbr_flush - avoid using the driver queue (IFQ_DRV_*) in the altq case as the multiqueue consumer does not provide enough protection, serialize altq interaction with the main queue lock - make drbr_dequeue_cond work with altq
Discussed with: kmacy, yongari, jfv MFC after: 4 weeks
|
203354 |
01-Feb-2010 |
jfv |
A few minor changes: add altq option header, add missing conditional around a buf_ring call that will break 7.3, and thanks to Fabien Thomas add POLLING support for igb and a minor related fix in the em driver.
|
203179 |
30-Jan-2010 |
jfv |
Fix for kern/141646: when stacking pseudo drivers like lagg and vlan the vlan attach/detach event is not being handed down to em, this caused some init code not to run, and thus VLANs did not work. Ultimately having the event get propagated would be nice, but for now the solution is to have HWFILTER off by default, when this is the case VLANs will work, ifconfig can be used to turn it on and then get HW tag filtering.
|
203090 |
27-Jan-2010 |
jfv |
Add a link tasklet so updates can be sleepable.
|
203083 |
27-Jan-2010 |
jfv |
Two more build problems, missing includes and semicolon.
|
203081 |
27-Jan-2010 |
jfv |
Opps, completely wrong version of if_em.h got into the checkin, sorry all :(
|
203051 |
26-Jan-2010 |
jfv |
Missing a fix for the new watchdog handling.
|
203050 |
26-Jan-2010 |
jfv |
Remove some internal conditional defines that will fail in kernel tree.
|
203049 |
26-Jan-2010 |
jfv |
Update the 1G drivers, shared code sync with Intel, igb now has a queue notion that has a single interrupt with an RX/TX pair, this will reduce the total interrupts seen on a system. Both em and igb have a new watchdog method. igb has fixes from Pyun Yong-Hyeon that have improved stability, thank you :)
I wish to MFC this for 7.3 asap, please test if able.
|
201758 |
07-Jan-2010 |
mbr |
Remove extraneous semicolons, no functional changes.
Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
|
200671 |
18-Dec-2009 |
jhb |
- Add missing newlines to some error messages. - Add interrupt descriptions when using mulitple MSI-X interrupts.
Reviewed by: jfv
|
200528 |
14-Dec-2009 |
jfv |
Add old read_mac_addr routine to this module since a customer report of an Invalid MAC Address has occurred.
|
200523 |
14-Dec-2009 |
jfv |
Remove the MTX_SPIN flag to the shared code MUTEX as it was causing a panic, also took the opportunity to rename the lock for clarity.
|
200268 |
08-Dec-2009 |
jfv |
Remove phantom line of code that somehow slipped into the checkin.
|
200243 |
08-Dec-2009 |
jfv |
Resync with Intel versions of both the em and igb drivers. These add new hardware support, most importantly the pch (i5 chipset) in the em driver. Also, both drivers now have the simplified (and I hope improved) watchdog code. The igb driver uses the new RX cleanup that I first implemented in ixgbe.
em - version 6.9.24 igb - version 1.8.4
|
199192 |
11-Nov-2009 |
jfv |
With an i386 kernel the igb driver can cause a page fault panic on initialization due to a large number of bounce pages being allocated. This is due to the dma tag requiring page alignment on mbuf mapping. This was removed some time back from the ixgbe driver and is not needed here either.
|
197079 |
10-Sep-2009 |
jfv |
Fix build issue with last commit.
|
197078 |
10-Sep-2009 |
jfv |
Fix build complaint from previous checkin
|
197074 |
10-Sep-2009 |
jfv |
Fix an xmit mbuf leak, when transmit failed but you still have an mbuf it was not being requeued.
MFC: 3 days
|
197073 |
10-Sep-2009 |
jfv |
Fix for pr 138516 An mbuf is not requeued when a xmit fails.
MFC: 3 days
|
196970 |
08-Sep-2009 |
phk |
Revert previous commit and add myself to the list of people who should know better than to commit with a cat in the area.
|
196969 |
08-Sep-2009 |
phk |
Add necessary include.
|
196386 |
19-Aug-2009 |
delphij |
Temporarily enhance em(4) and igb(4) hack to take account for IFF_NOARP. Without this changeset there will be no way to prevent these NICs from sending ARP, which is harmful in server farms that is configured as "Direct Server Return" behind a load balancer.
A better fix would remove the whole hack completely but it would be later than 8.0-RELEASE.
Reviewed by: jfv, yongari Approved by: re (kib)
|
195857 |
24-Jul-2009 |
jfv |
Improvement on the last change, this gives a precise way to tell the one and only interface that a vlan event is for. Thanks to John Baldwin for the patch.
Approved by: re
|
195851 |
24-Jul-2009 |
jfv |
This delta fixes two bugs: - When a vlan event occurs a check was not made that the event was actually for the interface, thus resulting in a panic. All three drivers have this vulnerability. Add a check for this condition. - Secondly, there was a duplicate buf_ring free in the em driver resulting in a panic on unload. Remove.
Approved by: re
|
195850 |
24-Jul-2009 |
jfv |
A small number of systems in the ICH9/10 family have a flash part that is made up of 8K banks rather than 4K, if these systems are using bank 1 then the last change in this code breaks the bank read, resulting in an invalid checksum of the eeprom during driver load. This change fixes this.
Approved by: re
|
195691 |
14-Jul-2009 |
bz |
Re-add opt_inet.h, as we did in r193862 and lost yet again.
Approved by: re (kib)
|
195409 |
06-Jul-2009 |
jfv |
The new method of reading the mac address from the RAR(0) register does not work on this old adapter, provide a local routine that does it the older way.
Approved by: re
|
195168 |
29-Jun-2009 |
jfv |
Type problem when FreeBSD is in a virtualized environment, the result was when the RX index wrapped it was converted into some sort of gibberish and written into the RDT register, effectively killing the RX side of the thing :)
Approved by: re
|
195049 |
26-Jun-2009 |
rwatson |
Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface.
For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list.
Approved by: re (kib) MFC after: 6 weeks
|
194979 |
25-Jun-2009 |
jfv |
Change intr_bind to bus_bind_intr, also limit this to multiqueue setup which is not the shipping default for igb (its set to 1).
|
194925 |
24-Jun-2009 |
jfv |
need to make intr_bind call architecture specific for global builds (failing sun4v lint build)
|
194911 |
24-Jun-2009 |
jfv |
Fix lint issue.
|
194865 |
24-Jun-2009 |
jfv |
Updates for both the em and igb drivers, add support for multiqueue tx, shared code updates, new device support, and some bug fixes.
|
193862 |
09-Jun-2009 |
bz |
Add opt_inet.h back lost with r190872. This will bring back improved IPv4 SIOCSIFADDR ioctl handling not re-initializing the interface if avoidable.
|
193096 |
30-May-2009 |
attilio |
When user_frac in the polling subsystem is low it is going to busy the CPU for too long period than necessary. Additively, interfaces are kept polled (in the tick) even if no more packets are available. In order to avoid such situations a new generic mechanism can be implemented in proactive way, keeping track of the time spent on any packet and fragmenting the time for any tick, stopping the processing as soon as possible.
In order to implement such mechanism, the polling handler needs to change, returning the number of packets processed. While the intended logic is not part of this patch, the polling KPI is broken by this commit, adding an int return value and the new flag IFCAP_POLLING_NOCOUNT (which will signal that the return value is meaningless for the installed handler and checking should be skipped).
Bump __FreeBSD_version in order to signal such situation.
Reviewed by: emaste Sponsored by: Sandvine Incorporated
|
192081 |
14-May-2009 |
kmacy |
Call drbr_stats_update to update ifp stats directly when we bypass the buf_ring on transmit
|
191612 |
27-Apr-2009 |
kmacy |
fix typo in conditional
|
191611 |
27-Apr-2009 |
kmacy |
collapse the two em_start_locked routines in to one
|
191580 |
27-Apr-2009 |
jfv |
Correct fat finger mistake
|
191569 |
27-Apr-2009 |
jfv |
igb_txeof also has a case where the watchdog may not get reset when it should be
MFC after: 2 weeks
|
191566 |
27-Apr-2009 |
jfv |
Thanks for Michael Tuexen for tracking down a path where the watchdog timer was not being rearmed in txeof, and also a missing case in the new code.
MFC after: 2 weeks
|
191442 |
23-Apr-2009 |
kmacy |
fix typo
|
191441 |
23-Apr-2009 |
kmacy |
fix panic when using msix
Pointed out by Nate Whitehorn
|
191440 |
23-Apr-2009 |
kmacy |
Make sure the ALTQ case is handle correctly by using drbr_dequeue
|
191162 |
16-Apr-2009 |
kmacy |
call base if_qflush routine to flush if_snd
|
191065 |
14-Apr-2009 |
jfv |
Thanks to Michael Tuexen and Randall Scott for providing a few important bug fixes found while they were doing SCTP development, and that I somehow lost during the scramble.
Thanks guys!!
|
191038 |
14-Apr-2009 |
kmacy |
- define em_transmit and em_qflush - make buF_ring usage conditional but enabled by default
Reviewed by: jfv
|
190879 |
10-Apr-2009 |
jfv |
Fix build problem with data format.
|
190872 |
10-Apr-2009 |
jfv |
This delta syncs the em and igb drivers with Intel, adds header split and SCTP support into the igb driver. Various small improvements and fixes.
MFC after: 2 weeks
|
187123 |
13-Jan-2009 |
gnn |
Fix a cut/paste bug which prevents us from setting the average latency tunable.
Reviewed by: jfv MFC after: 1 day
|
185748 |
07-Dec-2008 |
thompsa |
Restore opt_inet.h include which was lost in the last commit.
|
185355 |
27-Nov-2008 |
jfv |
Thanks to the reminder from Ganbold, small fix in the RX failure path for an infinite loop. Problem originally noticed in ixgbe by Jeff Roberson and fixed there. Thanks to everyone involved.
|
185353 |
27-Nov-2008 |
jfv |
This delta is primarily a fix for es2lan devices that will sometimes fail to initialize problem due to a lock contention with management hardware. However, in order to deliver that fix it was necessary to take a shared code update as a whole, and this required scattered changes in the core code to be compatible.
The em driver now has VLAN HW support added as the igb driver had previously.
MFC after: ASAP - in time for 7.1 RELEASE
|
184718 |
06-Nov-2008 |
bz |
Hide AF_INET specific ioctl handling under #ifdef INET.
MFC after: 2 months
|
184717 |
06-Nov-2008 |
bz |
Hide AF_INET specific ioctl handling under #ifdef INET.
MFC after: 2 months
|
183714 |
09-Oct-2008 |
peter |
Clean out some empty mergeinfo records, presumably by people doing local cp/mv operations. The full repo-relative URL should be specified for the source in these cases.
|
182416 |
28-Aug-2008 |
jfv |
Update to igb driver:
- changes in support of the VLAN filter fix to 126850 - removal of a bunch of legacy code that was cruft, if not possibly harmful. - removal of POLLING from this driver, with multiqueue and MSIX it just makes no sense here. - Fix an LRO bug that I've been working on internally, intermittent panics under stress, the problem was releasing the RX ring lock before the LRO flushing. - Following the above fix I now enable LRO by default - For performance reasons increase the default number of RX queues to 4. - Add AIM - "Adaptive Interrupt Moderation", a fancy way of saying that the EITR value is dynamically changed based on the size of packets in the last interrupt interval.
- Much goodness to try, enjoy!!
|
181041 |
31-Jul-2008 |
jfv |
Data type fix
|
181035 |
30-Jul-2008 |
ps |
Include netinet/tcp_lro.h, unbreak the build
|
181027 |
30-Jul-2008 |
jfv |
Merge of the source for igb and em into dev/e1000, this proved to be necessary to make the static drivers work in EITHER/OR or BOTH configurations. Modules will still build in sys/modules/igb or em as before.
This also updates the igb driver for support for the 82576 adapter, adds shared code fixes, and etc....
MFC after: ASAP
|
179181 |
21-May-2008 |
jfv |
Thanks to report from Neil Hoggarth I found a missing UNLOCK in the watchdog code. This delta also incorporates some missing PCI IDs that got added.
PR 122928 - might be fixed by this, no verification at this point.
|
179136 |
19-May-2008 |
jfv |
This small change will allow this driver in HEAD to build on 6.3 as well as 7 :)
|
178523 |
25-Apr-2008 |
jfv |
This delta has a few important items:
PR 122839 is fixed in both em and in igb
Second, the issue on building modules since the static kernel build changes is now resolved. I was not able to get the fancier directory hierarchy working, but this works, both em and igb build as modules now.
Third, there is now support in em for two new NICs, Hartwell (or 82574) is a low cost PCIE dual port adapter that has MSIX, for this release it uses 3 vectors only, RX, TX, and LINK. In the next release I will add a second TX and RX queue. Also, there is support here for ICH10, the followon to ICH9. Both of these are early releases, general availability will follow soon.
Fourth: On Hartwell and ICH10 we now have IEEE 1588 PTP support, I have implemented this in a provisional way so that early adopters may try and comment on the functionality. The IOCTL structure may change. This feature is off by default, you need to edit the Makefile and add the EM_TIMESYNC define to get the code.
Enjoy all!!
|
177867 |
02-Apr-2008 |
jfv |
This update primarily addresses the ability to have both the em and the igb driver static in the kernel. But it also reflects some other bug fixes in my development stream at Intel. PR 122373 is also fixed in this code.
|
176671 |
29-Feb-2008 |
jfv |
Need to add define of FAST interrupts as default
|
176667 |
29-Feb-2008 |
jfv |
This change introduces a split to the Intel E1000 driver, now rather than just em, there is an igb driver (this follows behavior with our Linux drivers). All adapters up to the 82575 are supported in em, and new client/desktop support will continue to be in that adapter.
The igb driver is for new server NICs like the 82575 and its followons. Advanced features for virtualization and performance will be in this driver.
Also, both drivers now have shared code that is up to the latest we have released. Some stylistic changes as well.
Enjoy :)
|
174060 |
28-Nov-2007 |
jfv |
Add COHERENT to descriptor mem allocation for the benefit of ARM (request from Olivier Houchard), its a noop on most architectures and goodness on those that use it.
|
174029 |
28-Nov-2007 |
jfv |
A minor issue with lock names, WITNESS complains when the two locks are the same...
|
173952 |
26-Nov-2007 |
jfv |
Fix for a reported panic in certain circumstances. When calling em_stop() now make sure the TX lock is held as well as CORE.
|
173820 |
21-Nov-2007 |
ru |
Take out em_poll() prototype from under EM_FAST_IRQ control.
Reported by: tindebox compiling a LINT kernel
|
173789 |
20-Nov-2007 |
jfv |
One nit, FAST handling is now in #ifdef's for compatibility between RELEASES, but we want it on by default in 7 and later, add that define, and take out a fragment left from a workaround being removed.
|
173788 |
20-Nov-2007 |
jfv |
Driver version 6.7.3 - Bring HEAD up to the latest shared code - Fix TSO problem using limited MSS and forwarding - Dual lock implementation - New device support - For my ease, this code can compile in either 6.x or later - brings this driver in sync with the 6.3
|
172138 |
10-Sep-2007 |
jfv |
A number of small fixes: - duplicate #define in header, thanks to Kevin Lo for pointing out. - incorrect BUSMASTER enable logic, thanks Patrick Oeschger - 82543 fails due to bogus IO BAR logic - Allow 82571 to use MSI interrupts - Checksum Offload for UDP not working on 82575
Approved by:re
|
171744 |
06-Aug-2007 |
rwatson |
Remove the now-unused NET_{LOCK,UNLOCK,ASSERT}_GIANT() macros, which previously conditionally acquired Giant based on debug.mpsafenet. As that has now been removed, they are no longer required. Removing them significantly simplifies error-handling in the socket layer, eliminated quite a bit of unwinding of locking in error cases.
While here clean up the now unneeded opt_net.h, which previously was used for the NET_WITH_GIANT kernel option. Clean up some related gotos for consistency.
Reviewed by: bz, csjp Tested by: kris Approved by: re (kensmith)
|
171624 |
27-Jul-2007 |
cognet |
Use coherent mapping for DMA on arm. This is propably suitable for the other archs, but I can't test it so I made it conditionnal on __arm__ for now.
Approved by: re (blanket)
|
170171 |
31-May-2007 |
jfv |
Couple of the fixes needed revising. The ICH8 autoneg was still broken, this change both simplifies the code and plugs a hole where the devise was reset without keeping the management controller at bay :) Second, the 82571 LAA reset problem was incomplete, this addition is necessary. Just one of those days :)
|
170141 |
30-May-2007 |
jfv |
A few small but significant fixes: - Coverity Prevent(tm) CID 1906 a bogus use of bzero where unneeded. - ICH8 systems autoneg to 100 rather than 1000, this can also be seen in 82573, the logic was backwards. - On new 82575 quadports half duplex tx speed is slow... this was due to overwriting TCTL reg rather than adding bits.
|
169955 |
24-May-2007 |
jfv |
Fix for PR 112937, thanks to Ruslan Ermilov. I am still a bit confused how the 'link flap' was connected to the 'get' rather than 'set' address, but this seems the right thing to do here.
|
169918 |
23-May-2007 |
jfv |
Two minor fixes, keep old 82542 from using jumbo frames, and add missing htole64 in encap code.
Reviewed by:Pdeuskar Approved by:Pdeuskar
|
169637 |
17-May-2007 |
jfv |
Couple of changes, back down on last TSO change, instead make old adapter list still capable, but only PCI-E adapters are now enabled. The user can enable older PCI-X or PCI adapters using ifconfig. Secondly, Arthur Hartwig pointed out my MSI change was not working correctly, changed to something that now does. Thanks Arthur. There was also a fundamental bug in the 82575 MSIX code, the MSIX registers had to be mapped, opps :)
Rubber-stamped by: Pdeuskar
|
169589 |
16-May-2007 |
jfv |
This delta adds two bug fixes: one that makes HW Offload logic in legacy codepath match the 82575, without this we were seeing bridging fail on 82546 adapters. Secondly, I have limited TSO to PCI Express adapters, I meant to do this and it got dropped in the earlier delta. Next, I am dropping in the latest shared code from our development team, consensus was that this should be done frequently, so I am :)
Approved by: pdeuskar
|
169483 |
11-May-2007 |
jfv |
Mistake in the logic deciding what adapters need to map the IO BAR. Causing the driver to fail on th 82542.
Reviewed by:pdeuskar Approved by:pdeuskar
|
169397 |
09-May-2007 |
jfv |
A couple bug fixes that I've had internally at Intel. First is a long time workaround for problems with 82571 adapters and LAAs, one port getting reset can cause the other to have its RAR[0] also reset, thus overwriting an LAA. This fix works around it by also keeping the address in the last array member.
The other bug is specific to the new 575 adapter, its transmit code logic in handling hwassists was too crude, it broken when doing bridges. I am much happier with the new logic,we may want to change the legacy path at some point to something similar.
Reviewed by: pdeuskar Approved by: pdeuskar
|
169248 |
04-May-2007 |
rwatson |
$FreeBSD$ tags are not compilable C code; wrap in either __FBSDID() or in comments for .c and .h files respectively. Jack may want to clean up style or other aspects once he's up and about again, but this gets the kernel compiling.
|
169240 |
04-May-2007 |
jfv |
Merge in the new driver (6.5.0) of Intel. This has a new shared code infrastructure that is family specific and modular. There is also support for our latest gigabit nic, the 82575 that is MSI/X and multiqueue capable.
The new shared code changes some interfaces to the core code but testing at Intel has been going on for months, it is fairly stable.
I have attempted to be careful in retaining any fixes that CURRENT had and we did not, I apologize in advance if any thing gets clobbered, I'm sure I'll hear about it :)
Approved by pdeuskar
|
167098 |
28-Feb-2007 |
ru |
Revert previous change and take back a pointy hat.
|
167096 |
28-Feb-2007 |
ru |
Fix panic on boot caused by setting up a NULL interrupt handler.
Submitted by: Goran Gajic Pointy hat to: piso
|
166901 |
23-Feb-2007 |
piso |
o break newbus api: add a new argument of type driver_filter_t to bus_setup_intr()
o add an int return code to all fast handlers
o retire INTR_FAST/IH_FAST
For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current
Reviewed by: many Approved by: re@
|
164547 |
23-Nov-2006 |
kmacy |
remove no longer correct comment above em_read_pcie_cap_reg
|
164546 |
23-Nov-2006 |
kmacy |
Move magic PCIe workaround constant to header - add appropriate comment
Suggested by: jfvogel
|
164534 |
23-Nov-2006 |
kmacy |
Fix TSO support on sun4v
- incorporate csjp's fix for a mishandled endian conversion - convert PAGE_SIZE to 4096 for PCIe adapter workaround (my page size is not 4k) - implement em_read_pcie_cap_reg where we set the max read size on pcie to 4k (taken from mxge)
Reviewed by: scottl and jfvogel
|
164397 |
18-Nov-2006 |
csjp |
Implement new ETHER_BPF_MTAP macro. Roll back the various changes made to accommodate the chip being in promiscuous mode while offloading VLAN tag processing to the hardware. We can now properly handle the absence of VLAN tags from hardware stripping.
Reviewed by: rwatson, andre MFC after: 1 month
|
164305 |
15-Nov-2006 |
jhb |
Add MSI support to em(4), bce(4), and mpt(4). For now, we only support devices that support a maximum of 1 message, and we use that 1 message instead of the INTx rid 0 IRQ with the same interrupt handler, etc.
|
164126 |
09-Nov-2006 |
glebius |
Instead of using the legacy if_timer/if_watchdog interface create our own watchdog that piggybacks on the em_local_timer() routine.
We suppose that the if_timer/if_watchdog interface should be obsoleted, since it doesn't fit the modern SMP network stack. NIC drivers should create their own watchdogs, that check and clear the timers always holding driver's lock.
In collaboration with: jfv, scottl
|
163881 |
01-Nov-2006 |
jhb |
Fix compile botch in the last panic botch fix. :(
Pointy hat: jhb Reported by: brueffer
|
163876 |
01-Nov-2006 |
jhb |
Fix botch in last commit (I tested on 6.x which doesn't have TSO): - Test the mac_type rather than if_hwassist (since ifp doesn't exist yet) to determine if the adapter supports TSO and thus to change the sizes for the bus_dma tag.
Reviewed by: glebius
|
163828 |
31-Oct-2006 |
jhb |
Allocate receive and transmit data structures during attach() and free them during detach() similar to other NIC drivers rather than allocating them during init() and freeing them during stop(): - Move creation of tx bus_dma tag amd maps and tx_buffer_area from em_setup_transmit_structures() to em_allocate_transmit_structures(). - Call em_allocate_xxx_structures() in em_attach(). - Only call em_free_xxx_structures() in em_detach(). - Change em_setup_xxx_structures() to free any existing tx or rx buffers and in the case of rx repopulate the ring with newer buffers.
Reviewed by: jfv
|
163827 |
31-Oct-2006 |
jhb |
- Use callout_init_mtx() to close various callout-related races. - Drain the two timers in detach. - Check IFF_DRV_RUNNING in the link task and bail w/o doing anything if it is clear.
Reviewed by: jfv, scottl
|
163826 |
31-Oct-2006 |
glebius |
Rework the transmit register handling. In em_encap() store index of the EOP descriptor in the first descriptor of the packet. And then in em_txeof() search for DD bits set only in the EOP descriptors, embedding the cleanup of all packet's descriptors into inner loop.
This change is important for future chips, where DD bit is going to be set only on the EOP descriptors.
Submitted by: jfv
|
163824 |
31-Oct-2006 |
glebius |
Merge new vendor release - 6.2.9.
Details: o if_em.c changes: - Added several new PCI ids. - Check em_check_phy_reset_block() before doing SIOCSIFMEDIA ioctl. - Don't touch TARC registers, they are now handled in shared code in if_em_hw.c. - Move RDH and RDT setting to the end of em_initialize_receive_unit(). - Declare em_read_pcie_cap_reg(), now empty. o if_em_hw.c dropped in from vendor, then restored rev. 1.15. o if_em_hw.h dropped in from vendor, then modified: - Added RX overrun interrupt flag to interrupt enable mask. - Remove declarations of em_io_read(), em_io_write().
Approved by: jfv
|
163730 |
28-Oct-2006 |
jfv |
Backout bogus checkin to HEAD Approved by: scottl
|
163724 |
28-Oct-2006 |
jfv |
This is the merge of the Intel 6.2.9 driver. It provides all new shared code, new device support, and it is hoped a more stable driver for 6.2. RELEASE. This checkin was discussed and approved today by RE, scottl, jhb, and pdeuskar
|
162819 |
29-Sep-2006 |
andre |
Back out rev. 1.152 as it was breaking vlan tag insertion when vlan tag stripping was disabled due to being in promisc mode. This is a hardware bug. Update comment to explicitly state the reason the manual vlan tag insertion in this case. See rev. 1.53 for further information as well.
Noticed by: jhb
|
162790 |
29-Sep-2006 |
andre |
Small style and comment adjustments.
Reviewed by: jfv
|
162789 |
29-Sep-2006 |
andre |
Remove manual vlan header insertion in em_encap(). It is unnecessary as the generic vlan_start() takes care of it when vlan hardware insertion is disabled.
In em_set_promisc() add a note that BPF may also be enabled without going into promisc mode.
Reviewed by: jfv
|
162785 |
29-Sep-2006 |
andre |
Change em_transmit_checksum_setup() to deal with already inserted vlan headers, IP options and add skeleton IPv6 support. The new code structure can also be easily enhanced to support new/more protocols (SCTP) in the future.
Reviewed by: jfv
|
162784 |
29-Sep-2006 |
andre |
Change em_tso_setup() to deal with already inserted vlan headers, IP options and add skeleton IPv6 support. The new code structure can also be easily enhanced to support new/more protocols (SCTP) and IP fragmentation in the future.
In em_encap() only try to do TSO if 'dotso' is true.
Reviewed by: jfv
|
162783 |
29-Sep-2006 |
andre |
Only advertize IFCAP_TSO4 capabilities. IPv6 is not yet supported.
Reviewed by: jfv
|
162782 |
29-Sep-2006 |
andre |
Handle all error cases from bus_dmamap_load_mbuf_sg(). Those are:
- EFBIG means the mbuf chain was too long and bus_dma ran out of segments. Defragment the mbuf chain and try again. (Already existed, not changed.) - ENOMEM means bus_dma could not obtain enough bounce buffers at this point in time. Defer sending and try again later. - All other errors, in particular EINVAL, are fatal and prevent the mbuf chain from ever going through. Drop it and report error. - Checking (nsegs == 0) is unnecessary as bus_dmamap_load_mbuf_sg() always reports an error if it is < 1.
This prevents broken packets from clogging the interface queue indefinately.
Discussed with: scottl Reviewed by: jfv
|
162532 |
21-Sep-2006 |
andre |
Move the initialization of the hardware capabilities in em_init_locked() before em_setup_transmit_structures() as it needs this information to properly set up TSO parameters.
Reviewed by: jfv
|
162425 |
18-Sep-2006 |
andre |
Don't forget to add curly braces when doing more than one line of actions after a 'if' statement.
Pointy hat to: andre
|
162375 |
17-Sep-2006 |
andre |
Move ethernet VLAN tags from mtags to its own mbuf packet header field m_pkthdr.ether_vlan. The presence of the M_VLANTAG flag on the mbuf signifies the presence and validity of its content.
Drivers that support hardware VLAN tag stripping fill in the received VLAN tag (containing both vlan and priority information) into the ether_vtag mbuf packet header field:
m->m_pkthdr.ether_vtag = vlan_id; /* ntohs()? */ m->m_flags |= M_VLANTAG;
to mark the packet m with the specified VLAN tag.
On output the driver should check the mbuf for the M_VLANTAG flag to see if a VLAN tag is present and valid:
if (m->m_flags & M_VLANTAG) { ... = m->m_pkthdr.ether_vtag; /* htons()? */ ... pass tag to hardware ... }
VLAN tags are stored in host byte order. Byte swapping may be necessary.
(Note: This driver conversion was mechanic and did not add or remove any byte swapping in the drivers.)
Remove zone_mtag_vlan UMA zone and MTAG_VLAN definition. No more tag memory allocation have to be done.
Reviewed by: thompsa, yar Sponsored by: TCP/IP Optimization Fundraise 2005
|
162235 |
11-Sep-2006 |
pdeuskar |
Fix issues found by Coverity (223392, 223393) due to TSO additions
Submitted by: Matthew Jacob
|
162206 |
10-Sep-2006 |
pdeuskar |
Fix style(9) issues in the TSO specific changes.
Pointed out by: jmallett
|
162187 |
09-Sep-2006 |
pdeuskar |
Second attempt at fixing module build
Pointyhat: pdeuskar
|
162186 |
09-Sep-2006 |
pdeuskar |
Fix build breakage while compiling em as a module.
|
162171 |
09-Sep-2006 |
pdeuskar |
Add support for TSO. Thanks to Andre for adding support in the stack and Jack Vogel for driver changes.
Submitted by: Jack Vogel
|
161928 |
03-Sep-2006 |
jmg |
add a newbus method for obtaining the bus's bus_dma_tag_t... This is required by arches like sparc64 (not yet implemented) and sun4v where there are seperate IOMMU's for each PCI bus... For all other arches, it will end up returning NULL, which makes it a no-op...
Convert a few drivers (the ones we've been working w/ on sun4v) to the new convection... Eventually all drivers will need to replace the parent tag of NULL, w/ bus_get_dma_tag(dev), though dev is usually different for each driver, and will require hand inspection...
Reviewed by: scottl (earlier version)
|
161823 |
01-Sep-2006 |
jhb |
Comment tweaks.
|
161822 |
01-Sep-2006 |
jhb |
- Use pci_enable_busmaster() and pci_enable_io() to update the command register. This really shouldn't be using pci_enable_io() directly as bus_alloc_resource() does it already, but the cached copy of the command word needs to be correct so the enable/disable mwi functions work properly. - Use pci bus accessors to read revision ID and subvendor IDs.
Reviewed by: jvogel
|
161821 |
01-Sep-2006 |
jhb |
Add locking to the ifmedia callouts.
Reviewed by: jvogel, yongari
|
161810 |
01-Sep-2006 |
glebius |
Fix my error in rev. 1.109.
Submitted by: jhb Pointy hat to: glebius
|
161778 |
31-Aug-2006 |
jhb |
Just foward declare 'struct adapter' instead of declaring an actual 'adapter' structure.
|
161777 |
31-Aug-2006 |
jhb |
Compare the correct field against NULL when determining whether or not to do bus_teardown_intr().
|
161521 |
22-Aug-2006 |
yongari |
It seems that em(4) misses Tx completion interrupts under certain conditions. The cause of missing Tx completion interrupts comes from Tx interrupt moderation mechanism(delayed interrupts) or chipset bug. If Tx interrupt moderation mechanism is the cause of false watchdog timeout error we should have to fix all device drivers that have Tx interrupt moderation capability. We may need more investigation for this issue. Anyway, the fix is the same for both cases.
This should fix occasional watchdog timeout errors seen on a few systems.
Reported by: -net, Patrick M. Hausen < hausen AT punkt DOT de > Tested by: Patrick M. Hausen < hausen AT punkt DOT de >
|
161372 |
16-Aug-2006 |
yongari |
Don't update Rx descriptor status in two different functions.
Suggested by: pdeuskar Reviewed by: pdeuskar
|
161278 |
14-Aug-2006 |
glebius |
Change hardcoded and incorrect number with correct define. This change is a nop, since E1000_FDX_COLLISION_DISTANCE == E1000_HDX_COLLISION_DISTANCE.
PR: kern/101000 Submitted by: Doug Havir
|
161267 |
14-Aug-2006 |
yongari |
Make em(4) handle too many fragmented frame with m_defrag(9). Previously em(4) requeued the failed mbuf chains from bus_dmamap_load_mbuf_sg(9) failure to resend it later. However, bus_dmamap_load_mbuf_sg(9) may never complete its request as the fragmented frames can have more than EM_MAX_SCATTER segments. To handle the above EFBIG case, defragment the frame with m_defrag(9) and free the mbuf chain if it can't deframent the chain due to resource shortage.
Reviewed by glebius (with improvements)
|
161266 |
14-Aug-2006 |
yongari |
Overhaul Rx path to recover from mbuf cluster allocation failure. o Create one more spare DMA map for Rx handler to recover from bus_dmamap_load_mbuf_sg(9) failure. o Make sure to update status bit in Rx descriptors even if we failed to allocate a new buffer. Previously it resulted in stuck condition and em_handle_rxtx task took up all available CPU cycles. o Don't blindly unload DMA map. Reuse loaded DMA map if received packet has errors. This would speed up Rx processing a bit under heavy load as it does not need to reload DMA map in case of error. (bus_dmamap_load_mbuf_sg(9) is the most expensive call in driver context.) o Update if_iqdrops counter if it can't allocate a mbuf cluster. With this change it's now possible to see queue dropped packets with netstat(1). o Update mbuf_cluster_failed counter if fixup code failed to allocate mbuf header. o Return ENOBUFS instead of ENOMEM in case of Rx fixup failure. o Make adapter->lmp NULL in case of Rx fixup failure. Strictly specking it's not necessary for correct operation but it makes the intention clear. o Remove now unused dropped_pkts member in softc.
With these changes em(4) should survive mbuf cluster allocation failure on Rx path.
Reviewed by: pdeuskar, glebius (with improvements)
|
161265 |
14-Aug-2006 |
yongari |
Apply alignment fixup only when programmed frame size is greater than MCLBYTES - ETHER_ALIGN. Previously it applied the alignment fixup code for oversized frames which would result in reduced performance on strict alignment archs.
|
161205 |
11-Aug-2006 |
glebius |
Merge in new driver from Intel, version 6.1.4. It adds support for 82571EB quad port copper NIC and has few minor fixes.
Details: - if_em.c. Merged manually, viewing diff between new vendor driver and previous one. - if_em_hw.c. Dropped in from vendor, and then restored revision 1.15.
|
161134 |
09-Aug-2006 |
pdeuskar |
10/100 PHY shouldn't support gigabit media types.
Submitted by: brad (brad@comstyle.com) Obtained from: OpenBSD MFC after: 1 week
|
160964 |
04-Aug-2006 |
yar |
Commit the results of the typo hunt by Darren Pilgrim. This change affects documentation and comments only, no real code involved.
PR: misc/101245 Submitted by: Darren Pilgrim <darren pilgrim bitfreak org> Tested by: md5(1) MFC after: 1 week
|
160956 |
03-Aug-2006 |
pdeuskar |
Revert back changes to made in rev 1.109 of if_em.c which were unnecessary. This makes it easier for us to get the changes into -current and to -stable quickly.
|
160949 |
03-Aug-2006 |
glebius |
Merge in new driver from Intel, version 6.0.5. It adds support for 80003 NICs and NICs found on ICH8 mobos, and improves support for already known chips.
Details: - if_em.c. Merged manually, viewing diff between new vendor driver and previous one. This was an easy task, because most changes between 5.1.5 and 6.0.5 are bugfixes taken from FreeBSD. - if_em_hw.h. Dropped in from vendor, and then restored revisions 1.16, 1.17, 1.18. - if_em_hw.c. Dropped in from vendor, and then restored revision 1.15. - if_em_osdep.h. Added new required macros from vendor file and add a hack against define namespace mangling in if_em_hw.h. Intel made another hack, but I prefer mine.
|
160734 |
27-Jul-2006 |
yongari |
Prepending an mbuf after loading a DMA map results in unexpected result. So, modify mbuf chains before loading a DMA map.
|
160733 |
27-Jul-2006 |
yongari |
Nuke invalid use of BUS_DMA_ALLOCNOW.
|
160732 |
27-Jul-2006 |
yongari |
Make sure to use the same DMA map in DMA map load/unload operations by remembering a map used in bus_dmamap_load_mbuf_sg(9). I have no idea how it could ever worked before. This fixes a warning generated by a diagnostic check in sun4v iommu driver.
Reported by: jb Tested by: jb(sun4v)
|
160519 |
20-Jul-2006 |
yongari |
Since resetting hardware takes a very long time and results in link renegotiation, we only initialize the hardware only when it is absolutely required. Process SIOCGIFADDR ioctl in em(4) when we know an IPv4 address is added. Handling SIOCGIFADDR in a driver is layering violation but it seems that there is no easy way without rewritting hardware initialization code to reduce settle time after reset.
This should fix a long standing bug which didn't send ARP packet when interface address is changed or an alias address is added. Another effect of this fix is it doesn't need additional delays anymore when adding an alias address to the interface. While I'm here add a new if_flags into softc which remembers current prgroammed interface flags and make use of it when we have to program promiscuous mode.
Tested by: Atanas <atanas AT asd DOT aplus DOT net> Analyzed by: rwatson Discussed with: -stable
|
160518 |
20-Jul-2006 |
yongari |
Protect EEPROM access with the driver lock.
|
160517 |
20-Jul-2006 |
yongari |
Honor IFF_DRV_OACTIVE in em_start_locked().
|
159330 |
06-Jun-2006 |
glebius |
The procedure of raceless switching between polling mode and taskqueued interrupt mode is going to be quite complex. Since the polling mode is considered legacy feature for em(4) driver, the decision is made to make polling and new interrupt handler mutually exclusive, selected at compile time.
If kernel is compiled with DEVICE_POLLING, the fast taskqueued interrupt handler code is disabled and the em_poll() and legacy em_intr() functions are enabled. Otherwise, legacy functions are disabled and only em_intr_fast() code is compiled.
Discussed with: scottl
|
158685 |
17-May-2006 |
glebius |
Fix static array overrun.
(This will be also fixed in next vendor release.)
Coverity ID: 916 Reviewed by: Jack Vogel
|
157727 |
13-Apr-2006 |
cognet |
Bring back arm-specific workaround from rev 1.15: Do not use the IO-mapping to issue the reset on the 82546 on arm. For some reason, it results in corrupted descriptors.
|
157577 |
07-Apr-2006 |
glebius |
Restore accidentially removed rev. 1.3
|
157566 |
06-Apr-2006 |
glebius |
Merge in new driver from Intel, version 5.1.5. Adds support for some new chips and improves support for already supported ones.
Some details, important for future merges: - if_em.c merged manually, viewing diff between new vendor driver and previous one. - if_em_hw.h dropped in from vendor, and then restored revisions 1.16, 1.17, 1.18. - if_em_hw.c dropped in from vendor, and then two liner change made, that restores support for two rare chips.
|
155911 |
22-Feb-2006 |
glebius |
Back out 1.112,1.113. I don't have enough resources to fix breakages introduced by this change.
|
155718 |
15-Feb-2006 |
glebius |
Fix fallout from last commit - we need to program the MAC address in em_init().
|
155715 |
15-Feb-2006 |
glebius |
em_hardware_init() in em_init() is not needed, and leads to annoying link flap.
Submitted by: ru, Mike Tancsa
|
155713 |
15-Feb-2006 |
glebius |
Set ifp->if_baudrate according to current speed.
|
155712 |
15-Feb-2006 |
glebius |
- Rename em_print_link_status() to em_update_link_status(). - In em_attach() remove em_check_for_link(). Not needed here, since already done in em_hardware_init(). - In em_attach() replace the printing block with call to em_update_link_status(). - Remove modification of sc->link_state from em_hardware_init() and from em_media_status(). This makes em_update_link_status() a single point of change. Call em_update_link_status() where needed.
|
155709 |
15-Feb-2006 |
glebius |
- Second style(9) megacleanup. - Rename "adapter" to "sc"/"softc", to be like other drivers.
(-13 Kb less source code)
|
155674 |
14-Feb-2006 |
glebius |
Move includes from if_em.h to if_em.c and sort them.
|
155472 |
09-Feb-2006 |
glebius |
Fix two important typos in watchdog handling:
- Restart watchdog if we *did* processed any descriptors. [1] - Log the watchdog event if the link is *up*. [2]
PR: kern/92948 [1] Submitted by: Mihail Balikov <mihail.balikov interbgc.com> [1] PR: kern/92895 [2] Submitted by: Vladimir Ivanov <wawa yandex-team.ru> [2]
|
155426 |
07-Feb-2006 |
glebius |
Since em(4) taskqueue is a new network context, we need to conditionally lock Giant here.
Submitted by: Andrey V. Elsukov <bu7cher yandex.ru>
|
155305 |
04-Feb-2006 |
scottl |
Now that the em driver no longer needs to directly touch the scheduler, remove some unneeded headers.
|
155052 |
30-Jan-2006 |
glebius |
This driver can do hardware VLAN tagging + checksum offloading.
In collaboration with: Mihail Balikov <mihail.balikov interbgc.com>
|
154954 |
28-Jan-2006 |
scottl |
Squash another invalid use of BUS_DMA_ALLOCNOW.
MFC After: 3 days
|
154663 |
22-Jan-2006 |
mux |
Fix a race condition by initializing the taskqueue before registering the fast interrupt handler that uses it. This fixes a panic at boot time when em_intr_fast() calls taskqueue_enqueue().
|
154571 |
20-Jan-2006 |
glebius |
An attemp to make driver more readable and attaractive for further hacking: - Remove all spaces at eol. - Improve style(9) in most frequently edited functions. - In em_encap() push variables for 82544 workaround in the block where they are only used. - In em_get_buf() remove unused variable.
|
154333 |
14-Jan-2006 |
scottl |
Add the following to the taskqueue api:
taskqueue_start_threads(struct taskqueue **, int count, int pri, const char *name, ...);
This allows the creation of 1 or more threads that will service a single taskqueue. Also rework the taskqueue_create() API to remove the API change that was introduced a while back. Creating a taskqueue doesn't rely on the presence of a process structure, and the proc mechanics are much better encapsulated in taskqueue_start_threads(). Also clean up the taskqueue_terminate() and taskqueue_free() functions to safely drain pending tasks and remove all associated threads.
The TASKQUEUE_DEFINE and TASKQUEUE_DEFINE_THREAD macros have been changed to use the new API, but drivers compiled against the old definitions will still work. Thus, recompiling drivers is not a strict requirement.
|
154291 |
13-Jan-2006 |
scottl |
Fix the interrupt race for real. Don't register the interrupt until after the the interface has been configured. I'm not sure how this could ever have worked before, but it should be fixed now. Also break out the interrupt degresitration function into it's own step.
|
154286 |
13-Jan-2006 |
scottl |
Disable interrupts while we are setting up the handler. The interrupt really shouldn't be set up or enabled until much later, but that will be investigated at a later time.
|
154204 |
11-Jan-2006 |
scottl |
Significant performance improvements for the if_em driver:
- Only update the rx ring consumer pointer after running through the rx loop, not with each iteration through the loop. - If possible, use a fast interupt handler instead of an ithread handler. Use the interrupt handler to check and squelch the interrupt, then schedule a taskqueue to do the actual work. This has three benefits: - Eliminates the 'interrupt aliasing' problem found in many chipsets by allowing the driver to mask the interrupt in the NIC instead of the OS masking the interrupt in the APIC. - Allows the driver to control the amount of work done in the interrupt handler. This results in what I call 'adaptive polling', where you get the latency benefits of a quick response to interrupts with the interrupt mitigation and work partitioning of polling. Polling is still an option in the driver, but I consider it orthogonal to this work. - Don't hold the driver lock in the RX handler. The handler and all data associated is effectively serialized already. This eliminates the cost of dropping and reaquiring the lock for every receieved packet. The result is much lower contention for the driver lock, resulting in lower CPU usage and lower latency for interactive workloads.
The amount of work done in the taskqueue is controlled by the sysctl dev.em.N.rx_processing_limit
and tunable hw.em.rx_process_limit
Setting these to -1 effectively removes the limit.
The fast interrupt and taskqueue can be disabled by defining NO_EM_FASTINTR. This work has been shown to increase fast-forwarding from ~570 kpps to ~750 kpps (note that the same NIC hardware seems unable to transmit more than 800 kpps, so this increase appears to be limited almost solely by the hardware). Gains have been shown in other workloads, ranging from better performance to elimination of over-saturation livelocks.
Thanks to Andre Opperman for his time and resources from his network performance project in performing much of the testing. Thanks to Gleb Smirnoff and Danny Braniss for their help in testing also.
|
153783 |
28-Dec-2005 |
glebius |
A style nit.
|
153781 |
28-Dec-2005 |
glebius |
Tidy up em_resume(): - Don't call em_init_locked() twice. - Collapse two if() blocks into one.
|
153729 |
26-Dec-2005 |
glebius |
Add simple suspend and resume methods. We call em_stop() on suspend and em_init() on resume. With this change the network is ready right after resume, without half minute lag.
Tested by: Jacques Garrigue
|
153635 |
22-Dec-2005 |
glebius |
Add a quirk to fix resume on some laptops.
Reported by: joe Reported by: Huang wen hui <huang gddsn.org.cn> Reported by: Jacques Garrigue <garrigue math.nagoya-u.ac.jp> PR: kern/89825
|
153512 |
18-Dec-2005 |
glebius |
- Fix VLAN_INPUT_TAG() macro, so that it doesn't touch mtag in case if memory allocation failed. - Remove fourth argument from VLAN_INPUT_TAG(), that was used incorrectly in almost all drivers. Indicate failure with mbuf value of NULL.
In collaboration with: yongari, ru, sam
|
153474 |
16-Dec-2005 |
yongari |
Add jumbo frame support for architectures with strict alignment.
Reviewed by: glebius
|
153355 |
12-Dec-2005 |
glebius |
- Polling can be used on SMP. - A kernel module can support polling.
|
153072 |
04-Dec-2005 |
ru |
Fix -Wundef.
|
153012 |
02-Dec-2005 |
glebius |
On the 82571 and newer chipset the ICR register is meaningful only if the E1000_ICR_INT_ASSERTED bit is set.
Submitted by: Jack Vogel
|
152774 |
24-Nov-2005 |
cognet |
Remember the bus_dmamap_t where we loaded the mbuf, and sync this map instead of tx_buffer->map, or we could end up syncing the wrong map.
|
152740 |
24-Nov-2005 |
glebius |
Merge in new driver version from Intel - 3.2.18.
The most important change is support for adapters based on 82571 and 82572 chips.
Tested on: 82547EI on i386 Tested on: 82540EM on sparc64
|
152645 |
21-Nov-2005 |
yongari |
busdma cleanup for em(4). - don't force busdma to pre-allocate bounce pages for parent tag. - use system supplied roundup2 macro instead of rolling its own version. - TX/RX decriptor length should be multiple of 128. There is no no need to expand the size with the multiple of 4096. - don't create/destroy DMA maps in TX/RX handlers. Use pre-allocated DMA maps. Since creating DMA maps on sparc64 is time consuming operations(resource mananger overhead), this change should boost performance on sparc64. I could get > 2x speedup on Ultra60. - TX/RX descriptors could be aligned on 128 boundary. Aligning them on PAGE_SIZE is waste of resource. - don't blindly create TX DMA tag with size of MCLBYTES * 8. The size is only valid under jumbo frame environments. Instead of using the hardcoded value, re-compute necessary size on the fly. - RX side bus_dmamap_load_mbuf_sg(9) support. - remove unused macro EM_ROUNDUP and constant EM_MMBA.
Reviewed by: scottl Tested by: glebius
|
152545 |
17-Nov-2005 |
glebius |
- Backout last change, since it is memory overkill for a non busy host or for a notebook with em(4) adapter. - Introduce tunables em.hw.txd and em.hw.rxd, which allow administrator to configure number of transmit and receive descriptors. - Check em.hw.txd and em.hw.rxd against hardware limits [*] and require them to be multiple of 128.
[*] According to comments in if_em.h the 82540EM/82541ER chips can handle more than 256 descriptors. Since we don't have this hardware to test, we decided to mimic NetBSD wm(4) driver, that limits these chips to 256 descriptors.
In collaboration with: yongari
|
152315 |
11-Nov-2005 |
ru |
- Store pointer to the link-level address right in "struct ifnet" rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr.
- Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead.
|
152276 |
10-Nov-2005 |
glebius |
Give a try to autoconfiguring the number of transmit and receive descriptors depending on chip revision.
|
152247 |
09-Nov-2005 |
glebius |
- Introduce two more stat counters, counting number of RX overruns and number of watchdog timeouts. - Do not log(9) RX overrun events, since this pessimizes things under load [1]. - Do not increase if->if_oerrors in em_watchdog(), since this leads to counter slipping back, when if->if_oerrors is recalculated in em_update_stats_counters(). Instead increase watchdog counter in em_watchdog() and take it into account in em_update_stats_counters().
Submitted by: ade [1]
|
152225 |
09-Nov-2005 |
yongari |
Make em(4) work on big-endian architectures. - disable jumbo frame support on strict alignment architectures due to the limitation of hardware. The driver needs a fix-up code for RX side. The fix will show up in near future. - fix endian issue for 82544 on PCI-X bus. I couldn't test this as I don't have the NIC/hardware. - prefer PCIR_BAR to hardcoded EM_MMBA. - Properly checks for for 64bit BAR [1] - replace inl/outl with bus_space(9) [1] - fix endian issue on VLAN handling. - reorder header files and remove unnecessary one.
Reviewed by: cognet No response from: pdeuskar, tackerman Obtained from: OpenBSD [1]
|
151903 |
31-Oct-2005 |
rwatson |
Put probe-time printf of adapter speed and duplex behind bootverbose: since the link takes a bit to negotiate, the information is pretty much never available during the probe. As such, the boot output pretty much always prints N/A for speed and duplex. Since we print out the output of ifconfig during the user space boot, this early boot information is also generally redundant, and added to the noise.
MFC after: 2 weeks
|
151495 |
20-Oct-2005 |
glebius |
Some more minor cleanups of em(4) driver: - Destroy mutex in case of attach failure. [1] - Lock properly em_watchdog(). [1] - Lock properly em_sysctl_int_delay(). [1] - Remove unused global adapter linked list. - Remove unused dma_size field from struct em_dma_alloc. - Do not touch interface statistics, that must be edited only by upper layers. [1]
Submitted by: yongari [1]
|
151494 |
20-Oct-2005 |
glebius |
Revamp interrupt handling in em(4) driver:
o Do not mask the RX overrun interrupt.
o Rewrite em_intr(): - Axe EM_MAX_INTR. - Cycle acknowledging interrupts and processing packets until zero interrupt cause register is read. - If RX overrun comes in log this fact. [ NetBSD also resets adapter in this case, but my tests showed that this is not needed and only pessimizes behavior under heavy load. ] - Since almost all functions is rewritten, style the remaining lines.
This fixes em(4) interfaces wedging under high load.
In collaboration with: wpaul, cognet Obtained from: NetBSD
|
151466 |
19-Oct-2005 |
glebius |
In the em_process_receive_interrupts() cycle check the IFF_DRV_RUNNING flag. This fixes panic, when 'ifconfig em0 down' was called and it calls em_stop() while the em_process_receive_interrupts() has temporarily dropped the lock.
|
151432 |
18-Oct-2005 |
cognet |
- Use BUS_DMASYNC_PREWRITE in em_get_buf(), as the adapter is about to read the descriptors set. - In em_process_receive_interrupts(), call bus_dmamap_sync() for the descriptors set each time we modify one descriptor, instead of doing it only at the function exit, to make sure the adapters know he can re-use the descriptor. This helps on arm with write-back data cache (and possibly on other arches with bounce pages, I don't know) under heavy network load. Without this, if we attempt to process more than num_rx_desc descriptors, the adapter would just stop processing rx interrupts.
|
151314 |
14-Oct-2005 |
glebius |
From the PR:
The receive function em_process_receive_interrupts() unlocks the adapter while ether_input() processes the packet, and then locks it back. In the meantime, em_init() may be called, either from em_watchdog() from softclock interrupt or from the ifconfig(8) program. The em_init() resets the card, in particular it sets adapter->next_rx_desc_to_check to 0 and resets hardware RX Head and Tail descriptor pointers. The loop in em_process_receive_interrupts() does not expect these things to change, and a mess may result.
This fixes long wedges of em(4) interfaces receive part under high load and IP fastforwarding enabled.
PR: kern/87418 Submitted by: Dmitrij Tejblum <tejblum yandex-team.ru>
|
151312 |
14-Oct-2005 |
glebius |
Cleanup from __FreeBSD_version.
|
150968 |
05-Oct-2005 |
glebius |
- Don't pollute opt_global.h with DEVICE_POLLING and introduce opt_device_polling.h - Include opt_device_polling.h into appropriate files. - Embrace with HAVE_KERNEL_OPTION_HEADERS the include in the files that can be compiled as loadable modules.
Reviewed by: bde
|
150789 |
01-Oct-2005 |
glebius |
Big polling(4) cleanup.
o Axe poll in trap.
o Axe IFF_POLLING flag from if_flags.
o Rework revision 1.21 (Giant removal), in such a way that poll_mtx is not dropped during call to polling handler. This fixes problem with idle polling.
o Make registration and deregistration from polling in a functional way, insted of next tick/interrupt.
o Obsolete kern.polling.enable. Polling is turned on/off with ifconfig.
Detailed kern_poll.c changes: - Remove polling handler flags, introduced in 1.21. The are not needed now. - Forget and do not check if_flags, if_capenable and if_drv_flags. - Call all registered polling handlers unconditionally. - Do not drop poll_mtx, when entering polling handlers. - In ether_poll() NET_LOCK_GIANT prior to locking poll_mtx. - In netisr_poll() axe the block, where polling code asks drivers to unregister. - In netisr_poll() and ether_poll() do polling always, if any handlers are present. - In ether_poll_[de]register() remove a lot of error hiding code. Assert that arguments are correct, instead. - In ether_poll_[de]register() use standard return values in case of error or success. - Introduce poll_switch() that is a sysctl handler for kern.polling.enable. poll_switch() goes through interface list and enabled/disables polling. A message that kern.polling.enable is deprecated is printed.
Detailed driver changes: - On attach driver announces IFCAP_POLLING in if_capabilities, but not in if_capenable. - On detach driver calls ether_poll_deregister() if polling is enabled. - In polling handler driver obtains its lock and checks IFF_DRV_RUNNING flag. If there is no, then unlocks and returns. - In ioctl handler driver checks for IFCAP_POLLING flag requested to be set or cleared. Driver first calls ether_poll_[de]register(), then obtains driver lock and [dis/en]ables interrupts. - In interrupt handler driver checks IFCAP_POLLING flag in if_capenable. If present, then returns.This is important to protect from spurious interrupts.
Reviewed by: ru, sam, jhb
|
150710 |
29-Sep-2005 |
glebius |
In em_process_receive_interrupts() store and clear adapter->fmt. This make function reenterable. In the runtime the race is masked by serializing of em_process_receive_interrupts() either by interrupt thread, or by polling. The race can be triggered when polling is switched on or off.
|
150636 |
27-Sep-2005 |
mlaier |
Remove bridge(4) from the tree. if_bridge(4) is a full functional replacement and has additional features which make it superior.
Discussed on: -arch Reviewed by: thompsa X-MFC-after: never (RELENG_6 as transition period)
|
150388 |
20-Sep-2005 |
glebius |
Remove queue check from last commit. In most cases there is smth in queue, when start function is called.
Reviewed by: ru
|
150380 |
20-Sep-2005 |
glebius |
Check IFF_DRV_RUNNING and presense of packets in queue before calling em_start_locked(). This fixes panic on shutdown with active traffic passing through router.
Sponsored by: Rambler
|
150306 |
19-Sep-2005 |
imp |
Make sure that we call if_free(ifp) after bus_teardown_intr. Since we could get an interrupt after we free the ifp, and the interrupt handler depended on the ifp being still alive, this could, in theory, cause a crash. Eliminate this possibility by moving the if_free to after the bus_teardown_intr() call.
|
150124 |
14-Sep-2005 |
ru |
Fix "Memory modified after free" panic on detach, caused by accessing already freed struct ifnet.
|
148887 |
09-Aug-2005 |
rwatson |
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field.
Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so.
Reviewed by: pjd, bz MFC after: 7 days
|
148654 |
03-Aug-2005 |
rwatson |
Modify device drivers supporting multicast addresses to lock if_addr_mtx over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list.
Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> MFC after: 1 week
|
148636 |
02-Aug-2005 |
ru |
Add missing ether_poll_deregister(). This is still not enough to kldunload/kldload without a panic. The same (but worse) problem is also present in ixgb(4).
|
147890 |
11-Jul-2005 |
delphij |
Correct a minor typo.
Pointed out by: Xuefeng DENG <dengxf at dengh com> Approved by: re (scottl)
|
147256 |
10-Jun-2005 |
brooks |
Stop embedding struct ifnet at the top of driver softcs. Instead the struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com.
This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go.
Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr.
Reviewed by: sobomax, sam
|
146663 |
26-May-2005 |
tackerman |
Latest README to correspond to latest Intel version 2.1.7
|
146662 |
26-May-2005 |
tackerman |
Changes to update driver with latest Intel driver version 2.1.7 - Changed from using explicit devices id to using descriptive labels. - Added support for 82573 and 82546 Quad adapters. - Corrected support for 82547EI and 82541ER (mac_type was not assigned) - Removed #ifdef DBG_STATS and extraneous code.
if_em_hw.c/if_em_hw.h - Added support for 82573 and 82546 Quad adapters. - Brought forward Intel's most current mac and phy changes.
|
144652 |
05-Apr-2005 |
glebius |
Run em_local_timer() once per second instead of running it once per 2 seconds. This makes gathering of error stats more precise, and netstat(1) output look right.
Reviewed by: tackerman
|
143161 |
05-Mar-2005 |
imp |
Use BUS_PROBE_DEFAULT for pci probe return value
|
141298 |
04-Feb-2005 |
glebius |
Call if_link_state_change() when link status changes.
PR: kern/76890 Reviewed by: rwatson, sam
|
140859 |
26-Jan-2005 |
yar |
Respect the current setting of IFCAP_VLAN_HWTAGGING on the interface when going to toggle VLAN support for internal reasons. If the IFCAP_VLAN_HWTAGGING bit is cleared, we should rely on the (re)init routine to turn VLAN support off and never touch the relevant hardware bits.
This applies to other capability bits, too. The user obviously has a reason for clearing a capability bit, e.g., if his particular NIC is buggy and hangs if a certain hardware capability is turned on even for a fraction of a second.
The flag adapter->em_insert_vlan_header still is set or reset irrespective of the IFCAP_VLAN_HWTAGGING setting, as before, in order to handle the case when a user sets promiscuous mode on an interface first and later turns its IFCAP_VLAN_HWTAGGING bit on.
This change might look orthogonal to rev#1.85, but in fact it is not. It introduces bugfixes that hopefully will make implementing the general scheme mentioned in the commit message of rev#1.85 easier.
|
140857 |
26-Jan-2005 |
rwatson |
Disable use of hardware VLAN tagging and stripping in if_em in the default configuration: it appears to work properly in the non-promiscuous case, but we've not yet implemented a more general solution that maintains full functionality with promiscuous mode enabled. While my hope is that we can get one implemented soon, this will improve functionality substantially in the mean time.
MFC after: 3 days
|
140318 |
15-Jan-2005 |
scottl |
Convert if_em to the new bus_dmamap_load_sg() interface. The old callback was really just a waste of cycles, so this streamlines it considerably.
|
139749 |
06-Jan-2005 |
imp |
Start each of the license/copyright comments with /*-, minor shuffle of lines
|
139549 |
01-Jan-2005 |
tackerman |
Corrected a workaround that should only be applied to one adapter. Workaround was causing device hangs when incorrectly applied to other adapters.
PR: kern/66634
|
139548 |
01-Jan-2005 |
tackerman |
Added device id support for Intel 82541ER and 82546GB dual port PCIE adapter.
PR: None
|
137700 |
14-Nov-2004 |
rwatson |
Further refine the if_em vlan fix in if_em.c:1.53:
- Because em_encap() can now fail in a way that leaves us without an mbuf chain, potentially set *m_headp to NULL if that happens, so that the caller can do the right thing. This case can occur when we try to prepend the vlan header mbuf but can't allocate additional memory.
- Modify the caller of em_encap() to detect a NULL m_head and not try to queue the mbuf if that happens.
- When em_encap() fails, make sure to call bus_dmamap_destroy() to clean up.
|
137609 |
12-Nov-2004 |
rwatson |
Correct a bug in the if_em driver relating to the use of vlans with promiscuous mode introduced in 1.45, which programs the em card not to strip or prepend tags when in promiscuous mode without also modifying behavior to manually prepend a vlan header in the event that the card isn't doing it on transmit. Due to a feature of card operation, if the global VLAN prepend/strip register isn't set, setting the VLAN tag flag on individual packet descriptors will cause the packet to be transmitted using ISL encapsulation rather than 802.1Q VLAN encapsulation.
This fix causes em_encap() to prepend the header by tracking whether the card is configured to temporarily disable prepending/stripping due to promiscuous mode. As a result, entering promiscuous mode on the parent em interface no longer causes vlans to appear to "wedge" or transmit ISL-encapsulated frames, which typically will not be configured/spoken by the other endpoints on the VLAN trunk. This bug may also exist in other drivers, and the additional vlan encapsulation logic should be abstracted and centralized in if_vlan.c if so.
RELENG_5_3 candidate.
MFC after: 1 week Tested by: pjd, rwatson Reported by: astesin at ukrtelecom dot net Reported by: Mike Tancsa <mike at sentex dot net> Reported by: Iasen Kostov <tbyte at OTEL dot net>
|
137583 |
11-Nov-2004 |
des |
Unbreak the build.
Pointy hat to: bms
|
137576 |
11-Nov-2004 |
bms |
Remove now-unused sysctl members.
|
137575 |
11-Nov-2004 |
bms |
Move per-instance sysctls under the per-device-instance tree.
Reviewed by: mux Prodded by: rwatson
|
137155 |
03-Nov-2004 |
phk |
Put the "Link is up/down" printfs behind bootverbose. gigE is not so uncommon that we need to tell people about every cable in the network anymore. It can be enabled for debugging purposes with "boot -v".
|
136718 |
19-Oct-2004 |
mux |
Add missing bus_dmamap_sync() calls. If you are using an architecture with a weak memory model or x86 + PAE (or more specifically, your driver is using bounce pages) and you have had problems with em(4), this may fix it. At least this is needed to have em(4) work properly on FreeBSD/arm.
Original version by: cognet Reviewed by: tackerman Tested by: cognet
|
136685 |
19-Oct-2004 |
scottl |
Use an alignment of 1 instead of PAGE_SIZE for the rx and tx buffer tags. Since the e1000 DMA engines hava no constraints on the alignment of buffer transfers, there is no reason to tell busdma that there is. This save a minimum of 1 malloc call per packet, which translates to eliminating 4 locks. It also means that buffers are not needlessly bounced when transfered. The end result is a 38% improvement in pps in a 4 way bridging environment.
Obtained from: Sandvine, Inc.
|
136300 |
09-Oct-2004 |
scottl |
Don't count RNBC (internal buffer full) towards the RX error count since it's not really an error.
Submitted by: Gerrit Nagelhout
|
135937 |
29-Sep-2004 |
mlaier |
Fix typeo. Should read ***!***IFQ_DRV_IS_EMPTY. This might fix some of the trouble around em(4) filling up its buffers.
Submitted by: mtm Pointy hat to: mlaier MFC after: 2 days
|
135676 |
23-Sep-2004 |
cognet |
Do not use the IO-mapping to issue the reset on the 82546 on arm. For some reason, it results in corrupted descriptors.
|
134619 |
01-Sep-2004 |
pdeuskar |
Added support for Intel PRO/1000 GT Desktop Adapter(Device ID 8086 107C) Removed support for Intel 82541ER Added fix for 82547 which corrects an issue with Jumbo frames larger than 10k. Added fix for vlan tagged frames not being properly bridged. Corrected TBI workaround. Corrected incorrect LED operation issues
Submitted by: tackerman (Tony Ackerman) MFC after: 2 weeks
|
131455 |
02-Jul-2004 |
mlaier |
Bring in the first chunk of altq driver modifications. This covers the following drivers: bfe(4), em(4), fxp(4), lnc(4), tun(4), de(4) rl(4), sis(4) and xl(4)
More patches are pending on: http://peoples.freebsd.org/~mlaier/ Please take a look and tell me if "your" driver is missing, so I can fix this.
Tested-by: many No-objection: -current, -net
|
130079 |
04-Jun-2004 |
yar |
Implement support for controlling VLAN_HWTAGGING through ioctl(SIOCSIFCAP). This includes not only toggling the flag in if_capenable, but also really reconfiguring the hardware.
Approved by: tackerman (as the em(4) maintainer)
|
129879 |
30-May-2004 |
phk |
Add missing <sys/module.h> includes
|
129616 |
23-May-2004 |
mux |
We don't need to initialize if_output, ether_ifattach() does it for us.
|
129481 |
20-May-2004 |
yar |
Stylistic changes around the previous commit:
- since the number of supported capabilities is growing, set bits in if_cap* in a consistent way;
- unexpand(1) leading SPACE characters.
|
129479 |
20-May-2004 |
yar |
Set the VLAN bits in if_capenable as well as in if_capabilities because VLAN hardware features are enabled in em(4) by default.
Note: Currently vlan(4) has a bug that it consults if_capabilities, not if_capenable. This will be fixed after all the network drivers set VLAN bits in if_capenable properly.
|
128139 |
11-Apr-2004 |
ru |
Implemented per-interface polling(4) control.
|
127135 |
17-Mar-2004 |
njl |
Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
|
125673 |
10-Feb-2004 |
pdeuskar |
Only reset the phy when it is absolutely required. This should fix the issues with long *init* times when you do ifconfig em0 alias.
MFC after: 3 days
|
123225 |
07-Dec-2003 |
deischen |
Don't call em_stop() from the watchdog since it requires the controller mutex to be locked. It is redundant since em_init() is called and this correctly locks the mutex and calls em_stop().
5.2 release candidate since this can cause a panic if the watchdog expires.
Tested by: kuriyama
|
123115 |
02-Dec-2003 |
pdeuskar |
Use if_flags to check for IFF_POLLING instead of if_ipending.
Submitted by: jroberson (Jeff Roberson) Approved by: re (scottl)
|
122681 |
14-Nov-2003 |
pdeuskar |
- Code cleanup - In the receive routine handle the case where last descriptor could have less than 4 bytes of data. - Handle race between detach/ioctl routine.
MFC after: 3 days
|
121816 |
31-Oct-2003 |
brooks |
Replace the if_name and if_unit members of struct ifnet with new members 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)
|
121106 |
15-Oct-2003 |
deischen |
Add a wrapper for a function that takes and releases the adapter lock around a call to the original function. Make the timeout function in callout_reset() use the wrapped function to avoid a lock assertion panic.
Reviewed by: sam Reported by: cgiordano@ids.net
|
120989 |
10-Oct-2003 |
sam |
locking fixups:
o correct recursive locking when polling and in em_82547_move_tail o destroy mutex on detach o add EM_LOCK_ASSERT and similar macros for creating+deleteing the mtx
Submitted by: Daniel Eischen <eischen@vigrid.com>
|
120364 |
23-Sep-2003 |
sam |
add locking
Reviewed by: Prafulla Deuskar <pdeuskar@FreeBSD.ORG> Sponsored by: FreeBSD Foundation
|
119509 |
27-Aug-2003 |
pdeuskar |
Add support for new devices. Bug Fixes: - Allow users to use LAA - Remember promiscuous mode settings while bridging - Allow gratuitous arp's to be sent
PR: 52966/54488 MFC after: 1 week
|
119418 |
24-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor style cleanups.
|
119277 |
22-Aug-2003 |
imp |
Prefer new location of pci include files (which have only been in the tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
|
118314 |
01-Aug-2003 |
jdp |
Add facilities for tuning the "em" driver's interrupt delays without recompiling the driver. See the comments near the top of "if_em.h" for descriptions of these delays. Four new loader tunables control the system-wide default values:
hw.em.tx_int_delay hw.em.rx_int_delay hw.em.tx_abs_int_delay hw.em.rx_abs_int_delay
The tunables are specified in microseconds. The valid range is 0-67108 usec., and 0 means that the timer is disabled.
There are also four new sysctls (actually, a set of four for each "em" device in the system) to query and change the interrupt delays after the system is up:
hw.em0.tx_int_delay hw.em0.rx_int_delay hw.em0.tx_abs_int_delay (not present for 82542/3/4 adapters) hw.em0.rx_abs_int_delay (not present for 82542/3/4 adapters)
It seems to be OK to change these values even while the adapter is passing traffic.
Approved by: Prafulla Deuskar <pdeuskar@FreeBSD.ORG> MFC after: 4 weeks
|
117697 |
17-Jul-2003 |
jdp |
Correct comments to indicate that the EM_RADV and EM_TADV parameters are not applicable to the 82544.
|
117218 |
04-Jul-2003 |
mux |
The em(4) driver has been converted to busdma and doesn't use vtophys() anymore, so remove the alpha hack which defines vtophys() to alpha_XXX_dmamap().
|
117126 |
01-Jul-2003 |
scottl |
Mega busdma API commit.
Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour.
sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen.
If anyone gets panics or warnings from dflt_lock() being called, please let me know right away.
Reviewed by: tmm, gibbs
|
115878 |
05-Jun-2003 |
pdeuskar |
Add support for Quad port adapter Add sysctl's to display statistics/debug_info Set WAIT_FOR_AUTONEG_DEFAULT to zero by default Increment packet in/out statistics inline instead of every two seconds.
MFC after: 3 days
|
114776 |
06-May-2003 |
des |
Fix a printf() format error which broke the ia64 GENERIC build.
|
114567 |
03-May-2003 |
pdeuskar |
- Fix breakage on PAE enabled kernel - Don't use vtophys when you can get physical address using bus_dma API
Submitted by: jake (Jake Burkholder)
|
114554 |
02-May-2003 |
pdeuskar |
- Bus DMA'fy the driver - Use htole* macros where appropriate so that the driver could work on non-x86 architectures - Use m_getcl() instead of MGETHDR/MCLGET macros Submitted by: sam (Sam Leffler)
|
113673 |
18-Apr-2003 |
pdeuskar |
Tell the upper layer(s) that we support long frames. Not doing this caused the vlan mtu to be reduced by 4 bytes.
Submitted by: Doug Ambrisko (ambrisko) MFC after: 1 day
|
113506 |
15-Apr-2003 |
mdodd |
- Express hard dependencies on bus (pci, isa, pccard) and network layer (ether). - Don't abuse module names to facilitate ifconfig module loading; such abuse isn't really needed. (And if we do need type information associated with a module then we should make it explicit and not use hacks.)
|
112472 |
21-Mar-2003 |
pdeuskar |
Added support for 82541 and 82547 based adapters. - These have Intel gigabit PHY - 82547 uses CSA interface
MFC after: 1 week
|
111119 |
19-Feb-2003 |
imp |
Back out M_* changes, per decision of the TRB.
Approved by: trb
|
109623 |
21-Jan-2003 |
alfred |
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
|
108894 |
07-Jan-2003 |
pdeuskar |
The README refers to a LICENSE file, so add that file too. BTW the license is also embedded in the source files.
MFC after: 1 day
|
108533 |
01-Jan-2003 |
schweikh |
Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, especially in troff files.
|
108229 |
23-Dec-2002 |
pdeuskar |
- Move to array based indexing for TX/RX descriptor/buffer management - Added support for ITR (interrupt throttle register). This feature is available on adapters based on 82545 and above - Fixed problem with vlan support when traffic has priority bits set. (kern/45907)
PR: kern/45907 MFC after: 1 week
|
107243 |
25-Nov-2002 |
luigi |
Fix IFF_ALLMULTI handling.
Reviewed by: pdeuskar (maintainer) Approved by: re
|
107242 |
25-Nov-2002 |
luigi |
Add polling support to the "em" driver.
Reviewed by: pdeuskar (maintainer) Approved by: re
|
106937 |
14-Nov-2002 |
sam |
network interface driver changes:
o don't strip the Ethernet header from inbound packets; pass packets up the stack intact (required significant changes to some drivers) o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN) o track ether_ifattach/ether_ifdetach API changes o track bpf changes (use BPF_TAP and BPF_MTAP) o track vlan changes (ifnet capabilities, revised processing scheme, etc.) o use if_input to pass packets "up" o call ether_ioctl for default handling of ioctls
Reviewed by: many Approved by: re
|
106649 |
08-Nov-2002 |
pdeuskar |
- Set RS (Report Status) bit on all descriptors of a packet instead of just the last one. - Set RDTR to zero by default instead of 28. - Fixed a problem with TX hangs with jumbo frames when number of fragments in the mbuf chain is large. - Added support for 82540EP based cards.
MFC after: 3 days
|
103895 |
24-Sep-2002 |
pdeuskar |
Corrected license in the source files. It should say "MUST" instead of "MAY".
MFC after: 2 days
|
102452 |
26-Aug-2002 |
pdeuskar |
Back out TX/RX descriptor/buffer management changes from earier commit. We are having panics with the driver under stress with jumbo frames. Unfortunately we didnot catch it during our regular test cycle. I am going to MFC the backout immediately.
|
102242 |
21-Aug-2002 |
pdeuskar |
TX/RX descriptor/buffer management changes. Use array based scheme instead of queueing macros.
Submitted by: Luigi Rizzo (rizzo@icir.org) MFC after: 3 days
|
100184 |
16-Jul-2002 |
pdeuskar |
- Use IO mode to reset the controller (82544 and beyond) - Read the Mac address only once during attach. (This fixes the failover issue observed using the bonding driver)
MFC after: 3 days
|
98404 |
18-Jun-2002 |
pdeuskar |
Removed unneeded files. if_em_fxhw.[c,h] and if_em_phy.[c,h] have been merged into one [c,h] file.
MFC after: 3 days
|
97785 |
03-Jun-2002 |
pdeuskar |
Added support for 82545EM and 82546EB based adapters. Added Vlan support.
MFC after: 1 week
|
97208 |
24-May-2002 |
peter |
Fix new gcc-3.1 warnings. I think this gets GENERIC compiling cleanly again.
|
95962 |
02-May-2002 |
pdeuskar |
Make em driver compilable on IA64/alpha.
Submitted by: peter MFC after: 3 days
|
95673 |
28-Apr-2002 |
phk |
Follow NetBSD and s/IFM_1000_TX/IFM_1000_T/
|
93914 |
06-Apr-2002 |
pdeuskar |
Added support for 82540EM based cards. Cosmetic changes to make code more unix-like.
MFC after: 1 week
|
92739 |
20-Mar-2002 |
alfred |
Remove __P.
|
90628 |
13-Feb-2002 |
pdeuskar |
- Added support for receive in multiple descriptors. This simplifies code for jumbo frames. - Cleaned up coding conventions to make code more unix-like. - Cleaned up code in if_em_fxhw.c and if_em_phy.c. Added relevant comments.
MFC after: 1 week
|
88308 |
20-Dec-2001 |
pdeuskar |
-Remove unneeded include stddef.h -Modify modules Makefile so that em driver compiles only on i386 platform. (Alpha not supported yet)
PR: kern/32993 MFC after: 1
|
87450 |
06-Dec-2001 |
pdeuskar |
Fixed two problems: 1. Changed incorrect conditional in fxhw.c which would never evaluate to true. Thanks to John Polstra for pointing that out. 2. Write to PCI config space by default, enabling memory access and bus master enable.
Submitted by:Prafulla Deuskar MFC after:3 days
|
87189 |
02-Dec-2001 |
pdeuskar |
This is the first commit of the Intel gigabit driver for PRO/1000 cards.
Submitted by:Prafulla Deuskar Reviewed by: Paul Saab MFC after:1 week
|