summaryrefslogtreecommitdiffstats
path: root/sys/dev/mxge
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Revert most of 193311 so as to track mxge transmit statsgallatin2009-06-232-1/+22
| | | | | | | on a per-ring basis and avoid racy (and costly) updates to the ifp stats via drbr by defining NO_SLOW_STATS Discussed with: kmacy
* Update mxge firmware from 1.4.39 to 1.4.43. Changes include:gallatin2009-06-234-32615/+32936
| | | | | | | | | | | | | - Support for 10G-PCIE*-8B*-C (dual-port CX4) NICs - For dual-port NICs, f/w failover is now a few microsecs instead of a few millisecs. - On failover, f/w sends RARP broadcast to make the change immediately known to the network - Fixed a bug observed on IBM X3 architecture where some spurious ecrc errors would be reported when OS enabled ecrc support. Sponsored by: Myricom Inc.
* Implement minimal set of changes suggested by bz to makegallatin2009-06-232-4/+18
| | | | mxge no longer depend on INET.
* Buf-ring fixes for mxgegallatin2009-06-022-27/+8
| | | | | | | | | | - always maintain byte/mcast/drop stats via drbr - move #define of IFNET_BUF_RING so that its picked up by all files in the driver - conditionalize IFNET_BUF_RING on the FreeBSD_version bump just after it appeared in the tree. Sponsored by: Myricom Inc.
* Set an rx jumbo cluster to the correct size beforegallatin2009-06-012-1/+4
| | | | | | | | using bus_dmamap_load_mbuf_sg() on it. This prevents data corruption when the mxge MTU is between 4076 and 8172 on machines with 4KB pages and MXGE_VIRT_JUMBOS is in use (which it isn't, in -current or -stable)
* Fix build: Make forgotten IFNET_MULTIQUEUE to IFNET_BUF_RINGgallatin2009-04-271-1/+1
| | | | ifdef change.
* Updates to mxge for multiple tx/rx rings:gallatin2009-04-272-41/+333
| | | | | | | | | | | | | | - Update mxge to use if_transmit(), and the new buf_ring interfaces, so as to enable multiple transmit queues. Use of if_transmit() is conditional on IFNET_BUF_RING, and is enabled by default (as in if_em). - Record a flow id on receive if receive hashing is active. I currently only record the rx ring id (0..8) rather than the 32-bit topelitz hash result, as doing the latter would require shifting the driver to use a larger rx return ring. Sponsored by: Myricom, Inc.
* Fix cut/paste error in previous commit and use thegallatin2009-02-171-1/+1
| | | | | | correct value for SFP+ reserved media type. MFC after: 1 week
* Better support for recent Myricom 10GbE NICsgallatin2009-02-177-32827/+32798
| | | | | | | | | | | | | | | | | - Update to firmware 1.4.39 for dual-chip NIC (10G-PCIE2-xxx) support, and SFP+ i2c support - Identify newer "B" NICs (10G-PCIEx-8B-x) correctly, rather than mis-identifying them as "A" NICs (cosmetic only) - Identify the IFM_10G_LRM ifmedia type, where applicable. - Identify ifmedia types for SFP+ based NICs - Update copyright Sponsored by: Myricom MFC after: 1 week
* Remove obsolete C preprocessor assertions.rdivacky2009-02-121-1/+1
| | | | Approved by: kib (mentor)
* Restore sfence semantics in mxge after the introductiongallatin2008-11-242-25/+25
| | | | of a global mfence based mb() in r185162
* - bump __FreeBSD version to reflect added buf_ring, memory barriers,kmacy2008-11-221-0/+4
| | | | | | | | | | | | | | | | | and ifnet functions - add memory barriers to <machine/atomic.h> - update drivers to only conditionally define their own - add lockless producer / consumer ring buffer - remove ring buffer implementation from cxgb and update its callers - add if_transmit(struct ifnet *ifp, struct mbuf *m) to ifnet to allow drivers to efficiently manage multiple hardware queues (i.e. not serialize all packets through one ifq) - expose if_qflush to allow drivers to flush any driver managed queues This work was supported by Bitgravity Inc. and Chelsio Inc.
* Update to Myri10GE Firmware 1.4.36.gallatin2008-10-234-32592/+32702
| | | | | | | | | | This update fixes a transmit bug in the multi-queue (MSI-X) firmware which happens when RDMAs complete out of order, and provides improved support for the new Myri10GE NIC models (10G-PCIE-8Bx) Sponsored by: Myricom Inc. MFC after:3 days
* Update to Myri10GE firmware version 1.4.33 from 1.4.29. Relevant changes ↵gallatin2008-10-015-56663/+32655
| | | | | | | | | | | | | | include: - Support for Myricom 10G-PCIE-8B NICs - multi-slice firmware: fix a bug when the presence of 32-bit or 64-bit DMA addresses for interrupt queues and data is not uniform across slices. - Improves automatic selection between ethp_z8e/eth_z8e Sponsored by: Myricom Inc.
* Adapt mxge shims to detect phys contig jumbo framesgallatin2008-08-211-1/+2
| | | | | | in RELENG_7 MFC after: 3 days
* Clean up mxge's use of callouts as pointed out by jhb,gallatin2008-07-171-36/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | and handle NIC hardware watchdog resets. - remove buggy code at the top of mxge_tick() which tried to detect a race which is already detected in the kernel's callout code. - move callout_stop() and callout_reset() into mxge_close() mxge_open() rather than doing the callout manipulation all over the place. - use callout_drain(), rather than callout_stop() to prevent a potential race between mxge_tick() and mxge_detach() which could lead to softclock using a destroyed mutex - restructure the mxge_tick() and mxge_watchdog_reset() routines to avoid resetting a callout, and then immediately stopping it if the watchdog reset routine is called, and fails. - enable the driver to handle NIC hardware watchdog resets by restoring the NIC's PCI config space, which is lost when the NIC hardware watchdog triggers. Reviewed by: jhb (previus version)
OpenPOWER on IntegriCloud