aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bxe
Commit message (Collapse)AuthorAgeFilesLines
* remove extraneous double ;s in sys/Ed Maste2020-03-301-1/+1
| | | | Notes: svn path=/head/; revision=359441
* Finish removing support from old versionsWarner Losh2020-03-011-84/+1
| | | | | | | | | | Eliminate code for old versions, inline pci_find_cap instead of relying on compat ifdef. This commit should have been combined with r358488 before pushing it in. Notes: svn path=/head/; revision=358491
* Remove FreeBSD 7-10 support from bxe driver.Warner Losh2020-03-012-48/+10
| | | | | | | | Use new PCIER and PCIEM names in the driver rather than relying on old, compat shims. Notes: svn path=/head/; revision=358488
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-261-18/+16
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* Use NET_TASK_INIT() and NET_GROUPTASK_INIT() for drivers that processGleb Smirnoff2020-02-111-1/+1
| | | | | | | | | | incoming packets in taskqueue context. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D23518 Notes: svn path=/head/; revision=357772
* Convert to if_foreach_llmaddr() KPI.Gleb Smirnoff2019-10-212-91/+59
| | | | Notes: svn path=/head/; revision=353813
* Split out a more generic debugnet(4) from netdump(4)Conrad Meyer2019-10-172-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Debugnet is a simplistic and specialized panic- or debug-time reliable datagram transport. It can drive a single connection at a time and is currently unidirectional (debug/panic machine transmit to remote server only). It is mostly a verbatim code lift from netdump(4). Netdump(4) remains the only consumer (until the rest of this patch series lands). The INET-specific logic has been extracted somewhat more thoroughly than previously in netdump(4), into debugnet_inet.c. UDP-layer logic and up, as much as possible as is protocol-independent, remains in debugnet.c. The separation is not perfect and future improvement is welcome. Supporting INET6 is a long-term goal. Much of the diff is "gratuitous" renaming from 'netdump_' or 'nd_' to 'debugnet_' or 'dn_' -- sorry. I thought keeping the netdump name on the generic module would be more confusing than the refactoring. The only functional change here is the mbuf allocation / tracking. Instead of initiating solely on netdump-configured interface(s) at dumpon(8) configuration time, we watch for any debugnet-enabled NIC for link activation and query it for mbuf parameters at that time. If they exceed the existing high-water mark allocation, we re-allocate and track the new high-water mark. Otherwise, we leave the pre-panic mbuf allocation alone. In a future patch in this series, this will allow initiating netdump from panic ddb(4) without pre-panic configuration. No other functional change intended. Reviewed by: markj (earlier version) Some discussion with: emaste, jhb Objection from: marius Differential Revision: https://reviews.freebsd.org/D21421 Notes: svn path=/head/; revision=353685
* Update bxe(4) to use new zlib.Xin LI2019-08-081-1/+1
| | | | | | | | | PR: 229763 Submitted by: Yoshihiro Ota <ota j email ne jp> Differential Revision: https://reviews.freebsd.org/D21175 Notes: svn path=/head/; revision=350743
* Add support for Error RecoveryDavid C Somayajulu2018-10-153-35/+372
| | | | | | | | | Submitted by:Vaishali.Kulkarni@cavium.com Approved by:re(kib) MFC after:5 days Notes: svn path=/head/; revision=339366
* Fixed isses:David C Somayajulu2018-09-171-8/+10
| | | | | | | | | | | State check before enqueuing transmit task in bxe_link_attn() routine. State check before invoking bxe_nic_unload in bxe_shutdown(). Submitted by:Vaishali.Kulkarni@cavium.com Approved by:re(gjb) Notes: svn path=/head/; revision=338734
* Fixes for the following issues:David C Somayajulu2018-07-171-14/+30
| | | | | | | | | | | | | 1. Fix taskqueues drain/free to fix panic seen when interface is being bought down and in parallel asynchronous link events happening. 2. Fix bxe_ifmedia_status() Submitted by:Vaishali.Kulkarni@cavium.com and Anand.Khoje@cavium.com MFC after:5 days Notes: svn path=/head/; revision=336438
* Fix build of bxe with base gcc on i386Dimitry Andric2018-06-111-4/+4
| | | | | | | | | | | | | | | Casting from rman_res_t to a pointer results in "cast to pointer from integer of different size" warnings with base gcc on i386, so print these without casting. The kva field of struct bxe_bar is of type vm_offset_t, which can be 32 or 64 bit, so cast it to uintmax_t before printing. Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D15733 Notes: svn path=/head/; revision=334948
* ifnet: Replace if_addr_lock rwlock with epoch + mutexMatt Macy2018-05-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run on LLNW canaries and tested by pho@ gallatin: Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5 based ConnectX 4-LX NIC, I see an almost 12% improvement in received packet rate, and a larger improvement in bytes delivered all the way to userspace. When the host receiving 64 streams of netperf -H $DUT -t UDP_STREAM -- -m 1, I see, using nstat -I mce0 1 before the patch: InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 4.98 0.00 4.42 0.00 4235592 33 83.80 4720653 2149771 1235 247.32 4.73 0.00 4.20 0.00 4025260 33 82.99 4724900 2139833 1204 247.32 4.72 0.00 4.20 0.00 4035252 33 82.14 4719162 2132023 1264 247.32 4.71 0.00 4.21 0.00 4073206 33 83.68 4744973 2123317 1347 247.32 4.72 0.00 4.21 0.00 4061118 33 80.82 4713615 2188091 1490 247.32 4.72 0.00 4.21 0.00 4051675 33 85.29 4727399 2109011 1205 247.32 4.73 0.00 4.21 0.00 4039056 33 84.65 4724735 2102603 1053 247.32 After the patch InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 5.43 0.00 4.20 0.00 3313143 33 84.96 5434214 1900162 2656 245.51 5.43 0.00 4.20 0.00 3308527 33 85.24 5439695 1809382 2521 245.51 5.42 0.00 4.19 0.00 3316778 33 87.54 5416028 1805835 2256 245.51 5.42 0.00 4.19 0.00 3317673 33 90.44 5426044 1763056 2332 245.51 5.42 0.00 4.19 0.00 3314839 33 88.11 5435732 1792218 2499 245.52 5.44 0.00 4.19 0.00 3293228 33 91.84 5426301 1668597 2121 245.52 Similarly, netperf reports 230Mb/s before the patch, and 270Mb/s after the patch Reviewed by: gallatin Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15366 Notes: svn path=/head/; revision=333813
* Fix bxe(4) netdump rx polling.Mark Johnston2018-05-091-1/+1
| | | | | | | | | Reviewed by: cem, rstone X-MFC with: r333287 Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=333429
* Add netdump support to bxe(4).Mark Johnston2018-05-062-0/+60
| | | | | | | | | | | | Tested with a NetXtreme II BCM57810 adapter. Reviewed by: davidcs MFC after: 1 month Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D15257 Notes: svn path=/head/; revision=333287
* Fix Issue with adding MUltiCast Addresses. When multicast addresses areDavid C Somayajulu2018-04-251-41/+63
| | | | | | | | | | | added/deleted, the delete the multicast addresses previously programmed in HW and reprogram the new set of multicast addresses. Submitted by:Vaishali.Kulkarni@cavium.com MFC after:5 days Notes: svn path=/head/; revision=333004
* dev/bxe: make use of mallocarray(9).Pedro F. Giffuni2018-01-102-2/+3
| | | | | | | | Use mallocarray in a couple of cases where a calloc-like operation is taking place. Notes: svn path=/head/; revision=327782
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2022-0/+44
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326022
* Add HPE FlexFabric 10Gb 4-port 536FLR-T device id to the bxe(4) driver.Andrey V. Elsukov2017-07-192-0/+7
| | | | | | | | | Tested by: David Miguel Almas <dmalmas gmail com> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11478 Notes: svn path=/head/; revision=321203
* 1. state checks in bxe_tx_mq_start_locked() and bxe_tx_mq_start() to sync ↵David C Somayajulu2017-02-275-86/+318
| | | | | | | | | | | | | | | threads during interface down or detach. 2. add sysctl to set pause frame parameters 3. increase max segs for TSO packets to BXE_TSO_MAX_SEGMENTS (32) 4. add debug messages for PHY 5. HW LRO support restricted to FreeBSD versions 8.x and above. Submitted by:Vaishali.Kulkarni@cavium.com MFC after:5 days Notes: svn path=/head/; revision=314365
* bxe: enable usage with NetXtreme II BCM57840 2x20GbE chipRoger Pau Monné2017-02-151-0/+6
| | | | | | | | | | | | | | | Current bxe probe function won't attach to devices with the NetXtreme II BCM57840 2x20GbE chip, enable it by adding it's chip ID to the list of supported chips. Tested on: HP ProLiant WS460c Gen9 Reviewed by: gnn MFC after: 1 week Sponsored by: Citrix Systems R&D Differential Revision: https://reviews.freebsd.org/D9609 Notes: svn path=/head/; revision=313771
* r266979 missed a call to enable capabilities of the hw leading to anSean Bruno2016-11-051-0/+1
| | | | | | | | | | | inability to enable features of the device. PR: 213845 Submitted by: pherman@frenchfries.net MFC after: 1 week Notes: svn path=/head/; revision=308343
* Use proper if_getdrvflags() API.Bryan Drewery2016-10-251-2/+2
| | | | | | | | | This is a NOP. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=307897
* 1. Use taskqueue_create() instead of taskqueue_create_fast() for bothDavid C Somayajulu2016-10-183-97/+108
| | | | | | | | | | | | | | | fastpath and slowpath taskqueues. 2. Service all transmits in taskqueue threads. 3. additional stats counters for keeping track of - bd availability - tx buf ring not emptied in the fp task queue. These are drained via timeout taskqueue. - tx attempts during link down. MFC after: 5 days Notes: svn path=/head/; revision=307578
* Revert commitDavid C Somayajulu2016-09-303-112/+70
| | | | | | | | | r306284 - Fixes for issues under high workloads Will fix and recommit patch Notes: svn path=/head/; revision=306515
* Fixes for issues under high workloadsDavid C Somayajulu2016-09-233-70/+112
| | | | | | | MFC after:5 days Notes: svn path=/head/; revision=306284
* sys/dev: replace comma with semicolon when pertinent.Pedro F. Giffuni2016-08-091-1/+1
| | | | | | | | | | | | | Uses of commas instead of a semicolons can easily go undetected. The comma can serve as a statement separator but this shouldn't be abused when statements are meant to be standalone. Detected with devel/coccinelle following a hint from DragonFlyBSD. MFC after: 1 month Notes: svn path=/head/; revision=303891
* Don't enqueue NULL on a drbrRyan Stone2016-08-081-1/+2
| | | | | | | | | | | | | | | | In one corner case in the bxe TX path, a NULL mbuf could be enqueued onto a drbr queue. This could case a KASSERT to fire with INVARIANTS enabled, or the processing of packets from the queue to be prematurely ended later on. Submitted by: Matt Joras (matt.joras AT isilon.com) Reviewed by: davidcs MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D7041 Notes: svn path=/head/; revision=303836
* Don't repeat the the word 'the'Eitan Adler2016-05-171-2/+2
| | | | | | | | | | (one manual change to fix grammar) Confirmed With: db Approved by: secteam (not really, but this is a comment typo fix) Notes: svn path=/head/; revision=300050
* Don't jam the softc in the device_probe routine. The softc isn't owned byScott Long2016-05-131-7/+0
| | | | | | | | | | | | | | | the driver here, so it shouldn't be accessed, let alone written to. Remove the nearby debug line, it's the only thing that depended on the softc, and it depended on it in a way that couldn't work in this part of the code. This fixes some reports of use-after-free and system instability with DEBUG_MEMGUARD enabled. Submitted by: Matthew Macy MFC after: 3 days Notes: svn path=/head/; revision=299590
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-037-31/+31
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* 1. Removed -Wno-shift-negative-value from MakefileDavid C Somayajulu2016-04-251-2/+2
| | | | | | | | | 2. Fixed warning its absence caused in bxe_elink.c MFC after:5 days Notes: svn path=/head/; revision=298591
* Remove Unused/Dead CodeDavid C Somayajulu2016-04-231-141/+0
| | | | | | | MFC after:5 days Notes: svn path=/head/; revision=298496
* 1. modify fwdump (a.k.a grcdump) so that grcdump memory is allocatedDavid C Somayajulu2016-04-193-67/+169
| | | | | | | | | | | | | and freed on as needed basis. 2. grcdump can be taken at failure points by invoking bxe_grc_dump() when trigger_grcdump sysctl flag is set. When grcdump is taken grcdump_done sysctl flag is set. 3. grcdump_done can be monitored by the user to retrieve the grcdump. Submitted by:vaishali.kulkarni@qlogic.com Notes: svn path=/head/; revision=298294
* reversed commits r297916 r297909 r297898 due to i386 build failures.David C Somayajulu2016-04-133-169/+67
| | | | | | | MFC after:5 days Notes: svn path=/head/; revision=297922
* Fix compilation error on i386David C Somayajulu2016-04-131-4/+4
| | | | Notes: svn path=/head/; revision=297916
* Fix build failure on i386. Need to typecast a bunch of variables to (uintmax_t)David C Somayajulu2016-04-131-11/+14
| | | | | | | MFC after:5 days Notes: svn path=/head/; revision=297909
* 1. modify fwdump (a.k.a grcdump) memory is allocated and freed on as neededDavid C Somayajulu2016-04-133-67/+166
| | | | | | | | | | | | | | | basis. 2. grcdump can be taken at failure points by invoking bxe_grc_dump() when trigger_grcdump sysctl flag is set. When grcdump is taken grcdump_done sysctl flag is set. 3. grcdump_done can be monitored by the user to retrieve the grcdump. Submitted by:vaishali.kulkarni@qlogic.com Approved by:davidcs@freebsd.org MFC after:5 days Notes: svn path=/head/; revision=297898
* Add support for Flash UpdateDavid C Somayajulu2016-04-123-5/+400
| | | | | | | | | Submitted by:nrapendra.singh@qlogic.com;vaishali.kulkarni@qlogic.com;davidcs@freebsd.org Approved by:davidcs@freebsd.org MFC after:5 days Notes: svn path=/head/; revision=297884
* 1. Process tx completions in bxe_periodic_callout_func() and restartDavid C Somayajulu2016-04-122-23/+63
| | | | | | | | | | | | | transmissions if possible. 2. For SIOCSIFFLAGS call bxe_init_locked() only if !BXE_STATE_DISABLED 3. remove code not needed in bxe_init_internal_common() Submitted by:vaishali.kulkarni@qlogic.com;venkata.bhavaraju@qlogic.com Approved by:davidcs@freebsd.org MFC after:5 days Notes: svn path=/head/; revision=297873
* Cleanup unnecessary semicolons from the kernel.Pedro F. Giffuni2016-04-101-1/+1
| | | | | | | Found with devel/coccinelle. Notes: svn path=/head/; revision=297793
* Modifications to achieve a common source base from FreeBSD7.x thru 10.xDavid C Somayajulu2016-03-212-24/+79
| | | | | | | MFC after:5 days Notes: svn path=/head/; revision=297155
* Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.Justin Hibbits2016-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some architectures, u_long isn't large enough for resource definitions. Particularly, powerpc and arm allow 36-bit (or larger) physical addresses, but type `long' is only 32-bit. This extends rman's resources to uintmax_t. With this change, any resource can feasibly be placed anywhere in physical memory (within the constraints of the driver). Why uintmax_t and not something machine dependent, or uint64_t? Though it's possible for uintmax_t to grow, it's highly unlikely it will become 128-bit on 32-bit architectures. 64-bit architectures should have plenty of RAM to absorb the increase on resource sizes if and when this occurs, and the number of resources on memory-constrained systems should be sufficiently small as to not pose a drastic overhead. That being said, uintmax_t was chosen for source clarity. If it's specified as uint64_t, all printf()-like calls would either need casts to uintmax_t, or be littered with PRI*64 macros. Casts to uintmax_t aren't horrible, but it would also bake into the API for resource_list_print_type() either a hidden assumption that entries get cast to uintmax_t for printing, or these calls would need the PRI*64 macros. Since source code is meant to be read more often than written, I chose the clearest path of simply using uintmax_t. Tested on a PowerPC p5020-based board, which places all device resources in 0xfxxxxxxxx, and has 8GB RAM. Regression tested on qemu-system-i386 Regression tested on qemu-system-mips (malta profile) Tested PAE and devinfo on virtualbox (live CD) Special thanks to bz for his testing on ARM. Reviewed By: bz, jhb (previous) Relnotes: Yes Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D4544 Notes: svn path=/head/; revision=297000
* Fix code so that buf_ring allocation for Tx Queues and their mutexesDavid C Somayajulu2016-03-091-28/+119
| | | | | | | | | is done during during bxe_attach() and freed during bxe_detach() MFC after: 5 days Notes: svn path=/head/; revision=296579
* Remove taskqueue_enqueue_fast().John Baldwin2016-03-011-4/+4
| | | | | | | | | | | | | taskqueue_enqueue() was changed to support both fast and non-fast taskqueues 10 years ago in r154167. It has been a compat shim ever since. It's time for the compat shim to go. Submitted by: Howard Su <howard0su@gmail.com> Reviewed by: sephe Differential Revision: https://reviews.freebsd.org/D5131 Notes: svn path=/head/; revision=296272
* Upgrade the firmware carried in driver and loaded during hardwareDavid C Somayajulu2016-02-2519-90252/+103855
| | | | | | | initialization (a.k.a STORM firmware) to version 7.13.1 (latest version) Notes: svn path=/head/; revision=296071
* Remove dead code. Code Cleanup. Improve clarity in debug messagesDavid C Somayajulu2016-02-194-1064/+110
| | | | | | | MFC after:5 days Notes: svn path=/head/; revision=295830
* Modified the use of bxe_grc_dump() function so that it can be invoked ↵David C Somayajulu2016-02-192-42/+56
| | | | | | | | | | | directly at any potential error path, where a fwdump is needed. The fwdump (a.k.a grcdump) is stored in a driver buffer. The sysctl grcdump_done indicates if a fwdump was taken and waiting to be retrieved. The sysctl trigger_grcdump can be used to manually trigger a fwdump. MFC after:5 days Notes: svn path=/head/; revision=295823
* Add support for firmware dump (a.k.a grcdump)David C Somayajulu2015-12-235-2/+2782
| | | | | | | MFC after:5 days Notes: svn path=/head/; revision=292639
* Check for packet_length is greater than 60 bytes as well as packet_length isDavid C Somayajulu2015-12-233-4/+23
| | | | | | | | | | | | | | greater than len_on_bd, before invoking the routine to handle jumbo over SGL (bxe_service_rxsgl()). Add counters for number of jumbo_over_SGL packets (rx_bxe_service_rxsgl) and erroneous jumbo_over_SGL packets (rx_erroneous_jumbo_sge_pkts) Fix formatting in bxe_sysctl_state() MFC after:5 days Notes: svn path=/head/; revision=292638