| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Handle when filedescriptors are closed before initialized. An early
fdclose() call can cause fget_unlocked() to fail.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the LinuxKPI:
- Add more functions and types.
- Implement ACCESS_ONCE(), WRITE_ONCE() and READ_ONCE().
- Implement sleepable RCU mechanism using shared exclusive locks.
- Minor workqueue cleanup:
- Make some functions global instead of inline to ease debugging.
- Fix some minor style issues.
- In the zero delay case in queue_delayed_work() use the return value
from taskqueue_enqueue() instead of reading "ta_pending" unlocked and
also ensure the callout is stopped before proceeding.
- Implement drain_workqueue() function.
- Reduce memory consumption when allocating kobject strings in the
LinuxKPI. Compute string length before allocating memory instead of
using fixed size allocations. Make kobject_set_name_vargs() global
instead of inline to save some bytes when compiling.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This helps reduce the diff in pci(4) between head and stable/10 to help pave
the way for bringing in IOV/nv(9) more cleanly
Differential Revision: https://reviews.freebsd.org/D4728
Relnotes: yes
Reviewed by: hselasky (ofed piece), royger (overall change)
Sponsored by: EMC / Isilon Storage Division
r270212 (by royger):
pci: make MSI(-X) enable and disable methods of the PCI bus
Make the functions pci_disable_msi, pci_enable_msi and pci_enable_msix
methods of the newbus PCI bus. This code should not include any
functional change.
Sponsored by: Citrix Systems R&D
Reviewed by: imp, jhb
Differential Revision: https://reviews.freebsd.org/D354
dev/pci/pci.c:
- Convert the mentioned functions to newbus methods.
- Fix the callers of the converted functions.
sys/dev/pci/pci_private.h:
dev/pci/pci_if.m:
- Declare the new methods.
dev/pci/pcivar.h:
- Add helpers to call the newbus methods.
ofed/include/linux/pci.h:
- Add define to prevent the ofed version of pci_enable_msix from
clashing with the FreeBSD native version.
r270332 (by royger):
pci: add a new pci_child_added newbus method.
This is needed so when running under Xen the calls to pci_child_added
can be intercepted and a custom Xen method can be used to register
those devices with Xen. This should not include any functional
change, since the Xen implementation will be added in a following
patch and the native implementation is a noop.
Sponsored by: Citrix Systems R&D
Reviewed by: jhb
dev/pci/pci.c:
dev/pci/pci_if.m:
dev/pci/pci_private.h:
dev/pci/pcivar.h:
- Add the pci_child_added newbus method.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This is a direct commit to stable/10.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Remove incorrect defines. The proper version of these macros is
defined in linux/etherdevice.h.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
ipv4_is_zeronet() and ipv4_is_loopback() expect an address in network
order, but IN_ZERONET and IN_LOOPBACK expect it in host order.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Thanks to Mellanox and their distributor Must (http://mustcompany.ru)
for providing hardware.
In collaboration with: Andre Melkoumian <andre mellanox.com>
Reviewed by: hselasky
Sponsored by: Netflix
Sponsored by: Nginx, Inc.
|
|
|
|
|
|
|
|
|
|
| |
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
Approved by: re, gjb
|
|
|
|
|
| |
Use parentheses instead of close proximity to ensure layer + 1 is evaluated
before the rest of the expression.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't drop the idr lock before verifying that the newly-inserted element
is present in the tree.
MFC r282741:
find_next_bit() and find_next_zero_bit(): if the caller-specified offset
lies within the last block of the bit set and no bits are set beyond the
offset, terminate the search immediately instead of continuing as though
there are further blocks in the set and subsequently returning an incorrect
result.
MFC r282743:
Ensure that msecs_to_jiffies(0) == 0.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r275358:
Start process of removing the use of the deprecated "M_FLOWID" flag
from the FreeBSD network code. The flag is still kept around in the
"sys/mbuf.h" header file, but does no longer have any users. Instead
the "m_pkthdr.rsstype" field in the mbuf structure is now used to
decide the meaning of the "m_pkthdr.flowid" field. To modify the
"m_pkthdr.rsstype" field please use the existing "M_HASHTYPE_XXX"
macros as defined in the "sys/mbuf.h" header file.
This patch introduces new behaviour in the transmit direction.
Previously network drivers checked if "M_FLOWID" was set in "m_flags"
before using the "m_pkthdr.flowid" field. This check has now now been
replaced by checking if "M_HASHTYPE_GET(m)" is different from
"M_HASHTYPE_NONE". In the future more hashtypes will be added, for
example hashtypes for hardware dedicated flows.
"M_HASHTYPE_OPAQUE" indicates that the "m_pkthdr.flowid" value is
valid and has no particular type. This change removes the need for an
"if" statement in TCP transmit code checking for the presence of a
valid flowid value. The "if" statement mentioned above is now a direct
variable assignment which is then later checked by the respective
network drivers like before.
r275483:
Remove M_FLOWID from SCTP code.
r276982:
Remove no longer used "M_FLOWID" flag from mbuf.h and update the netisr
manpage.
Note: The FreeBSD version has been bumped.
Reviewed by: hps, tuexen
Sponsored by: Limelight Networks
|
|
|
|
|
|
| |
Add missing void pointer argument to SYSINIT() functions.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Define PTR_ALIGN() macro which will be needed coming Mellanox driver
releases.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
| |
Define standard formatting strings to print GIDs
in a separate header file.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updates for the Mellanox ethernet driver
> List of fixes:
* use correct format for GID printouts
* double array indexing
* spelling in printouts
* void pointer arithmetic
* allow more receive rings
* correct maximum number of transmit rings
* use "const" instead of "static" for constants
* check for invalid VLAN tags
* check for lack of IRQ resources
> Added more hardware specific defines
> Added more verbose printouts of firmware status codes
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
| |
The "frag_info" pointer is already pointing to an array index.
Don't index twice.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes and updates for the Linux compatibility layer:
- Remove unsupported "bus" field from "struct pci_dev".
- Fix logic inside "pci_enable_msix()" when the number of allocated
interrupts are less than the number of available interrupts.
- Update header files included from "list.h".
- Ensure that "idr_destroy()" removes all entries before destroying
the IDR root node(s).
- Set the "device->release" function so that we don't leak memory at
device destruction.
- Use FreeBSD's "log()" function for certain debug printouts.
- Put parenthesis around arguments inside the min, max, min_t and max_t macros.
- Make sure we don't leak file descriptors by dropping the extra file
reference counts done by the FreeBSD kernel when calling falloc()
and fget_unlocked().
MFC after: 1 week
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
| |
Don't mask the IP-address when doing multicast IP over infiniband.
PR: 196631
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use CURVNET macros inside inet_get_local_port_range() function.
Without this fix, a kernel with VIMAGE + Infiniband will panic on bootup.
Certain necessary #include statements require LIST_HEAD.
Add these includes to ofed/include/linux/list.h, because
LIST_HEAD is specifically overridden in this file.
PR: 191468
Differential Revision: D1279
Reviewed by: hselasky
|
|
|
|
|
|
| |
Move OFED init a bit earlier so that PXE boot works.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
| |
Improve transmit sending offload, TSO, algorithm in general. This
change allows all HCAs from Mellanox Technologies to function properly
when TSO is enabled. See r271946 and r272595 for more details about
this commit.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Fix compile warning by removing unused variable.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
| |
Update the network interface baudrate integer according to the actual
line rate.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
| |
- De-vnet hash sizes and hash masks.
- Fix multiple issues related to arguments passed to SYSCTL macros.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
| |
- Fix compile warning when compiling with GCC.
- Add missed chunk in previous driver code MFC.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the OFED Linux compatibility layer and
Mellanox hardware driver(s):
- Properly name an inclusion guard
- Fix compile warnings regarding unsigned enums
- Add two new sysctl nodes
- Remove all empty linux header files
- Make an error printout more verbose
- Use "mod_delayed_work()" instead of
cancelling and starting a timeout.
- Implement more Linux scatterlist
functions.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hardware driver update from Mellanox Technologies, including:
- improved performance
- better stability
- new features
- bugfixes
Supported HCAs:
- ConnectX-2
- ConnectX-3
- ConnectX-3 Pro
NOTE:
- TSO feature needs r271946, which is not yet merged.
Sponsored by: Mellanox Technologies
Approved by: re, glebius
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Update the OFED Linux Emulation layer as a preparation for a
hardware driver update from Mellanox Technologies.
- Remove empty files from the OFED Linux Emulation layer.
- Fix compile warnings related to printf() and the "%lld" and "%llx"
format specifiers.
- Add some missing 2-clause BSD copyrights.
- Add "Mellanox Technologies, Ltd." to list of copyright holders.
- Add some new compatibility files.
- Fix order of uninit in the mlx4ib module to avoid crash at unload
using the new module_exit_order() function.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Fix for memory leak.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
| |
Fix OFED startup order: All SYSINIT()'s and modules should be loaded
prior to starting "/sbin/init" which will run all the "/etc/rc.d/xxx"
scripts. Else there can be a race configuring the interfaces via
"/etc/rc.conf".
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Fix compile warning.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
| |
Fix some compile warnings.
Sponsored by: Mellanox Technologies
|
|
|
|
|
| |
- Fix out of range shifting bug in bitops.h.
- Make code a bit easier to read by adding parenthesis.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this
shifts into the sign bit. Instead use (1U << 31) which gets the
expected result.
Similar to the (1 << 31) case it is not defined to do (2 << 30).
This fix is not ideal as it assumes a 32 bit int, but does fix the issue
for most cases.
A similar change was made in OpenBSD.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to r260020, only use -fms-extensions with gcc, for all other
modules which require this flag to compile. Use a GCC_MS_EXTENSIONS
variable, defined in kern.pre.mk, which can be used to easily supply the
flag (or not), depending on the compiler type.
MFC r260322:
In addition to r260102, also define GCC_MS_EXTENSIONS in bsd.sys.mk,
since kernel module builds do not use kern.pre.mk.
|
|
|
|
|
| |
head. This should fix building modules which require -fms-extensions to
compile them with gcc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For sys/dev/drm2/radeon, only use -fms-extensions with gcc. This flag
is only to stop gcc complaining about anonymous unions, which clang does
not do. For clang 3.4 however, -fms-extensions enables the Microsoft
__wchar_t type, which clashes with our own types.h.
MFC r260102:
Similar to r260020, only use -fms-extensions with gcc, for all other
modules which require this flag to compile. Use a GCC_MS_EXTENSIONS
variable, defined in kern.pre.mk, which can be used to easily supply the
flag (or not), depending on the compiler type.
|
|
|
|
| |
MFC: 259411
|
|
|
|
|
|
|
|
|
| |
Fix creating a vlan over lagg over mlxen crash.
PR: 181931
Submitted by: Shahar Klein (shahark mellanox.com)
Approved by: re
|
|
|
|
|
|
|
|
|
|
| |
Fix API mismatch exposed by lagg.
When destroying a lagg the driver tries to restore the old mac and
fails due to API mismatch.
Submitted by: Shahar Klein (shahark at mellanox.com)
Approved by: re
|