| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Fix for double unlock in ipoib.
The ipoib_unicast_send() function is not supposed to unlock the priv lock.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=359124
|
| |
|
|
|
|
|
|
|
| |
Fix some whitespace issues in ipoib.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=358934
|
| |
|
|
|
|
|
|
|
| |
Properly implement the cond_resched() function macro in the LinuxKPI.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=328657
|
| |
|
|
|
|
|
|
|
|
|
| |
Make the dma_alloc_coherent() function in the LinuxKPI NULL safe with regard
to the "dev" argument.
Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications
Notes:
svn path=/stable/9/; revision=325938
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix for mlx4en(4) to properly call m_defrag().
The m_defrag() function can only defrag mbuf chains which have a valid
mbuf packet header. In r291699 when the mlx4en(4) driver was converted
into using BUSDMA(9), the call to m_defrag() was moved after the part
of the transmit routine which strips the header from the mbuf chain.
This effectivly disabled the mbuf defrag mechanism and such packets
simply got dropped.
This patch removes the stripping of mbufs from a chain and loads all
mbufs using busdma. If busdma finds there are no segments, unload
the DMA map and free the mbuf right away, because that means all
data in the mbuf has been inlined in the TX ring. Else proceed
as usual.
Add a per-ring rounter for the number of defrag attempts and
make sure the oversized_packets counter gets zeroed while at it.
The counters are per-ring to avoid excessive cache misses in the
TX path.
Submitted by: mjoras@
Differential Revision: https://reviews.freebsd.org/D11683
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=322536
|
| |
|
|
|
|
|
|
|
|
|
| |
Print maximum MTU when trying to set invalid MTU in the mlx4en(4) driver.
Useful for debugging.
Submitted by: Sepherosa Ziehau <sephe@dragonflybsd.org>
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=322506
|
| |
|
|
|
|
|
|
|
|
|
| |
Add support for RX and TX statistics when the mlx4en(4) PCI device
is in VF or SRIOV mode typically in a virtual machine environment.
Submitted by: Sepherosa Ziehau <sephe@dragonflybsd.org>
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=322503
|
| |
|
|
|
|
|
|
|
|
| |
Merge LinuxKPI changes from DragonflyBSD:
- Map more Linux compiler related defines to FreeBSD ones.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=322502
|
| |
|
|
|
|
|
|
|
| |
Implement ACCESS_ONCE(), WRITE_ONCE() and READ_ONCE().
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=322501
|
| |
|
|
|
|
|
|
|
|
|
| |
Remove some dead statistics related code and a structure field from the
mlx4en driver which is used by its Linux counterpart, but not under
FreeBSD.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=322166
|
| |
|
|
|
|
|
|
|
|
|
| |
Fix broken usage of the mlx4_read_clock() function:
- return value has too small width
- cycle_t is unsigned and cannot be less than zero
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=322163
|
| |
|
|
|
|
|
|
|
| |
Make sure on-stack buffer is properly aligned.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=322160
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change reject message type when destroying cm_id in ibore.
This patch fixes an interopability issue between FreeBSD and non-FreeBSD
systems when the connection establishment is aborted. Refer to the
initial commit in Linux, drivers/infiniband/core/cm.c,
for a more detailed description.
Obtained from: Linux
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=322157
|
| |
|
|
|
|
|
|
|
| |
Ticks are 32-bit in FreeBSD.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=322154
|
| |
|
|
|
|
|
|
|
|
|
| |
Make sure the mlx4en RX DMA ring gets stamped with software ownership
in order to prevent the flow of QP to error in the firmware once
UPDATE_QP is called.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=320946
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Use static device numbering instead of dynamic one when creating
mlx4en network interfaces. This prevents infinite unit number growth
typically when the mlx4en driver is used inside virtual machines which
support runtime PCI attach and detach.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=320068
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Free hardware queue resource after port is stopped in the mlx4en(4)
driver. Else if the port is up the resource might still be busy and
the MTT free will fail.
PR: 216493
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=319568
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow communication between functions on the same host when using the
mlx4en(4) driver in SRIOV mode.
Place a copy of the destination MAC address in the send WQE only under
SRIOV/eSwitch configuration or when the device is in selftest. This
allows communication between functions on the same host.
PR: 216493
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=319565
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mlx4: Use the CQ quota for SRIOV when creating completion EQs
When creating EQs to handle CQ completion events for the PF or for
VFs, we create enough EQE entries to handle completions for the max
number of CQs that can use that EQ.
When SRIOV is activated, the max number of CQs a VF (or the PF) can
obtain is its CQ quota (determined by the Hypervisor resource
tracker). Therefore, when creating an EQ, the number of EQE entries
that the VF should request for that EQ is the CQ quota value (and not
the total number of CQs available in the firmware).
Under SRIOV, the PF, also must use its CQ quota, because the resource
tracker also controls how many CQs the PF can obtain.
Using the firmware total CQs instead of the CQ quota when creating EQs
resulted wasting MTT entries, due to allocating more EQEs than were
needed.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=318629
|
| |
|
|
|
|
|
|
|
|
|
| |
Don't free uninitialized sysctl contexts in the mlx4en driver. This
can cause NULL pointer panics during failed device attach.
Differential Revision: https://reviews.freebsd.org/D8876
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=318541
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Flexible and asymmetric allocation of EQs and MSI-X vectors for PF/VFs.
Previously, the mlx4 driver queried the firmware in order to get the
number of supported EQs. Under SRIOV, since this was done before the
driver notified the firmware how many VFs it actually needs, the
firmware had to take into account a worst case scenario and always
allocated four EQs per VF, where one was used for events while the
others were used for completions. Now, when the firmware supports the
asymmetric allocation scheme, denoted by exposing num_sys_eqs > 0 (-->
MLX4_DEV_CAP_FLAG2_SYS_EQS), we use the QUERY_FUNC command to query
the firmware before enabling SRIOV. Thus we can get more EQs and MSI-X
vectors per function. Moreover, when running in the new
firmware/driver mode, the limitation that the number of EQs should be
a power of two is lifted.
Obtained from: Linux (dual BSD/GPLv2 licensed)
Submitted by: Dexuan Cui @ microsoft . com
Differential Revision: https://reviews.freebsd.org/D8867
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=318537
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change mlx4 QP allocation scheme.
When using Blue-Flame, BF, the QPN overrides the VLAN, CV, and SV
fields in the WQE. Thus, BF may only be used for QPNs with bits 6,7
unset.
The current ethernet driver code reserves a TX QP range with 256b
alignment.
This is wrong because if there are more than 64 TX QPs in use, QPNs >=
base + 65 will have bits 6/7 set.
This problem is not specific for the Ethernet driver, any entity that
tries to reserve more than 64 BF-enabled QPs should fail. Also, using
ranges is not necessary here and is wasteful.
The new mechanism introduced here will support reservation for "Eth
QPs eligible for BF" for all drivers: bare-metal, multi-PF, and VFs
(when hypervisors support WC in VMs). The flow we use is:
1. In mlx4_en, allocate Tx QPs one by one instead of a range allocation,
and request "BF enabled QPs" if BF is supported for the function
2. In the ALLOC_RES FW command, change param1 to:
a. param1[23:0] - number of QPs
b. param1[31-24] - flags controlling QPs reservation
Bit 31 refers to Eth blueflame supported QPs. Those QPs must have bits
6 and 7 unset in order to be used in Ethernet.
Bits 24-30 of the flags are currently reserved.
When a function tries to allocate a QP, it states the required
attributes for this QP. Those attributes are considered "best-effort".
If an attribute, such as Ethernet BF enabled QP, is a must-have
attribute, the function has to check that attribute is supported
before trying to do the allocation.
In a lower layer of the code, mlx4_qp_reserve_range masks out the bits
which are unsupported. If SRIOV is used, the PF validates those
attributes and masks out unsupported attributes as well. In order to
notify VFs which attributes are supported, the VF uses QUERY_FUNC_CAP
command. This command's mailbox is filled by the PF, which notifies
which QP allocation attributes it supports.
Obtained from: Linux (dual BSD/GPLv2 licensed)
Submitted by: Dexuan Cui @ microsoft . com
Differential Revision: https://reviews.freebsd.org/D8868
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=318534
|
| |
|
|
|
|
|
|
|
|
| |
Improve code readability and fix compilation error when using clang 4.x.
Found by: emaste @
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=315258
|
| |
|
|
|
|
|
|
|
|
|
| |
Fix initialisation of mlx4_pci_table's .driver_data fields.
Differential Revision: https://reviews.freebsd.org/D8791
Sponsored by: Mellanox Technologies
Submitted by: Dexuan Cui <decui@microsoft.com>
Notes:
svn path=/stable/9/; revision=311796
|
| |
|
|
|
|
|
|
|
|
| |
Fix indentation and remove duplicate queue stopped stats increment.
Found by: Ryan Stone <rysto32@gmail.com>
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=308400
|
| |
|
|
|
|
|
|
|
|
|
| |
The IORESOURCE_XXX defines should resemble a bitmask while SYS_RES_XXX
are not bitmasks. Fix return value of pci_resource_flags() to reflect
this change.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=306951
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add support for setting blocking and non-blocking mode on /dev/rdma_cm
by returning success on FIONBIO and FIOASYNC IOCTLs. The actual flags
handling is done by the kern_ioctl() function.
Reported by: Alex Bowden <alex.bowden@outlook.com>
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=304847
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add missing set of the current VNET when inputting IP packets in IPoIB.
This fixes a kernel panic when using IPoIB with VIMAGE and infiniband.
PR: 208957
Sponsored by: Mellanox Technologies
Tested by: Justin Clift <justin@postgresql.org>
Notes:
svn path=/stable/9/; revision=298780
|
| |
|
|
|
|
|
|
|
| |
Remove some unused fields.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=298777
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure the received IP header gets 32-bits aligned.
The FreeBSD's TCP/IP stack assumes that the IP-header is 32-bits aligned
when decoding it. Else unaligned 32-bit memory access can happen, which
not all processor architectures support.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=298776
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add missing port_up checks.
When downing a mlxen network adapter we need to check the port_up variable
to ensure we don't continue to transmit data or restart timers which can
reside in freed memory.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=298774
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LinuxKPI atomic fixes:
- Fix implementation of atomic_add_unless(). The atomic_cmpset_int()
function returns a boolean and not the previous value of the atomic
variable.
- The atomic counters should be signed according to Linux.
- Some minor cosmetics and styling while at it.
Reviewed by: alfred @
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=297659
|
| |
|
|
|
|
|
|
|
| |
Fix bugs in currently unused bit searching loop.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=297657
|
| |
|
|
|
|
|
|
|
| |
Add missing curly brackets in for loop.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=297653
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Use hardware computed Toeplitz hash for incoming flowids
Use the Toeplitz hash value as source for the flowid. This makes the
hash value more suitable for so-called hash bucket algorithms which
are used in the FreeBSD's TCP/IP stack when RSS is enabled.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=297650
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix witness panic in the ipoib_ioctl() function when unloading the
ipoib module.
The bpfdetach() function is trying to turn off promiscious mode on the
network interface it is attached to while holding a mutex. The fix
consists of ignoring any further calls to the ipoib_ioctl() function
when the network interface is going to be detached. The ipoib_ioctl()
function might sleep.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=297649
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Initialize vm_page_prot to VM_MEMATTR_DEFAULT instead of 0.
If a driver's Linux mmap callback passed vm_page_prot through unchanged,
then linux_dev_mmap_single() would try to apply whatever VM_MEMATTR_xxx
value 0 is to the mapping. On x86, VM_MEMATTR_DEFAULT is the PAT value
for write-back (WB) which is 6, while 0 maps to the PAT value for
uncacheable (UC). Thus, any mmap request that did not explicitly set
page_prot was tried to map memory as UC triggering the warning in
sg_pager_getpages().
Sponsored by: Chelsio Communications
Notes:
svn path=/stable/9/; revision=294636
|
| |
|
|
|
|
|
|
| |
Handle when filedescriptors are closed before initialized. An early
fdclose() call can cause fget_unlocked() to fail.
Notes:
svn path=/stable/9/; revision=293737
|
| |
|
|
|
|
|
|
|
|
| |
Add support for binding IRQs to CPUs in the LinuxKPI. The new function
added is for BSD only and does not exist in Linux.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=292193
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFC r291753:
Fix scope of bridge_header and bridge_pcix_cap in mthca_reset(..)
They're only used in the __linux__ case
Differential Revision: https://reviews.freebsd.org/D4332
Reported by: cppcheck
Reviewed by: hselasky
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/stable/9/; revision=292137
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add SIOCGI2C ioctl support to the driver. Would work only on ConnectX-3
with fresh firmware. The low level code is based on code provided by
Mellanox.
- Fix print formatting compile warnings for Sparc64 and PowerPC platforms.
- Updated the mlx4 and mlxen drivers to the latest version, v2.1.6:
- Added support for dumping the SFP EEPROM content to dmesg.
- Fixed handling of network interface capability IOCTLs.
- Fixed race when loading and unloading the mlxen driver by applying
appropriate locking.
- Removed two unused C-files.
- Convert the mlxen driver to use the BUSDMA(9) APIs instead of
vtophys() when loading mbufs for transmission and reception. While at
it all pointer arithmetic and cast qualifier issues were fixed, mostly
related to transmission and reception.
- Fix i386 build WITH_OFED=YES. Remove some redundant KASSERTs.
Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4283
Differential Revision: https://reviews.freebsd.org/D4284
Notes:
svn path=/stable/9/; revision=292115
|
| |
|
|
|
|
|
|
|
|
|
| |
Add some structures and defines which will be used when decoding small
form factor, SFF, standards compliant ethernet EEPROMs.
Obtained from: Linux
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=292109
|
| |
|
|
|
|
|
|
|
|
| |
Remove incorrect defines. The proper version of these macros is
defined in linux/etherdevice.h.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=292108
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFC r291047:
Don't leak work if __mlx4_register_vlan(..) fails in
mlx4_master_immediate_activate_vlan_qos(..)
Differential Revision: https://reviews.freebsd.org/D4203
Submitted by: Miles Olrich <miles.olrich@isilon.com>
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/stable/9/; revision=291186
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the Linux character device mmap handling only supports mmap
operations that map a single page that has an associated vm_page_t.
This does not permit mapping larger regions (such as a PCI memory
BAR) and it does not permit mapping addresses beyond the top of RAM
(such as a 64-bit BAR located above the top of RAM).
Instead of using a single OBJT_DEVICE object and passing the physaddr via
the offset as a hack, create a new sglist and OBJT_SG object for each
mmap request. The requested memory attribute is applied to the object
thus affecting all pages mapped by the request.
Sponsored by: Chelsio
Notes:
svn path=/stable/9/; revision=287637
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Fix broken implementation of "kvasprintf()" function by adding missing
kmalloc() call. Make function global instead of static inline to fix
compiler warnings about passing variable argument lists to inline
functions.
Sponsored by: Mellanox Technologies
Requested by: markj @
Notes:
svn path=/stable/9/; revision=285757
|
| |
|
|
|
|
|
|
|
|
| |
Apply proper locking when iterating the multicast addresses and add a
missing check for NULL from a non-blocking "kzalloc()" function call.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=283179
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r280210, r280764 and r280768:
Update the Linux compatibility layer:
- Add more functions.
- Add some missing includes which are needed when the header files
are not included in a particular order.
- The kasprintf() function cannot be inlined due to using a variable
number of arguments. Move it to a C-file.
- Fix problems about 32-bit ticks wraparound and unsigned long
conversion. Jiffies or ticks in FreeBSD have integer type and are
not long.
- Add missing "order_base_2()" macro.
- Fix BUILD_BUG_ON() macro.
- Declare a missing symbol which is needed when compiling without -O2
- Clean up header file inclusions in the linux/completion.h, linux/in.h
and linux/fs.h header files.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=282514
|
| |
|
|
|
|
|
|
|
| |
Add missing void pointer argument to SYSINIT() functions.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=280543
|
| |
|
|
|
|
|
|
|
|
| |
Ensure setting promiscious mode when a network interface is up, is
always non-blocking by not locking a SX type of mutex.
Sponsored by: Mellanox Technologies
Notes:
svn path=/stable/9/; revision=280019
|