summaryrefslogtreecommitdiffstats
path: root/sys/ofed/drivers
Commit message (Collapse)AuthorAgeFilesLines
* MFC r282817:hselasky2015-05-211-0/+4
| | | | | | | 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
* MFC r275358 r275483 r276982 - Removing M_FLOWID by hps@hiren2015-04-242-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC r279865:hselasky2015-03-151-5/+8
| | | | | | | 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
* MFC r279584:hselasky2015-03-078-26/+57
| | | | | | | | | | | | | | | | | | | 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
* MFC r278856:hselasky2015-02-191-1/+1
| | | | | | | The "frag_info" pointer is already pointing to an array index. Don't index twice. Sponsored by: Mellanox Technologies
* MFC r276749:hselasky2015-01-132-6/+6
| | | | | | | | | | | | | | | | | | | | 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
* MFC r271946 and r272595:hselasky2014-11-031-2/+2
| | | | | | | | | 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
* MFC r273867:hselasky2014-10-311-3/+0
| | | | | | Fix compile warning by removing unused variable. Sponsored by: Mellanox Technologies
* MFC r273593:hselasky2014-10-311-1/+10
| | | | | | | Update the network interface baudrate integer according to the actual line rate. Sponsored by: Mellanox Technologies
* MFC r263710, r273377, r273378, r273423 and r273455:hselasky2014-10-271-4/+4
| | | | | | | - De-vnet hash sizes and hash masks. - Fix multiple issues related to arguments passed to SYSCTL macros. Sponsored by: Mellanox Technologies
* MFC r272683:hselasky2014-10-212-3/+1
| | | | | | | - Fix compile warning when compiling with GCC. - Add missed chunk in previous driver code MFC. Sponsored by: Mellanox Technologies
* MFC r273135:hselasky2014-10-1819-282/+25
| | | | | | | | | | | | | | | | | 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
* MFC r272027:hselasky2014-10-0240-3305/+8597
| | | | | | | | | | | | | | | | | | | 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
* MFC r270710 and r270821:hselasky2014-09-0441-58/+46
| | | | | | | | | | | | | | | - 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
* MFC r268316:hselasky2014-08-123-3/+3
| | | | | | | | | 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
* MFC r268315:hselasky2014-08-121-1/+1
| | | | | | Fix compile warning. Sponsored by: Mellanox Technologies
* MFC r268314:hselasky2014-08-121-12/+12
| | | | | | Fix some compile warnings. Sponsored by: Mellanox Technologies
* MFC r258779,r258780,r258787,r258822:eadler2014-02-044-13/+13
| | | | | | | | | | | | | 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.
* MFC r260102:dim2014-01-092-2/+2
| | | | | | | | | | | | 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.
* Revert MFC of r260102 for now, until I can merge the required fix fromdim2014-01-052-2/+2
| | | | | head. This should fix building modules which require -fms-extensions to compile them with gcc.
* MFC r260020:dim2014-01-042-2/+2
| | | | | | | | | | | | | | 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.
* Defer start/stop port to workqueues.alfred2013-12-192-25/+75
| | | | MFC: 259411
* MFC: 258276alfred2013-11-171-0/+6
| | | | | | | | | Fix creating a vlan over lagg over mlxen crash. PR: 181931 Submitted by: Shahar Klein (shahark mellanox.com) Approved by: re
* MFC: 257542alfred2013-11-171-2/+2
| | | | | | | | | | 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
* MFC: r257862, r257863, r257864alfred2013-11-083-67/+50
| | | | | | | | | | | | | | | | | | | | | | | | r257862: Use explicit long cast to avoid overflow in bitopts. This was causing problems with the buddy allocator inside of ofed. r257863: Fix for bad performance when mtu is increased. Update the auto moderation behavior in the mlxen driver to match the new LINUX OFED code. r257864: Do not use a sleep lock when protecting the driver flags. This was causing a locking issue with lagg. Approved by: re
* Fix resource free.alfred2013-10-201-3/+3
| | | | | | | | | | The order of releasing resources in mlxen was wrong, which caused panic on reload of the module. MFC: 256682 Submitted by: Shahar Klein (shahark at mellanox.com) Approved by: re
* Fix for When more than one NIC is present.alfred2013-10-101-34/+1
| | | | | | | | | | | | The device name was incorrect due to a specific function we ported from the Linux driver that is not FBSD compatible. This resulted with a false sysctl registration and some more problematic issues. The patch basically revokes it all together. Submitted by: Meny Yossefi (menyy mellanox.com) Approved by: re
* Remove redundant declaration of cmclass indim2013-10-091-3/+0
| | | | | | | sys/ofed/drivers/infiniband/core/ucm.c, to silence a gcc warning. Approved by: re (kib) X-MFC-With: r255932
* Fixed kernel crash when running devinfoalfred2013-10-011-0/+2
| | | | | | | | | | When calling to ib_uverbs_cleanup_ucontext, there is a call to mutex_lock of xrcd_table_mutex, which was not initialized. Added missing initialization for xrcd_table_mutex. Submitted by: Orit Moskovich (oritm mellanox.com) Approved by: re
* Enable ib_dev.mmap functionalfred2013-10-012-2/+45
| | | | | | | | | Removed the ifdef linux from this function. Added stub function for contiguous pages to avoid compilation errors. Submitted by: Orit Moskovich (oritm mellanox.com) Approved by: re
* Fixed 'Couldn't Create QP' issue when running rc_pingpong, uc_pingpong,alfred2013-10-011-0/+18
| | | | | | | | | | | | srq_pingpong IBverbs Removed refrences using 'ifdef __linux__' to qpg functions and related fields in struct ib_qp_init_attr. Submitted by: Orit Moskovich (oritm mellanox.com) Approved by: re
* Fixed kernel crash when removing IPOIB_CM option from configuration filealfred2013-10-012-2/+2
| | | | | | | Changed module init from module_init() to module_init_order() with SI_ORDER_MIDDLE flag Submitted by: Orit Moskovich (oritm mellanox.com) Approved by: re
* Update OFED to Linux 3.7 and update Mellanox drivers.alfred2013-09-2963-3277/+23023
| | | | | | | | | | | | | | | | | | | | | | | Update the OFED Infiniband core to the version supplied in Linux version 3.7. The update to OFED is nearly all additional defines and functions with the exception of the addition of additional parameters to ib_register_device() and the reg_user_mr callback. In addition the ibcore (Infiniband core) and ipoib (IP over Infiniband) have both been made into completely loadable modules to facilitate testing of the OFED stack in FreeBSD. Finally the Mellanox Infiniband drivers are now updated to the latest version shipping with Linux 3.7. Submitted by: Mellanox FreeBSD driver team: Oded Shanoon (odeds mellanox.com), Meny Yossefi (menyy mellanox.com), Orit Moskovich (oritm mellanox.com) Approved by: re
* Change m->pkthdr.header to m->pkthdr.PH_loc.ptr after r254804andre2013-08-251-2/+2
| | | | | | to transiently store pointers to packet headers. Sponsored by: The FreeBSD Foundation
* Stop an ipoib interface before detaching it.jhb2013-08-201-0/+2
| | | | | | | PR: kern/181225 Submitted by: Shahar Klein Obtained from: Mellanox MFC after: 1 week
* Add m_clrprotoflags() to clear protocol specific mbuf flags at up andandre2013-08-191-1/+1
| | | | | | | | downwards layer crossings. Consistently use it within IP, IPv6 and ethernet protocols. Discussed with: trociny, glebius
* Add a missing prototype.jhb2013-07-291-0/+1
| | | | Pointy hat: me
* Various fixes to the mlxen(4) driver:jhb2013-07-291-21/+31
| | | | | | | | | | | | | | - Remove an incorrect assertion that can trigger when downing an interface. - Stop the interface during detach to avoid panics when unloading the driver. - A few locking fixes to be more consistent with other FreeBSD drivers: - Protect if_drv_flags with the driver lock, not atomic ops - Hold the driver lock when adjusting multicast state. - Hold the driver lock while adjusting if_capenable. PR: kern/180791 [1,2] Submitted by: Shakar Klein @ Mellanox [1,2] MFC after: 3 days
* Avoid trashing IP fragments:jhb2013-07-251-2/+6
| | | | | | | | | - Only enable UDP/TCP hardware checksums if CSUM_UDP or CSUM_TCP is set. - Only enable IP hardware checksums if CSUM_IP is set. PR: kern/180430 Submitted by: Meny Yossefi <menyy@mellanox.com> MFC after: 1 week
* Rework the previous fix for the IB vs Ethernet sysctl handler to be morejhb2013-07-181-3/+3
| | | | | | | | | | | | | | | generic and apply to all sysfs attributes: - Use sysctl_handle_string() instead of reimplementing it. - Remove trailing newline from the current value before passing it to userland and append a newline to the new string value before passing it to the attribute's store function. - Don't leak the temporary buffer if the first error check triggers. - Revert earlier change to mlx4 port mode handler. PR: kern/174213 Submitted by: Garrett Cooper Reviewed by: Shakar Klein @ Mellanox MFC after: 1 week
* Remove check forbidding requests that would result in one port being setjhb2013-07-171-3/+0
| | | | | | | | to Ethernet and the subsequent port being set to IB. Submitted by: Shakar Klein @ Mellanox Tested by: Morgan Robertson <morganrobertson@gmail.com> MFC after: 1 week
* Allow mlx4 devices to switch from Ethernet to Infiniband (and vice versa):jhb2013-07-081-3/+3
| | | | | | | | | | | | - Fix sysctl wrapper for sysfs attributes to properly handle new string values similar to sysctl_handle_string() (only copyin the user's supplied length and nul-terminate the string). - Don't check for a trailing newline when evaluating the desired operating mode of a mlx4 device. PR: kern/179999 Submitted by: Shahar Klein <shahark@mellanox.com> MFC after: 1 week
* Fxi a bunch of typos.eadler2013-05-101-1/+1
| | | | | PR: misc/174625 Submitted by: Jeremy Chadwick <jdc@koitsu.org>
* Add const qualifier to the dst parameter of the ifnet if_output method.glebius2013-04-271-2/+2
|
* Check for SS_NBIO in the socket state field rather than socket bufferjhb2013-04-031-2/+2
| | | | | | | flags. Submitted by: Vijay Singh MFC after: 1 week
* Rename VM_OBJECT_LOCK(), VM_OBJECT_UNLOCK() and VM_OBJECT_TRYLOCK() toattilio2013-02-201-3/+3
| | | | | | their "write" versions. Sponsored by: EMC / Isilon storage division
* Fix LINT build on amd64.delphij2013-02-091-4/+4
|
* This fixes a out-of-order problem with severalrrs2013-02-071-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-056-9/+9
| | | | | | | | | malloc(9) flags within sys. Exceptions: - sys/contrib not touched - sys/mbuf.h edited manually
* Redo r242842, now actually fixing the warnings, as follows:dim2012-11-123-3/+3
| | | | | | | | | | | | | | | | - In sys/ofed/drivers/infiniband/core/cma.c, an enum struct member is interpreted as an int, so cast it to an int. - In sys/ofed/drivers/infiniband/core/ud_header.c, initialize the packet_length variable in ib_ud_header_init(), to prevent undefined behaviour. - In sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c, call rdma_notify() with the correct enum type and value. - In sys/ofed/include/linux/pci.h, change the PCI_DEVICE and PCI_VDEVICE macros to use C99 struct initializers, so additional members can be overridden. Reviewed by: delphij, Garrett Cooper <yanegomi@gmail.com> MFC after: 1 week
OpenPOWER on IntegriCloud