aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bxe
Commit message (Collapse)AuthorAgeFilesLines
...
* Modify Copyright information and other strings to reflect Qlogic ↵David C Somayajulu2014-05-081-19/+19
| | | | | | | | | | | | Corporation's purchase of Broadcom's NetXtreme business. Added clean option to Makefile Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation MFC after:5 days Notes: svn path=/head/; revision=265703
* Modify Copyright information to reflect Qlogic Corporation's purchaseDavid C Somayajulu2014-05-0622-176/+22
| | | | | | | | | | of Broadcom's NetXtreme business Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation MFC after:5 days Notes: svn path=/head/; revision=265411
* Since 32-bit if_baudrate isn't enough to describe a baud rate of a 10 GbitGleb Smirnoff2014-03-131-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interface, in the r241616 a crutch was provided. It didn't work well, and finally we decided that it is time to break ABI and simply make if_baudrate a 64-bit value. Meanwhile, the entire struct if_data was reviewed. o Remove the if_baudrate_pf crutch. o Make all fields of struct if_data fixed machine independent size. The notion of data (packet counters, etc) are by no means MD. And it is a bug that on amd64 we've got a 64-bit counters, while on i386 32-bit, which at modern speeds overflow within a second. This also removes quite a lot of COMPAT_FREEBSD32 code. o Give 16 bit for the ifi_datalen field. This field was provided to make future changes to if_data less ABI breaking. Unfortunately the 8 bit size of it had effectively limited sizeof if_data to 256 bytes. o Give 32 bits to ifi_mtu and ifi_metric. o Give 64 bits to the rest of fields, since they are counters. __FreeBSD_version bumped. Discussed with: emax Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=263102
* Fixed MSI interrupt allocation and handling.Eric Davis2014-03-111-78/+36
| | | | | | | | | | Fixed a DMA mapping leak that occurs when defragmenting packet chains. Approved by: davidch (mentor) MFC after: 1 week Notes: svn path=/head/; revision=262999
* Another round of removing historical mbuf(9) allocator flags.Gleb Smirnoff2014-01-161-6/+6
| | | | | | | | | They are breeding! New ones arouse since last round. Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=260718
* defragment mbuf chains longer than hw segment limit before droppingEric Davis2014-01-072-4/+32
| | | | | | | Approved by: davidch Notes: svn path=/head/; revision=260415
* For TSO, when the first mbuf contains both the packet header and data, theEric Davis2013-12-302-18/+17
| | | | | | | | | | | header is split out into its own BD for processing by the firmware. When this split occurred the data length in the BD was not being set correctly resulting in packet corruption. Approved by: davidcd (mentor) Notes: svn path=/head/; revision=260113
* In sys/dev/bxe/bxe.c, remove static function bxe_has_tx_work_unload(),Dimitry Andric2013-12-261-7/+0
| | | | | | | | | | which has never been used. Reviewed by: edavis MFC after: 3 days Notes: svn path=/head/; revision=259928
* Fixed a tx watchdog chip reset that could occur on mostly idle links.Eric Davis2013-11-158-115/+186
| | | | | | | | | | Fixed various link related issues and 10GBaseT is now linking properly. Modified the types for the driver tunables to be consistent with the sysctl APIs. Approved by: davidch (mentor) Notes: svn path=/head/; revision=258187
* In sys/dev/bxe/bxe.c, print bus_addr_t values using %#jx, to fix severalDimitry Andric2013-10-111-7/+7
| | | | | | | | | | gcc warnings for PAE kernels. Approved by: re (glebius) Reviewed by: davidch, edavis Notes: svn path=/head/; revision=256341
* Fixed the media type shown via ifconfig.Eric Davis2013-10-103-8/+36
| | | | | | | | | | | | | Fixed a panic that occurs when bringing up an interface on 57710/57711 running very old bootcode versions. Fixed how bool is defined for those who have been using this code on older versions of FreeBSD. Approved by: re@ (gjb) Approved by: davidch (mentor) Notes: svn path=/head/; revision=256299
* Substantial rewrite of bxe(4) to add support for the BCM57712 andDavid Christensen2013-09-2038-108103/+177888
| | | | | | | | | | BCM578XX controllers. Approved by: re MFC after: 4 weeks Notes: svn path=/head/; revision=255736
* Remove unused and incomplete support for delayed fragment checksumsAndre Oppermann2013-08-191-3/+1
| | | | | | | from bce(4), bxe(4), mge(4) and ti(4) drivers. Notes: svn path=/head/; revision=254516
* This fixes a out-of-order problem with severalRandall Stewart2013-02-071-20/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=246482
* Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff2012-12-041-5/+5
| | | | | | | malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
* Remove unused and unnecessary CSUM_IP_FRAGS checksumming capability.Andre Oppermann2012-11-271-1/+1
| | | | | | | | | | | Checksumming the IP header of fragments is no different from doing normal IP headers. Discussed with: yongari MFC after: 1 week Notes: svn path=/head/; revision=243624
* Utilize new macro to initialize if_baudrate.Gleb Smirnoff2012-10-181-1/+1
| | | | Notes: svn path=/head/; revision=241678
* The drbr(9) API appeared to be so unclear, that most drivers inGleb Smirnoff2012-09-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=241037
* Only stop the BXE controller if it was first started. StoppingMike Silbersack2012-09-051-1/+7
| | | | | | | | | | | | an uninitialized controller can cause IPMI bus errors on some systems. Reviewed by: yongari Obtained from: McAfee, Inc. MFC after: 2 weeks Notes: svn path=/head/; revision=240128
* Convert a number of drivers to obtaining their parent DMA tag from theirScott Long2012-03-121-1/+2
| | | | | | | PCI device attachment. Notes: svn path=/head/; revision=232854
* Remove spurious 8bit chars, turning files into plain ASCII.Ulrich Spörlein2012-01-151-1/+1
| | | | Notes: svn path=/head/; revision=230133
* ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it againKevin Lo2012-01-071-1/+0
| | | | | | | Reviewed by: yongari Notes: svn path=/head/; revision=229767
* Update recently added drivers to use the if_*addr_r*lock() wrapperJohn Baldwin2012-01-051-4/+4
| | | | | | | | | | | functions instead of using the IF_ADDR_LOCK directly. The wrapper functions are the supported interface for device drivers. Reviewed by: bz, philip MFC after: 1 week Notes: svn path=/head/; revision=229613
* s/timout/timeoutKevin Lo2011-12-151-1/+1
| | | | Notes: svn path=/head/; revision=228526
* - There's no need to overwrite the default device method with the defaultMarius Strobl2011-11-221-5/+1
| | | | | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID. Notes: svn path=/head/; revision=227843
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.Ed Schouten2011-11-071-1/+1
| | | | | | | | | 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. Notes: svn path=/head/; revision=227309
* - change "is is" to "is" or "it is"Eitan Adler2011-10-161-2/+2
| | | | | | | | | | | - change "the the" to "the" Approved by: lstewart Approved by: sahil (mentor) MFC after: 3 days Notes: svn path=/head/; revision=226436
* - Fix compiler warning in ADD_64() macro.David Christensen2011-09-131-1/+1
| | | | | | | | | Approved by: re Obtained from: dimitry@andic.com MFC after: One week Notes: svn path=/head/; revision=225532
* - Major reorganization of mbuf handling throughout the driver toDavid Christensen2011-06-084-3451/+2855
| | | | | | | | | | | | | | | | | | | | | increase robustness (no more calls to panic(9)) and simplify code. - Allocate RX/TX data structures as a single buffer rather than an array of 4KB pages to simplify code. - Fixed LRO (aka TPA) code. Removed kernel module parameter and support enabling disabling LRO through ifconfig(8) command line. LRO is still disabled by default but should be enabled for best performance on an endpoint device. - Fixed statistcs code and removed kernel module parameter (stats should just work). - Added many software counters to help identify the cause of some performance issues. - Streamlined adapter internal init/stop code paths. - Fiddled with debug code (adding some here, removing some there). - Continued style(9) adjustments. Notes: svn path=/head/; revision=222875
* - Use bus_describe_intr() to describe interrupt usage.David Christensen2011-05-122-23/+85
| | | | | | | | | | | | | - Use bus_bind_intr() to bind interrupt to a CPU when RSS/TSS is used. - Use M_DONTWAIT for RSS/TSS buffer allocation. - Add statistic to track max DRBR queue depth. - Fix problem in bxe_change_mtu() which referenced the old MTU size in a debug print statement. MFC after: Two weeks Notes: svn path=/head/; revision=221826
* - Simplify multicast address programming.David Christensen2011-05-092-66/+65
| | | | | | | | | | | - Fix an incorrect "uint32_t *" cast in bxe_set_rx_mode(). Submitted by: yongari@ Approved by: davidch@ MFC after: Two weeks Notes: svn path=/head/; revision=221709
* - Fixed a typo in an if() statement when setting flow control for MTUDavid Christensen2011-05-021-1/+1
| | | | | | | | | greater than 5000 bytes. Submitted by: yongari Notes: svn path=/head/; revision=221354
* - Re-committed r220603 which was accidentally backed out by an earlierDavid Christensen2011-05-022-4/+1
| | | | | | | | | | commit. - Fixed a bug in an unused debug macro. MFC after: One week. Notes: svn path=/head/; revision=221342
* - Centralize driver tunables initialization/validation.David Christensen2011-04-214-415/+896
| | | | | | | | | | | | | | | - Centralize PCI resource allocation/release. - Enable flowid (TSS) support. - Added "per-fastpath" locks and watchdog timeouts. - Fixed problem where the CQ producer index was advanced beyond the size of the CQ ring during initialization. - Replaced hard-coded debug levels in some debug print statements. - More style(9) fixes. MFC after: Two weeks Notes: svn path=/head/; revision=220932
* Remove a comment which is no longer true since r213878, apart fromMarius Strobl2011-04-191-3/+0
| | | | | | | | | this driver not using mii(4) in the first place. Reviewed by: yongari Notes: svn path=/head/; revision=220862
* Remove mii(4) dependency and unneeded headers.Pyun YongHyeon2011-04-131-10/+0
| | | | | | | Reviewed by: davidch Notes: svn path=/head/; revision=220603
* - Fixed a problem when multiqueue mode was enabled which caused the CQDavid Christensen2011-04-072-154/+184
| | | | | | | | | | | | chain to be corrupted. - Removed many console print warnings and replaced with driver maintained counters. - Several style(9) fixes. MFC after: One week. Notes: svn path=/head/; revision=220427
* - Removed multiple console error messages and replaced with statisticDavid Christensen2011-04-052-221/+289
| | | | | | | | | | | counters to reduce spew. - Fixed a TSO problem when an mbuf contains both header and payload in the same cluster. MFC after: One week. Notes: svn path=/head/; revision=220377
* Make bxe(4) build with BXE_DEBUG.Pyun YongHyeon2011-04-011-2/+2
| | | | Notes: svn path=/head/; revision=220234
* - Fixed build problem when not useing BXE_DEBUG.David Christensen2011-03-311-28/+29
| | | | | | | MFC after: One week. Notes: svn path=/head/; revision=220230
* - Freshened debug support code.David Christensen2011-03-312-440/+493
| | | | | | | | | | - Renamed several RX variable for more consistent usage. - Fixed a potential problem when masking RX CQ producer value. MFC after: One week. Notes: svn path=/head/; revision=220229
* - Fixed DMA engine errors by increasing timeouts to 200ms for reads/writes.David Christensen2011-03-311-26/+42
| | | | | | | | | | - Improved some error reporting calls to include file name/line number. - Various style(9) fixes. MFC after: One week. Notes: svn path=/head/; revision=220228
* - Added debug support to monitor mbuf defrag attempts/failures.David Christensen2011-03-312-44/+99
| | | | | | | MFC after: One week. Notes: svn path=/head/; revision=220226
* - Print number of queues when RSS is enabled.David Christensen2011-03-312-12/+67
| | | | | | | | | - Improve reporting of media type (not always 10GBase-CX4). MFC after: One week Notes: svn path=/head/; revision=220224
* - Fixed a problem where the stack passed a TSO frame larger than the 64KDavid Christensen2011-03-312-37/+107
| | | | | | | | | size allowed by the DMA descriptor for TSO frames. MFC after: One week Notes: svn path=/head/; revision=220223
* Do a sweep of the tree replacing calls to pci_find_extcap() with calls toJohn Baldwin2011-03-231-4/+4
| | | | | | | pci_find_cap() instead. Notes: svn path=/head/; revision=219902
* - Inadvertently committed files with +x attribute, fixed.David Christensen2011-03-1516-9/+20
| | | | | | | - Minor change to info output string. Notes: svn path=/head/; revision=219656
* - Initial release of bxe(4) to support Broadcom NetXtreme II 10GbE.David Christensen2011-03-1416-0/+107821
(BCM57710, BCM57711, BCM57711E) MFC after: One month Notes: svn path=/head/; revision=219647