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)
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
enqueueing the frames when it fails. This way there is some latency
removed from the transmitting path.
- If IFF_DRV_OACTIVE is set (and also if IFF_DRV_RUNNING is not) just
enqueue the desired frames and return successful transmit. This way we
avoid to return errors on transmit side and resulting in
possible out-of-order frames. Please note that IFF_DRV_OACTIVE is set
everytime we get the threshold ring hit, so this can be happening quite
often.
Submitted by: Attilio.Rao@isilon.com
MFC after:5 days
removed bxe_free_mcast_macs_list() and bxe_init_mcast_macs_list()
fixed bug where copy of multicast list mta was deleted prior to passing the list to firmware
MFC after:5 days
In bxe_set_mc_list(): added missing BXE_MCAST_UNLOCK()
In __ecore_vlan_mac_h_exec_pending(): need to check for ECORE_PENDING
Submitted by:gary.zambrano@qlogic.com
bxe_ioctl() completes all functions within its context as opposed to a taskqueue earlier.
bxe_handle_rx_mode_tq() no longer required. bxe_set_rx_mode() handles the functionality within its context
Submitted by:gary.zambrano@qlogic.com
MFC after:5 days