summaryrefslogtreecommitdiffstats
path: root/sys/ofed
Commit message (Collapse)AuthorAgeFilesLines
* 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-124-7/+9
| | | | | | | | | | | | | | | | - 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
* Use %s when calling make_dev with a string pointer. This makesdelphij2012-11-091-1/+1
| | | | | | clang happy. MFC after: 2 weeks
* remove duplicate semicolons where possible.eadler2012-10-223-3/+3
| | | | | Approved by: cperciva MFC after: 1 week
* Take advantage of if_baudrate_pf and calculate an effective baud rate onjhb2012-10-181-6/+10
| | | | all platforms (not just amd64) to compute an equivalent IB rate.
* Use if_initbaudrate().jhb2012-10-181-1/+1
|
* The drbr(9) API appeared to be so unclear, that most drivers inglebius2012-09-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tree used it incorrectly, which lead to inaccurate overrated if_obytes accounting. The drbr(9) used to update ifnet stats on drbr_enqueue(), which is not accurate since enqueuing doesn't imply successful processing by driver. Dequeuing neither mean that. Most drivers also called drbr_stats_update() which did accounting again, leading to doubled if_obytes statistics. And in case of severe transmitting, when a packet could be several times enqueued and dequeued it could have been accounted several times. o Thus, make drbr(9) API thinner. Now drbr(9) merely chooses between ALTQ queueing or buf_ring(9) queueing. - It doesn't touch the buf_ring stats any more. - It doesn't touch ifnet stats anymore. - drbr_stats_update() no longer exists. o buf_ring(9) handles its stats itself: - It handles br_drops itself. - br_prod_bytes stats are dropped. Rationale: no one ever reads them but update of a common counter on every packet negatively affects performance due to excessive cache invalidation. - buf_ring_enqueue_bytes() reduced to buf_ring_enqueue(), since we no longer account bytes. o Drivers handle their stats theirselves: if_obytes, if_omcasts. o mlx4(4), igb(4), em(4), vxge(4), oce(4) and ixv(4) no longer use drbr_stats_update(), and update ifnet stats theirselves. o bxe(4) was the most correct driver, it didn't call drbr_stats_update(), thus it was the only driver accurate under moderate load. Now it also maintains stats itself. o ixgbe(4) had already taken stats from hardware, so just - drop software stats updating. - take multicast packet count from hardware as well. o mxge(4) just no longer needs NO_SLOW_STATS define. o cxgb(4), cxgbe(4) need no change, since they obtain stats from hardware. Reviewed by: jfv, gnn
* Align the PCI Express #defines with the style used for the PCI-Xgavin2012-09-181-2/+2
| | | | | | | | | | | | | | | | | #defines. This also has the advantage that it makes the names more compact, iand also allows us to correct the non-uniform naming of the PCIM_LINK_* defines, making them all consistent amongst themselves. This is a mostly mechanical rename: s/PCIR_EXPRESS_/PCIER_/g s/PCIM_EXP_/PCIEM_/g s/PCIM_LINK_/PCIEM_LINK_/g When this is MFC'd, #defines will be added for the old names to assist out-of-tree drivers. Discussed with: jhb MFC after: 1 week
* Remove unneeded ipfw headers introduced in r213447 from Infiniband code.melifaro2012-09-041-2/+0
| | | | MFC after: 2 weeks
* Streamline use of cdevpriv and correct some corner cases.hselasky2012-08-151-1/+0
| | | | | | | | | | | | | | | | | | | | 1) It is not useful to call "devfs_clear_cdevpriv()" from "d_close" callbacks, hence for example read, write, ioctl and so on might be sleeping at the time of "d_close" being called and then then freed private data can still be accessed. Examples: dtrace, linux_compat, ksyms (all fixed by this patch) 2) In sys/dev/drm* there are some cases in which memory will be freed twice, if open fails, first by code in the open routine, secondly by the cdevpriv destructor. Move registration of the cdevpriv to the end of the drm open routines. 3) devfs_clear_cdevpriv() is not called if the "d_open" callback registered cdevpriv data and the "d_open" callback function returned an error. Fix this. Discussed with: phk MFC after: 2 weeks
* After the PHYS_TO_VM_PAGE() function was de-inlined, the main reasonkib2012-08-051-0/+1
| | | | | | | | | | | | | to pull vm_param.h was removed. Other big dependency of vm_page.h on vm_param.h are PA_LOCK* definitions, which are only needed for in-kernel code, because modules use KBI-safe functions to lock the pages. Stop including vm_param.h into vm_page.h. Include vm_param.h explicitely for the kernel code which needs it. Suggested and reviewed by: alc MFC after: 2 weeks
* Fix clang warning when compiling iw_cxgb.np2012-06-251-1/+1
| | | | Reported by: rene, dim
* - Updated TOE support in the kernel.np2012-06-195-13/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Stateful TCP offload drivers for Terminator 3 and 4 (T3 and T4) ASICs. These are available as t3_tom and t4_tom modules that augment cxgb(4) and cxgbe(4) respectively. The cxgb/cxgbe drivers continue to work as usual with or without these extra features. - iWARP driver for Terminator 3 ASIC (kernel verbs). T4 iWARP in the works and will follow soon. Build-tested with make universe. 30s overview ============ What interfaces support TCP offload? Look for TOE4 and/or TOE6 in the capabilities of an interface: # ifconfig -m | grep TOE Enable/disable TCP offload on an interface (just like any other ifnet capability): # ifconfig cxgbe0 toe # ifconfig cxgbe0 -toe Which connections are offloaded? Look for toe4 and/or toe6 in the output of netstat and sockstat: # netstat -np tcp | grep toe # sockstat -46c | grep toe Reviewed by: bz, gnn Sponsored by: Chelsio communications. MFC after: ~3 months (after 9.1, and after ensuring MFC is feasible)
* Revert r234834 per luigi@ request.melifaro2012-05-031-0/+1
| | | | | | | | | | | Cleaner solution (e.g. adding another header) should be done here. Original log: Move several enums and structures required for L2 filtering from ip_fw_private.h to ip_fw.h. Remove ipfw/ip_fw_private.h header from non-ipfw code. Requested by: luigi Approved by: kib(mentor)
* Move several enums and structures required for L2 filtering from ↵melifaro2012-04-301-1/+0
| | | | | | | | | ip_fw_private.h to ip_fw.h. Remove ipfw/ip_fw_private.h header from non-ipfw code. Approved by: ae(mentor) MFC after: 2 weeks
* Do not announce IPv6 TSO support yet. The driver seems to make assumptionsbz2012-04-231-1/+1
| | | | | | based on IPv4 header parsing only. MFC after: 1 week
* Add OFED and the associated options and drivers to x86 LINT builds:jhb2012-04-129-11/+68
| | | | | | | | | | | | - Mark 'sdp' as requiring 'inet'. - Always include "opt_inet.h" and "opt_inet6.h" and modify the IB driver Makefiles to honor WITH/WITHOUT_INET/INET6/_SUPPORT options to determine what should be enabled during a module build. - Fix the mlxen(4) driver and the core IB code to compile without if INET is disabled (including when both INET and INET6 are disabled). Reviewed by: bz MFC after: 2 weeks
* Don't update if_obytes when transmitting packets. That is already donejhb2012-04-122-2/+0
| | | | | | | | in IFQ_HANDOFF() when the packet is passed to the start routine, so doing it here resulted in double counting. Reported by: Alex Tutubalin lexa lexa ru MFC after: 1 week
* Properly parse 40G media types from newer Mellanox adapters that arejhb2012-04-103-10/+35
| | | | | | 40G capable. For now, map all 40G links to 40GBase-CR4. MFC after: 2 weeks
* Fix build on i386.jhb2012-04-041-1/+1
|
* Use VM_MEMATTR_UNCACHEABLE instead of VM_MEMATTR_UNCACHED for UC mappings.jhb2012-03-272-2/+2
| | | | | VM_MEMATTR_UNCACHED is actually the x86-specific UC- mode (where a WC MTRR can override the PAT setting).
* Fix build of OFED bits with debugging options enabled.jhb2012-03-192-2/+2
|
* Fix build with INET6 disabled.jhb2012-03-162-3/+9
|
* Remove spurious 8bit chars, turning files into plain ASCII.uqs2012-01-152-2/+2
|
* Replace __signed by signed.ed2011-12-131-4/+4
| | | | | The signed keyword is an integral part of the C syntax. There's no need to use __signed.
* Do not define bool/true/false if the symbols already exist.mdf2011-12-121-0/+2
| | | | | MFC after: 2 weeks Sponsored by: Isilon Systems, LLC
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.ed2011-11-071-1/+1
| | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.ed2011-11-073-3/+3
| | | | This means that their use is restricted to a single C file.
* - change "is is" to "is" or "it is"eadler2011-10-161-1/+1
| | | | | | | | - change "the the" to "the" Approved by: lstewart Approved by: sahil (mentor) MFC after: 3 days
* Add the fo_chown and fo_chmod methods to struct fileops and use themkib2011-08-161-1/+3
| | | | | | | | | | to implement fchown(2) and fchmod(2) support for several file types that previously lacked it. Add MAC entries for chown/chmod done on posix shared memory and (old) in-kernel posix semaphores. Based on the submission by: glebius Reviewed by: rwatson Approved by: re (bz)
* MFCattilio2011-05-271-2/+2
|\
| * In ipoib_cm_handle_rx_wc(): Count incoming packets anddelphij2011-05-261-2/+2
| | | | | | | | | | | | bytes toward incoming counters. Reviewed by: jeff
* | Commit the support for removing cpumask_t and replacing it directly withattilio2011-05-051-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cpuset_t objects. That is going to offer the underlying support for a simple bump of MAXCPU and then support for number of cpus > 32 (as it is today). Right now, cpumask_t is an int, 32 bits on all our supported architecture. cpumask_t on the other side is implemented as an array of longs, and easilly extendible by definition. The architectures touched by this commit are the following: - amd64 - i386 - pc98 - arm - ia64 - XEN while the others are still missing. Userland is believed to be fully converted with the changes contained here. Some technical notes: - This commit may be considered an ABI nop for all the architectures different from amd64 and ia64 (and sparc64 in the future) - per-cpu members, which are now converted to cpuset_t, needs to be accessed avoiding migration, because the size of cpuset_t should be considered unknown - size of cpuset_t objects is different from kernel and userland (this is primirally done in order to leave some more space in userland to cope with KBI extensions). If you need to access kernel cpuset_t from the userland please refer to example in this patch on how to do that correctly (kgdb may be a good source, for example). - Support for other architectures is going to be added soon - Only MAXCPU for amd64 is bumped now The patch has been tested by sbruno and Nicholas Esborn on opteron 4 x 12 pack CPUs. More testing on big SMP is expected to came soon. pluknet tested the patch with his 8-ways on both amd64 and i386. Tested by: pluknet, sbruno, gianni, Nicholas Esborn Reviewed by: jeff, jhb, sbruno
* - Catch up to falloc() changes.jeff2011-04-262-1/+3
| | | | | - PHOLD() before using a task structure on the stack. - Fix a LOR between the sleepq lock and thread lock in _intr_drain().
* Even though this block is not compiled currently, properly assignbz2011-04-121-2/+4
| | | | | | | CSUM_TSO to if_hwassist rather than if_capabilities to avoid future errors. Reviewed by: jeff
* - Implement wake-on-lan support in mlxen.jeff2011-03-267-4/+72
|
* Do a sweep of the tree replacing calls to pci_find_extcap() with calls tojhb2011-03-231-1/+1
| | | | pci_find_cap() instead.
* - Correct the vlan filter programming. The device filter is built injeff2011-03-233-17/+15
| | | | | | reverse order. - Name the cq taskqueues according to whether they handle rx or tx. - Default LRO to on.
* - Don't use a separate set of rx queues for UDP, hash them into the samejeff2011-03-224-281/+142
| | | | | | | | set as TCP. - Eliminate the fully linear non-scatter/gather rx path, there is no harm in using arrays of clusters for both TCP and UDP. - Implement support for enabling/disabling per-vlan priority pause and queues via sysctl.
* Allow the ofed modules to be compiled on i386.kib2011-03-214-4/+7
| | | | Reviewed by: jeff
* - Merge in OFED 1.5.3 from projects/ofed/headjeff2011-03-21272-0/+104231
OpenPOWER on IntegriCloud