summaryrefslogtreecommitdiffstats
path: root/sys/dev/mxge
Commit message (Collapse)AuthorAgeFilesLines
* MFC r258779,r258780,r258787,r258822:eadler2014-02-041-1/+1
| | | | | | | | | | | | | 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. Similar to the (1 << 31) case it is not defined to do (2 << 30). 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.
* Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCIscottl2013-08-121-4/+1
| | | | | | | | | | | | | | | | | 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
* - Correct mispellings of word resourcegabor2013-04-171-1/+1
| | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
* Several cleanups and fixes to mxge:gallatin2013-02-251-46/+25
| | | | | | | | | | | | | | | | | | | | - Remove vestigial null pointer tests after malloc(..., M_WAITOK). - Remove vestigal qualhack union - Use strlcpy() instead of the error-prone strncpy() when parsing EEPROM and copying strings - Check the MAC address in the EEPROM strings more strictly. - Expand the macro MXGE_NEXT_STRING() at its only user. Due to a typo, the macro was very confusing. - Remove unnecessary buffer limit check. The buffer is double-NUL terminated per construction. PR: kern/176369 Submitted by: Christoph Mallon <christoph.mallon gmx.de>
* Bump mxge copyright.gallatin2013-02-222-2/+2
| | | | | | Sponsored by: Myricom MFC After: 7 days
* Improvements for newer mxge nics:gallatin2013-02-221-4/+12
| | | | | | | | | | | | | - Some mxge nics may store the serial number in the SN2 field of the EEPROM. These will also have an SN=0 field, so parse the SN2 field, and give it precedence. - Skip MXGEFW_CMD_UNALIGNED_TEST on mxge nics which do not require it. This saves roughly 10ms per port at device attach time. Sponsored by: Myricom MFC After: 7 days
* Try harder to make mxge safe for all combinations of INET and INET6gallatin2013-02-221-2/+5
| | | | | | | | | | | | | | | | | - Re-fix build by restoring local removed in r247151, but protected by #if defined(INET) || defined(INET6) so that the compile succeeds in the !(INET||INET6) case. - Protect call to in_pseudo() with an #ifdef INET, to allow a kernel to link with mxge when INET is not compiled in. - Also remove an errant (improperly commented) obsolete debugging printf Thanks to Glebius for pointing out the !(INET||INET6) build issue. Sponsored by: Myricom MFC After: 7 days
* Fix build.glebius2013-02-221-1/+0
|
* Improve mxge's receive performance for IPv6:gallatin2013-02-213-530/+148
| | | | | | | | | - Add support for IPv6 rx csum offload - Finally switch mxge from using its own driver lro, to using tcp_lro MFC after: 7 days Sponsored by: Myricom Inc.
* Add support to mxge for IPv6 TX csum offload & IPv6 TSO.gallatin2013-02-192-52/+226
| | | | | Sponsored by: Myricom, Inc. MFC after: 7 days
* Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on ↵sbz2013-01-301-1/+2
| | | | | | | device_method_t arrays Reviewed by: cognet Approved by: cognet
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-041-3/+3
| | | | malloc(9) flags in sys/dev.
* Utilize new macro to initialize if_baudrate.glebius2012-10-181-2/+2
|
* Revert previous commit...kevlo2012-10-104-4/+4
| | | | Pointyhat to: kevlo (myself)
* Prefer NULL over 0 for pointerskevlo2012-10-094-4/+4
|
* The drbr(9) API appeared to be so unclear, that most drivers inglebius2012-09-281-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update mxge(4) firmware to the latest version available fromgallatin2012-05-294-34836/+34187
| | | | | | | Myricom (1.4.55). MFC after: 3 days Sponored by: Myricom, Inc.
* More conversions of drivers to use the PCI parent DMA tag.scottl2012-03-121-1/+1
|
* Use strchr() and strrchr().ed2012-01-021-1/+1
| | | | | | | | It seems strchr() and strrchr() are used more often than index() and rindex(). Therefore, simply migrate all kernel code to use it. For the XFS code, remove an empty line to make the code identical to the code in the Linux kernel.
* Update mxge(4) firmware to the latest version available fromgallatin2011-07-124-34013/+34835
| | | | | | | Myricom (1.4.53a). MFC after: 7 days Sponored by: Myricom, Inc.
* Fix media reporting for dual port CX4 myri10ge NICsgallatin2011-07-121-1/+1
| | | | | MFC after: 7 days Sponsored by: Myricom, Inc.
* Fix a bug in mxge's LRO which can cause dup acks togallatin2011-04-071-2/+4
| | | | | | | | | get aggregated & hence prevent TCP from entering fast retransmit. Pointed out by: jeff Reviewed by: gnn MFC after: 7 days
* Implement mxge_init()gallatin2011-04-061-0/+8
| | | | | | | | | | | This fixes a long standing bug in mxge(4) where "ifconfig mxge0 $IP" did not bring the interface into a RUNNING state, like it does on most (all?) other FreeBSD NIC drivers. Thanks to gnn for mentioning the bug, and yongari for pointing out that ether_ioctl() invokes ifp->if_init() in SIOCSIFADDR. MFC after: 7 days
* Do a sweep of the tree replacing calls to pci_find_extcap() with calls tojhb2011-03-231-3/+3
| | | | pci_find_cap() instead.
* Use a regular taskqueue rather than a fast taskqueue for mxge(4).jhb2011-01-071-3/+2
| | | | Reviewed by: gallatin
* Fix a TSO checksum bug on mxge(4):gallatin2010-11-221-1/+12
| | | | | | | | | | | | | | | | | The Myri10GE NIC will assume all TSO frames contain partial checksum, and will emit TSO segments with bad TCP checksums if a TSO frame contains a full checksum. The mxge driver takes care to make sure that TSO is disabled when checksum offload is disabled for this reason. However, modules that modify packet contents (like pf) may end up completing a checksum on a TSO frame, leading to the NIC emitting TSO segments with bad checksums. To workaround this, restore the partial checksum in the mxge driver when we're fed a TSO frame with a full checksum. Reported by: Bob Healey MFC after: 3 days
* Add interrupt descriptions for mxge's msi-x vectorsgallatin2010-05-211-0/+2
|
* Correctly identify some twinax cables, which reportgallatin2010-05-191-1/+2
| | | | a media type of 1.
* Update mxge firmware to latest available from Myricom.gallatin2010-05-194-33887/+34014
|
* Add a fastpath to allocate from packet zone when using m_getjcl.fabient2010-05-071-4/+1
| | | | | | | This will add support for packet zone for at least igb and ixgbe and will avoid to check for that in bce and mxge. MFC after: 1 week
* Add missing IFCAP_LINKSTATE to mxgegallatin2010-04-151-1/+1
| | | | Submitted by: yongari
* Cleanup if_media handling in mxge(4)gallatin2010-04-152-44/+79
| | | | | | | | | | | - Re-probe xfp / sfp+ socket on link events, in case user has changed transceiver - correctly report current media to avoid confusing lagg (reported by Panasas) - Report link speed (submitted by yongari) Reviewed by: yongari (earlier version) MFC after: 7 days
* Fix 2 bugs in mxge_attach()gallatin2010-03-171-3/+3
| | | | | | | | | | | - Don't leak slice resources when mxge_alloc_rings() fails - Start taskq threads only after we know attach will succeed. At boot time, taskqueue_terminate() will loop infinately, waiting for the threads to exit, and hang the system. Submitted by: Panasas MFC After: 3 days
* Update mxge to support IFCAP_VLAN_HWTSO.gallatin2010-02-221-0/+12
| | | | | Note: If/when FreeBSD supports TSO over IPv6, the minimal mxge fw rev to enable IFCAP_VLAN_HWTSO will need to be increased to 1.4.37
* Fix drbr and altq interaction:mlaier2010-02-131-1/+1
| | | | | | | | | | | | | | | - 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
* Use better default RSS hash (src + dst, rather than just src port)gallatin2010-01-111-2/+2
| | | | MFC after:3 days
* Update mxge(4) firmware to 1.4.48b (latest available) from Myricom.gallatin2010-01-114-32936/+33883
| | | | | | | | | | | | | | | | | | | | | Pertinant highlights from Myricom CHANGES file include: - Make sure invalid external smbus activity cannot affect performance - Fix to avoid a bug where the link could sometimes stay reported as up on after unplugging the cable. - For 8B NIC, make smbus connection passive at init to avoid possible address conflicts - Increase number of slices to 17 for multi-slice fw - Fix a bug where packets dropped because of link_overflow could be occasionally reported as bad_crc32 - Add selectable failover strategy for dual-port chip: symmetric or primary/backup - On failover, send RARP broadcast to make the change immediately known to the network - Change endianess for PCI Device Serial Number - For dual-port NICs, time to failover is now a few microsecs instead of a few millisecs. MFC after: 3 days
* Fix reporting of 10G Twinax mediagallatin2010-01-111-1/+2
| | | | | Reported by: mjacob MFC after: 3 days
* Remove extraneous semicolons, no functional changes.mbr2010-01-071-15/+15
| | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
* Don't take the driver mutex in mxge_tick(), as itgallatin2009-12-221-2/+0
| | | | | | | is run with the mutex held. Submitted by: rwatson MFC after: 3 days
* Make mxge do a better job recovering from NIC h/w faultsgallatin2009-10-201-13/+37
| | | | | | | by checking PCI config space when the NIC is not transmitting. Previously, a h/w fault would not have been detected if the NIC was down, or handling an RX only workload.
* Move mxge(4)'s NIC watchdog reset handler fromgallatin2009-10-192-22/+66
| | | | a callout to a taskqueue
* Two more mxge watchdog fixes:gallatin2009-09-302-4/+14
| | | | | | | | | | | | 1) Restore the PCI Express control register after a watchdog reset. This is required because the device will come out of watchdog reset with the pectl reg at its default state, and important BIOS configuration (like max payload size) could be lost. 2) Call mxge_start_locked() for every tx queue before dropping the lock in the watchdog handler. This is required, as the queue's buf ring may have filled during the reset.
* Improve mxge watchdog routine's ability to reliably reset a failed NIC:gallatin2009-09-211-27/+72
| | | | | | | | | | | | | | | - Mark the link as down, so if watchdog reset fails, link watching failover software can notice it - Don't send MXGEFW_CMD_ETHERNET_DOWN if the NIC has been reset, it is not needed, and will fail on a freshly reset NIC. - Ensure the transmit routines aren't attempting to PIO write to doorbells while the NIC is being reset. - Download the correct f/w, rather than using the EEPROM f/w after reset. - Export a count of the number of watchdog resets via sysctl - Zero all f/w stats at reset. This will lead to less confusing diagnostic output when investigating NIC failures. MFC after: 3 days
* Add support for throttling transmit bandwidth. This is most commonlygallatin2009-09-212-2/+60
| | | | | used to reduce packet loss on high delay (WAN) paths with a slow link.
* mxge's tunable hw.mxge.rss_hash_type cannot be set from thegallatin2009-07-221-0/+1
| | | | | | | | | | | | loader, because it uses a reserved suffix (_type). Fix this by removing the "_" and renaming the tunable to hw.mxge.rss_hashtype. The old (rss_hash_type) tunable is still fetched, in case people load the driver via scripts. When both are present in the kernel environment, the new value (hw.mxge.rss_hashtype) overrides the old value. Approved by: re (kib)
* Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/rwatson2009-06-261-3/+3
| | | | | | | | | | | | | 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
* Add a dying flag to prevent races at detach.gallatin2009-06-242-0/+7
| | | | | | | | | | I tried re-ordering ether_ifdetach(), but this created a new race where sometimes, when under heavy receive load (>1Mpps) and running tcpdump, the machine would panic. At panic, the ithread was still in the original (not dead) if_input() path, and was accessing stale BPF data structs. By using a dying flag, I can close the interface prior to if_detach() to be certain the interface cannot send packets up in the middle of ether_ifdetach.
* Allow admin to specify the initial mtu upon driver loadgallatin2009-06-241-3/+8
| | | | for mxge.
* - Fix bug where device would loose promisc setting when reset.gallatin2009-06-231-2/+2
| | | | - Allow all rss hash modes to be chosen
OpenPOWER on IntegriCloud