summaryrefslogtreecommitdiffstats
path: root/sys/dev/e1000
Commit message (Collapse)AuthorAgeFilesLines
* Update the Intel igb driver to version 2.4.0jfv2013-10-0920-1202/+2003
| | | | | | | | | | | - 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
* Expose system level ixgbe sysctls.hiren2013-10-051-0/+3
| | | | | | | | | | | 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
* Restructure the mbuf pkthdr to make it fit for upcoming capabilities andandre2013-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Alter the mq_start routine to do a TRYLOCK and call to the locked routinejfv2013-08-131-1/+7
| | | | | | 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.
* Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCIscottl2013-08-123-27/+3
| | | | | | | | | | | | | | | | | 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
* Improve the MSIX setup code in the drivers, thanks to Marius forjfv2013-08-122-11/+23
| | | | | | | | 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
* Make the various driver MSIX setup routines fallback to MSI morejfv2013-08-062-23/+24
| | | | | | | gracefully. This change was suggested by Marius Strobl, thank you. PR: kern/181016 MFC after: ASAP
* When the igb driver is static there are cases when early interrupts occur,jfv2013-08-061-0/+4
| | | | | | | 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)
* Change the E1000 driver option header handling to match thejfv2013-07-123-6/+9
| | | | | | | | | | 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
* if_lem.c: make sure that lem_rxeof() can drain the entire rx queueluigi2013-05-094-5/+27
| | | | | | | | | | | | 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
* simplify the code to initialize the RDT while in netmap mode.luigi2013-05-092-20/+9
|
* Update Intel email address.eadler2013-05-021-1/+1
| | | | | | PR: docs/175349 Submitted by: Lars Eggert <lars@netapp.com> Discussed with: jfv
* use netmap_rx_irq() and netmap_tx_irq() instead of replicating theluigi2013-04-301-10/+3
| | | | logic in the individual driver.
* use netmap_rx_irq() / netmap_tx_irq() to handle interrupts inluigi2013-04-302-43/+9
| | | | | | netmap mode, removing the logic from individual drivers. (note: if_lem.c not updated yet due to some other pending modifications)
* Corrections to the RX checksum code, make sure its disabled asjfv2013-04-151-25/+18
| | | | | | 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.
* Simplify allocate_legacy code, txr pointer was breaking LEGACY compile,jfv2013-04-101-2/+1
| | | | thanks to Nick Rogers for pointing this out.
* Correct the multicast handling in the E1000 drivers as wasjfv2013-04-033-13/+89
| | | | | | 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.
* Update man page for igb(4) with a little bit of information aboutsbruno2013-04-031-1/+2
| | | | | | | | | | | 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
* Change the define in the header to eliminate unnecessary datajfv2013-03-291-1/+1
| | | | when using LEGACY TX.
* Change defines in the igb driver to allow an easier selection ofjfv2013-03-291-18/+18
| | | | | | | | 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
* Refresh on the shared code for the E1000 drivers.jfv2013-02-2123-2089/+2521
| | | | | | | | | | | | | | | | | | | | - 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.
* This fixes a out-of-order problem with severalrrs2013-02-072-18/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on ↵sbz2013-01-303-3/+3
| | | | | | | device_method_t arrays Reviewed by: cognet Approved by: cognet
* Fixed mbuf free when receive structures fail to allocate.smh2013-01-121-2/+2
| | | | | | | | | 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
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-043-14/+14
| | | | malloc(9) flags in sys/dev.
* drbr_enqueue() awlays consumes mbuf, no matter did itglebius2012-11-261-27/+13
| | | | | | | | | | | | | | | 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
* Now that device disabling is generic, remove extraneous code from theeadler2012-10-221-5/+0
| | | | | | | | | | 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
* This isn't functionally identical. In some cases a hint to disableeadler2012-10-223-0/+15
| | | | | | | | unit 0 would in fact disable all units. This reverts r241856 Approved by: cperciva (implicit)
* Now that device disabling is generic, remove extraneous code from theeadler2012-10-223-15/+0
| | | | | | | | device drivers that used to provide this feature. Reviewed by: des Approved by: cperciva MFC after: 1 week
* remove duplicate semicolons where possible.eadler2012-10-221-1/+1
| | | | | Approved by: cperciva MFC after: 1 week
* The drbr(9) API appeared to be so unclear, that most drivers inglebius2012-09-282-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge similar fixes from 223198 from igb to ixgbe:jhb2012-09-261-1/+1
| | | | | | | | | | | | | | - 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
* This patch fixes a nit in the em, lem, and igb driver statistics. Incrementsbruno2012-09-233-3/+3
| | | | | | | | | 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
* Switch some PCI register reads from using magic numbers to using the namesgavin2012-09-191-1/+1
| | | | | | defined in pcireg.h MFC after: 1 week
* Align the PCI Express #defines with the style used for the PCI-Xgavin2012-09-181-3/+3
| | | | | | | | | | | | | | | | | #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
* Correct double "the the"eadler2012-09-142-2/+2
| | | | | Approved by: cperciva MFC after: 3 days
* Customer report of a panic on boot due to the oldjfv2012-08-151-0/+2
| | | | | | | | | | | "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.
* Make the polling interface in igb able to handlejfv2012-08-061-19/+19
| | | | | | | multiqueue, and correct the rxdone handling. Update the polling man page to include igb as well. Thanks to Mark Johnston for these changes.
* Correct the mq_start routine to avoid out-of-orderjfv2012-08-061-3/+11
| | | | | | packet delivery, always enqueue when possible. Also correct the DEPLETED test as multiple bits might be set. Thanks to Randall Stewart for the changes!
* CPU_NEXT() already handles wrapping around to the beginning. Also, in asbruno2012-08-021-1/+0
| | | | | | | | | | 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@
* Clean up some unused leftover code from emjfv2012-07-311-74/+30
| | | | | | | Make IRQ style a tuneable Fix lock handling in the interrupt handler MFC after:3 days
* remove some extra testing code that slipped into the previous commitluigi2012-07-251-33/+0
| | | | Reported-by: Alexander Motin
* Use legacy interrupts as a default. This gives up to 10% speedupluigi2012-07-251-0/+34
| | | | | | | | 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
* Change the interface to the Energy Efficient Ethernet (EEE)jfv2012-07-072-8/+57
| | | | | | | | | | | 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)
* Correct small regressions pointed out by jhb, thanks John.jfv2012-07-051-3/+1
| | | | MFC after:5 days
* Sync with Intel internal source:jfv2012-07-0520-1080/+2259
| | | | | | | | 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
* Commit a portion of 233708 I missed earlier and don't include thejhb2012-06-011-3/+6
| | | | | definition of igb_start() and igb_start_locked() (nor set if_start in the ifnet) when igb(4) uses if_transmit.
* Initialize "error" to zero when it's declared in em_setup_receive_ring()kevlo2012-05-111-1/+1
|
* Modify the binding of queues to attach to as many CPUssbruno2012-05-101-2/+17
| | | | | | | | | | | 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
* Fix cut-and-paste comment erroremaste2012-04-251-1/+1
| | | | Submitted by: sbruno
OpenPOWER on IntegriCloud