aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cxgb/ulp/tom
Commit message (Collapse)AuthorAgeFilesLines
* MFC r259897:Dimitry Andric2013-12-281-47/+0
| | | | | | | | | In sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c, remove static functions mk_cpl_barrier_ulp(), mk_get_tcb_ulp() and mk_set_tcb_field_ulp(), which are all unused since r237263. Notes: svn path=/stable/9/; revision=259993
* MFC/backport core kernel and userspace parts of r237263 (TCP_OFFLOADNavdeep Parhar2013-07-031-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rework). MFC r237563, r239511, r243603, r245915, r245916, r245919, r245921, r245922, r245924, r245925, r245932, r245934 too. Build tested with make universe. r237263: - Updated TOE support in the kernel. ... r237563: Fix clang warning when compiling iw_cxgb. r239511: Correctly handle the case where an inp has already been dropped by the time the TOE driver reports that an active open failed. toe_connect_failed is supposed to handle this but it should be provided the inpcb instead of the tcpcb which may no longer be around. r243603: Make sure that tcp_timer_activate() correctly sees TCP_OFFLOAD (or not). r245915: Heed SO_NO_OFFLOAD. r245916: Teach toe_4tuple_check() to deal with IPv6 4-tuples too. r245919: Add TCP_OFFLOAD hook in syncache_respond for IPv6 too, just like the one that exists for IPv4. r245921: There is no need to call into the TOE driver twice in pru_rcvd (tod_rcvd and then tod_output right after that). r245922: Avoid NULL dereference in nd6_storelladdr when no mbuf is provided. It is called this way from a couple of places in the OFED code. (toecore calls it too but that's going to change shortly). r245924: Move lle_event to if_llatbl.h lle_event replaced arp_update_event after the ARP rewrite and ended up in if_ether.h simply because arp_update_event used to be there too. IPv6 neighbor discovery is going to grow lle_event support and this is a good time to move it to if_llatbl.h. The two in-tree consumers of this event - OFED and toecore - are not affected. r245925: Generate lle_event in the IPv6 neighbor discovery code too. r245932: Teach toe_l2_resolve to resolve IPv6 destinations too. r245934: Add checks for SO_NO_OFFLOAD in a couple of places that I missed earlier in r245915. Notes: svn path=/stable/9/; revision=252555
* MFC r245243, r245274, r245276, r245434, r245441, r245448, r245467,Navdeep Parhar2013-02-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r245468, r245517, r245518, r245520, r245567, r245933, r245935, r245936, r245937, r246093, r246385, r246575, r247062, r247122, r247289, r247291, r247347, r247355, and r241733. Note that TCP_OFFLOAD is not enabled in 9 yet and so some of these MFCs don't really affect functionality. But they do help future MFCs (related to TCP_OFFLOAD or not) by minimizing diffs with the driver in head. r245243: cxgbe(4): updates to the configuration file that controls how hardware resources are partitioned. - Reduce the number of virtual interfaces reserved for PF4. This leaves spare room in the source MAC table and allows the driver to setup filters that rewrite the source MAC address. - Reduce the number of filters and use the freed up space for the CLIP (Compressed Local IPv6 addresses) table. This is a prerequisite for IPv6 TOE support which will follow separately in a series of commits. r245274: cxgbe(4): Add functions to help synchronize "slow" operations (those not on the fast data path) and use them instead of frobbing the adapter lock and busy flag directly. Other changes made while reworking all slow operations: - Wait for the reply to a filter request (add/delete). This guarantees that the operation is complete by the time the ioctl returns. - Tidy up the tid_info structure. - Do not allow the tx queue size to be set to something that's not a power of 2. r245276: Overhaul the stid allocator so that it can be used for IPv6 servers too. The entry for an IPv6 server in the TCAM takes up the equivalent of two ordinary stids and must be properly aligned too. r245434: cxgbe(4): Updates to the hardware L2 table management code. - Add full support for IPv6 addresses. - Read the size of the L2 table during attach. Do not assume that PCIe physical function 4 of the card has all of the table to itself. - Use FNV instead of Jenkins to hash L3 addresses and drop the private copy of jhash.h from the driver. r245441: cxgbe/tom: Miscellaneous updates for TOE+IPv6 support (more to follow). - Teach find_best_mtu_idx() to deal with IPv6 endpoints. - Install correct protosw in offloaded TCP/IPv6 sockets when DDP is enabled. - Move set_tcp_ddp_ulp_mode to t4_tom.c so that t4_tom.h can be included without having to drag in t4_msg.h too. This was bothering the iWARP driver for some reason. r245448: cxgbe/tom: Basic CLIP table management. This is the Compressed Local IPv6 table on the chip. To save space, the chip uses an index into this table instead of a full IPv6 address in some of its hardware data structures. For now the driver fills this table with all the local IPv6 addresses that it sees at the time the table is initialized. I'll improve this later so that the table is updated whenever new IPv6 addresses are configured or existing ones deleted. r245467: cxgbe/tom: Add support for fully offloaded TCP/IPv6 connections (active open). r245468: cxgbe/tom: Add support for fully offloaded TCP/IPv6 connections (passive open). r245517: cxgbe: Fix the for_each_foo macros -- the last argument should not share its name with any member of struct sge. r245518: cxgbe: Do a more thorough job in the CLEAR_STATS ioctl. r245520: Allow "ivlan" (inner VLAN) to be used as an alias for "vlan" when specifying match criteria. "vlan" continues to be valid here, and it continues to be valid when deleting, rewriting, inserting, or stacking an 802.1q tag to a matching packet. r245567: cxgbe: Make the for_each macros safer to use by turning them into a single statement each. r245933: cxgbe/tom: List IFCAP_TOE6 as supported now that all the required pieces are in place. You still have to enable it explicitly, after loading the t4_tom KLD. r245935: Add a couple of missing error codes. Treat CPL_ERR_KEEPALV_NEG_ADVICE as negative advice and not a fatal error. r245936: Force the 404-BT card (4 x 1G) to use the "uwire" configuration file. r245937: Install an extra hold on the newly allocated synq entry so that it cannot be freed while do_pass_accept_req is running. This closes a race where do_pass_establish on another CPU (the driver chose a different queue for the new tid) expands the synq entry into a full PCB and then releases the only hold on it, all while do_pass_accept_req is still running. r246093: Provide a statistic to track the number of drops in each of the port's txq's buf_ring. The aggregate for all the queues of a port is already provided in ifnet->if_snd.ifq_drops. r246385: Busy-wait when cold. r246575: Do not hold locks around hardware context reads. r247062: cxgbe(4): Assume that CSUM_TSO in the transmit path implies CSUM_IP and CSUM_TCP too. They are all set explicitly by the kernel usually. r247122: cxgbe(4): Add sysctls to extract debug information from the chip: dev.t4nex.X.misc.cim_la logic analyzer dump dev.t4nex.X.misc.cim_qcfg queue configuration dev.t4nex.X.misc.cim_ibq_xxx inbound queues dev.t4nex.X.misc.cim_obq_xxx outbound queues r247289: cxgbe(4): Update firmware to 1.8.4.0. r247291: cxgbe(4): Ask the card's firmware to pad up tiny CPLs by encapsulating them in a firmware message if it is able to do so. This works out better for one of the FIFOs in the chip. r247347: cxgbe(4): Consider all the API versions of the interfaces exported by the firmware (instead of just the main firmware version) when evaluating firmware compatibility. Document the new "hw.cxgbe.fw_install" knob being introduced here. This should fix kern/173584 too. Setting hw.cxgbe.fw_install=2 will mostly do what was requested in the PR but it's a bit more intelligent in that it won't reinstall the same firmware repeatedly if the knob is left set. r247355: cxgbe(4): Report unusual out of band errors from the firmware. r241733 (by ed@): Prefer __containerof() over __member2struct(). The former works better with qualifiers, but also properly type checks the input pointer. Notes: svn path=/stable/9/; revision=247434
* MFC many cxgb and cxgbe features and fixes (r239258, r239259, r239264,Navdeep Parhar2012-09-062-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r239266, r239336, r239338, r239339, r239341, r239344, r239514, r239527, r239528, r239544. r239258: Convert some fixed parameters to tunables (with reasonable default values). - cong_drop specifies what to do on congestion: nothing, backpressure, or drop. - fl_pktshift specifies the padding before Ethernet payload. - fl_pad specifies the boundary upto which to pad Ethernet payload. - spg_len controls the length of the status page. r239259: if_iqdrops should include frames truncated within the chip. r239264: Assume INET, INET6, and TCP_OFFLOAD when the driver is built out of tree and KERNBUILDDIR is not set. r239266: The size of the buffers in an Ethernet freelist has to be higher than the interface's MTU. Initialize such freelists with correct values. This wasn't a problem for common MTUs (1500 and 9000) as the buffers (2048 and 9216 in size) happened to have enough spare room. I ran into it when playing around with unusual MTUs. r239336: Allow for a different handler for each type of firmware message. r239338: Add a routine (t4_set_tcb_field) to update arbitrary parts of a hardware TCB. Filters are programmed by modifying the TCB too (via a different routine) and the reply to any TCB update is delivered via a CPL_SET_TCB_RPL. Figure out whether the reply is for a filter-write or something else and route it appropriately. r239339: Make room for DDP page pods in the default configuration profile. While here, bump up the L2 table's size to 4K entries. r239341: Initialize various DDP parameters in the main cxgbe(4) driver: - Setup multiple DDP page sizes. When the driver attempts DDP it will try to combine physically contiguous pages into regions of these sizes. - Set the indicate size such that the payload carried in the indicate can be copied in the header mbuf (and the 16K rx buffer can be recycled). - Set DDP threshold to the max payload that the chip will coalesce and deliver to the driver (this is ~16K by default, which is also why the offload rx queue is backed by 16K buffers). If the chip is able to coalesce up to the max it's allowed to, it's a good sign that the peer is transmitting in bulk without any TCP PSH. r239344: Support for TCP DDP (Direct Data Placement) in the T4 TOE module. Basically, this is automatic rx zero copy when feasible. TCP payload is DMA'd directly into the userspace buffer described by the uio submitted in soreceive by an application. - Works with sockets that are being handled by the TCP offload engine of a T4 chip (you need t4_tom.ko module loaded after cxgbe, and an "ifconfig +toe" on the cxgbe interface). - Does not require any modification to the application. - Not enabled by default. Use hw.t4nex.<X>.toe.ddp="1" to enable it. r239514: Minor cleanup: use bitwise ops instead of pointless wrappers around setbit/clrbit. r239527: Cannot hold a mutex around vm_fault_quick_hold_pages, so don't. Tweak some comments while here. r239528: Avoid a NULL pointer dereference. r239544: Deal with the case where a syncache entry added by the TOE driver is evicted from the syncache but a later syncache_expand succeeds because of syncookies. The TOE driver has to resort to more direct means to install its hooks in the socket in this case. Notes: svn path=/stable/9/; revision=240169
* Backport just the sys/{dev,modules}/cxgb{,e}/ parts of r237263, and thenNavdeep Parhar2012-07-0115-8263/+2965
| | | | | | | | | | | disable the TOE and iWARP modules in the Makefiles (they won't compile without the rest of r237263). This reduces diffs between the cxgb/cxgbe drivers in head and 9 and makes it easy to MFC other fixes to 9. Notes: svn path=/stable/9/; revision=237920
* Introduce and use a new VM interface for temporarily pinning pages. ThisAlan Cox2010-12-254-198/+9
| | | | | | | | | | new interface replaces the combined use of vm_fault_quick() and pmap_extract_and_hold() throughout the kernel. In collaboration with: kib@ Notes: svn path=/head/; revision=216699
* The local variable "rv" is still required by vm_fault_hold_user_pages().Alan Cox2010-12-201-3/+3
| | | | Notes: svn path=/head/; revision=216607
* Introduce vm_fault_hold() and use it to (1) eliminate a long-standing raceAlan Cox2010-12-201-13/+4
| | | | | | | | | | | | | condition in proc_rwmem() and to (2) simplify the implementation of the cxgb driver's vm_fault_hold_user_pages(). Specifically, in proc_rwmem() the requested read or write could fail because the targeted page could be reclaimed between the calls to vm_fault() and vm_page_hold(). In collaboration with: kib@ MFC after: 6 weeks Notes: svn path=/head/; revision=216604
* Implement and use a single optimized function for unholding a set of pages.Alan Cox2010-12-174-18/+4
| | | | | | | Reviewed by: kib@ Notes: svn path=/head/; revision=216511
* fix incorrect use of atomic_set_xxx in cxgbAndriy Gapon2010-12-111-1/+1
| | | | | | | | | | | | | There is no need to use an atomic operation at structure initialization time. Note that the file changed is not connected to the build at this time. Reviewed by: jhb (general issue) Approved by: np MFC after: 2 weeks Notes: svn path=/head/; revision=216373
* Catch up with the page and page queues locking changes.Alan Cox2010-06-181-8/+8
| | | | Notes: svn path=/head/; revision=209321
* There is no need to test __FreeBSD_version for features that haveNavdeep Parhar2010-02-241-1/+0
| | | | | | | | | | | | | | been around for a long time now (7.1-ish or even earlier); assume they are present. These includes MSI, TSO, LRO, VLAN, INTR_FILTERS, FIRMWARE, etc. Also, eliminate some dead code and clean up in other places as part of this quick once-over. MFC after: 1 week Notes: svn path=/head/; revision=204274
* Simplify the invocation of vm_fault(). Specifically, eliminate the flagAlan Cox2009-11-271-2/+1
| | | | | | | | | | VM_FAULT_DIRTY. The information provided by this flag can be trivially inferred by vm_fault(). Discussed with: kib Notes: svn path=/head/; revision=199868
* Many network stack subsystems use a single global data structure to holdRobert Watson2009-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | all pertinent statatistics for the subsystem. These structures are sometimes "borrowed" by kernel modules that require a place to store statistics for similar events. Add KPI accessor functions for statistics structures referenced by kernel modules so that they no longer encode certain specifics of how the data structures are named and stored. This change is intended to make it easier to move to per-CPU network stats following 8.0-RELEASE. The following modules are affected by this change: if_bridge if_cxgb if_gif ip_mroute ipdivert pf In practice, most of these statistics consumers should, in fact, maintain their own statistics data structures rather than borrowing structures from the base network stack. However, that change is too agressive for this point in the release cycle. Reviewed by: bz Approved by: re (kib) Notes: svn path=/head/; revision=196039
* Merge the remainder of kern_vimage.c and vimage.h into vnet.c andRobert Watson2009-08-011-3/+1
| | | | | | | | | | | | | vnet.h, we now use jails (rather than vimages) as the abstraction for virtualization management, and what remained was specific to virtual network stacks. Minor cleanups are done in the process, and comments updated to reflect these changes. Reviewed by: bz Approved by: re (vimage blanket) Notes: svn path=/head/; revision=196019
* Build on Jeff Roberson's linker-set based dynamic per-CPU allocatorRobert Watson2009-07-141-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (DPCPU), as suggested by Peter Wemm, and implement a new per-virtual network stack memory allocator. Modify vnet to use the allocator instead of monolithic global container structures (vinet, ...). This change solves many binary compatibility problems associated with VIMAGE, and restores ELF symbols for virtualized global variables. Each virtualized global variable exists as a "reference copy", and also once per virtual network stack. Virtualized global variables are tagged at compile-time, placing the in a special linker set, which is loaded into a contiguous region of kernel memory. Virtualized global variables in the base kernel are linked as normal, but those in modules are copied and relocated to a reserved portion of the kernel's vnet region with the help of a the kernel linker. Virtualized global variables exist in per-vnet memory set up when the network stack instance is created, and are initialized statically from the reference copy. Run-time access occurs via an accessor macro, which converts from the current vnet and requested symbol to a per-vnet address. When "options VIMAGE" is not compiled into the kernel, normal global ELF symbols will be used instead and indirection is avoided. This change restores static initialization for network stack global variables, restores support for non-global symbols and types, eliminates the need for many subsystem constructors, eliminates large per-subsystem structures that caused many binary compatibility issues both for monitoring applications (netstat) and kernel modules, removes the per-function INIT_VNET_*() macros throughout the stack, eliminates the need for vnet_symmap ksym(2) munging, and eliminates duplicate definitions of virtualized globals under VIMAGE_GLOBALS. Bump __FreeBSD_version and update UPDATING. Portions submitted by: bz Reviewed by: bz, zec Discussed with: gnn, jamie, jeff, jhb, julian, sam Suggested by: peter Approved by: re (kensmith) Notes: svn path=/head/; revision=195699
* Fix a buglet that slipped into r195654. My buildworld/buildkernel sanityLawrence Stewart2009-07-141-1/+1
| | | | | | | | | | | check missed this because cxgb's TOM is currently commented out of the build system. Submitted by: Navdeep Parhar <np at FreeBSD dot org> Approved by: re (kensmith), kensmith (mentor temporarily unavailable) Notes: svn path=/head/; revision=195677
* Replace struct tcpopt with a proxy toeopt struct in the TOE driver interface toLawrence Stewart2009-07-131-12/+13
| | | | | | | | | | | | | | | | the TCP syncache. This returns struct tcpopt to being private within the TCP implementation, thus allowing it to be modified without ABI concerns. The patch breaks the ABI. Bump __FreeBSD_version to 800103 accordingly. The cxgb driver is the only TOE consumer affected by this change, and needs to be recompiled along with the kernel. Suggested by: rwatson Reviewed by: rwatson, kmacy Approved by: re (kensmith), kensmith (mentor temporarily unavailable) Notes: svn path=/head/; revision=195654
* Update VNET base pointer setting macro to use a correct source ofMarko Zec2009-06-011-1/+1
| | | | | | | | | vnet context. Approved by: julian (mentor) Notes: svn path=/head/; revision=193270
* Change the curvnet variable from a global const struct vnet *,Marko Zec2009-05-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | previously always pointing to the default vnet context, to a dynamically changing thread-local one. The currvnet context should be set on entry to networking code via CURVNET_SET() macros, and reverted to previous state via CURVNET_RESTORE(). Recursions on curvnet are permitted, though strongly discuouraged. This change should have no functional impact on nooptions VIMAGE kernel builds, where CURVNET_* macros expand to whitespace. The curthread->td_vnet (aka curvnet) variable's purpose is to be an indicator of the vnet context in which the current network-related operation takes place, in case we cannot deduce the current vnet context from any other source, such as by looking at mbuf's m->m_pkthdr.rcvif->if_vnet, sockets's so->so_vnet etc. Moreover, so far curvnet has turned out to be an invaluable consistency checking aid: it helps to catch cases when sockets, ifnets or any other vnet-aware structures may have leaked from one vnet to another. The exact placement of the CURVNET_SET() / CURVNET_RESTORE() macros was a result of an empirical iterative process, whith an aim to reduce recursions on CURVNET_SET() to a minimum, while still reducing the scope of CURVNET_SET() to networking only operations - the alternative would be calling CURVNET_SET() on each system call entry. In general, curvnet has to be set in three typicall cases: when processing socket-related requests from userspace or from within the kernel; when processing inbound traffic flowing from device drivers to upper layers of the networking stack, and when executing timer-driven networking functions. This change also introduces a DDB subcommand to show the list of all vnet instances. Approved by: julian (mentor) Notes: svn path=/head/; revision=191816
* Update stats in struct tcpstat using two new macros, TCPSTAT_ADD() andRobert Watson2009-04-111-1/+1
| | | | | | | | | | | TCPSTAT_INC(), rather than directly manipulating the fields across the kernel. This will make it easier to change the implementation of these statistics, such as using per-CPU versions of the data structures. MFC after: 3 days Notes: svn path=/head/; revision=190948
* Use inc_flags instead of the inc_isipv6 alias which so farBjoern A. Zeeb2008-12-171-3/+0
| | | | | | | | | | | | | | | | | had been the only flag with random usage patterns. Switch inc_flags to be used as a real bit field by using INC_ISIPV6 with bitops to check for the 'isipv6' condition. While here fix a place or two where in case of v4 inc_flags were not properly initialized before.[1] Found by: rwatson during review [1] Discussed with: rwatson Reviewed by: rwatson MFC after: 4 weeks Notes: svn path=/head/; revision=186222
* This main goals of this project are:Qing Li2008-12-152-27/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. separating L2 tables (ARP, NDP) from the L3 routing tables 2. removing as much locking dependencies among these layers as possible to allow for some parallelism in the search operations 3. simplify the logic in the routing code, The most notable end result is the obsolescent of the route cloning (RTF_CLONING) concept, which translated into code reduction in both IPv4 ARP and IPv6 NDP related modules, and size reduction in struct rtentry{}. The change in design obsoletes the semantics of RTF_CLONING, RTF_WASCLONE and RTF_LLINFO routing flags. The userland applications such as "arp" and "ndp" have been modified to reflect those changes. The output from "netstat -r" shows only the routing entries. Quite a few developers have contributed to this project in the past: Glebius Smirnoff, Luigi Rizzo, Alessandro Cerri, and Andre Oppermann. And most recently: - Kip Macy revised the locking code completely, thus completing the last piece of the puzzle, Kip has also been conducting active functional testing - Sam Leffler has helped me improving/refactoring the code, and provided valuable reviews - Julian Elischer setup the perforce tree for me and has helped me maintaining that branch before the svn conversion Notes: svn path=/head/; revision=186119
* Rather than using hidden includes (with cicular dependencies),Bjoern A. Zeeb2008-12-021-0/+3
| | | | | | | | | | | | | | directly include only the header files needed. This reduces the unneeded spamming of various headers into lots of files. For now, this leaves us with very few modules including vnet.h and thus needing to depend on opt_route.h. Reviewed by: brooks, gnn, des, zec, imp Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=185571
* Change the initialization methodology for global variables scheduledMarko Zec2008-11-191-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | for virtualization. Instead of initializing the affected global variables at instatiation, assign initial values to them in initializer functions. As a rule, initialization at instatiation for such variables should never be introduced again from now on. Furthermore, enclose all instantiations of such global variables in #ifdef VIMAGE_GLOBALS blocks. Essentialy, this change should have zero functional impact. In the next phase of merging network stack virtualization infrastructure from p4/vimage branch, the new initialization methology will allow us to switch between using global variables and their counterparts residing in virtualization containers with minimum code churn, and in the long run allow us to intialize multiple instances of such container structures. Discussed at: devsummit Strassburg Reviewed by: bz, julian Approved by: julian (mentor) Obtained from: //depot/projects/vimage-commit2/... X-MFC after: never Sponsored by: NLnet Foundation, The FreeBSD Foundation Notes: svn path=/head/; revision=185088
* Update firmware version checkKip Macy2008-11-123-14/+19
| | | | | | | | | | make ddp a tunable Obtained from: Chelsio Inc. MFC after: 3 days Notes: svn path=/head/; revision=184861
* Step 1.5 of importing the network stack virtualization infrastructureMarko Zec2008-10-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from the vimage project, as per plan established at devsummit 08/08: http://wiki.freebsd.org/Image/Notes200808DevSummit Introduce INIT_VNET_*() initializer macros, VNET_FOREACH() iterator macros, and CURVNET_SET() context setting macros, all currently resolving to NOPs. Prepare for virtualization of selected SYSCTL objects by introducing a family of SYSCTL_V_*() macros, currently resolving to their global counterparts, i.e. SYSCTL_V_INT() == SYSCTL_INT(). Move selected #defines from sys/sys/vimage.h to newly introduced header files specific to virtualized subsystems (sys/net/vnet.h, sys/netinet/vinet.h etc.). All the changes are verified to have zero functional impact at this point in time by doing MD5 comparision between pre- and post-change object files(*). (*) netipsec/keysock.c did not validate depending on compile time options. Implemented by: julian, bz, brooks, zec Reviewed by: julian, bz, brooks, kris, rwatson, ... Approved by: julian (mentor) Obtained from: //depot/projects/vimage-commit2/... X-MFC after: never Sponsored by: NLnet Foundation, The FreeBSD Foundation Notes: svn path=/head/; revision=183550
* update callers of vm_fault_hold_user_pagesKip Macy2008-09-302-11/+15
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=183508
* Refactor vm_fault_hold_user_pages:Kip Macy2008-09-302-65/+56
| | | | | | | | | | | | | - simplify page hold logic - allow pages for processes other than that of curthread to have pages held - normalize the interface to more closely resemble the functions in sys/vm MFC after: 1 week Notes: svn path=/head/; revision=183507
* vm_fault_hold_user_pages will not return if an address in the range passed ↵Kip Macy2008-09-291-14/+8
| | | | | | | | | | | | | | | in is mapped RO but an RW mapping exists for the underlying page. This change fixes the bug by using the page / NULL returned from pmap_extract_and_hold to determine whether or not vm_fault needs to be called. The bug was pointed out by alc. MFC after: 3 days Notes: svn path=/head/; revision=183478
* - Remove default NIC dependency on ulp headersKip Macy2008-09-245-0/+5
| | | | | | | | | | - make toe module build dependent on kernel support Submitted by: Chelsio Inc. MFC after: 1 week Notes: svn path=/head/; revision=183321
* Update cxgb include paths to not require prefixing with dev/cxgbKip Macy2008-09-2312-111/+98
| | | | | | | Submitted by: Chelsio Inc. Notes: svn path=/head/; revision=183292
* Allow cxgb to be unified across versions by making newer features conditionalKip Macy2008-09-232-0/+14
| | | | | | | | Submitted by: Chelsio Inc MFC after: 3 days Notes: svn path=/head/; revision=183289
* Fix issue with tom loading by moving cxgb_log_tcb in to tomKip Macy2008-09-192-0/+30
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=183199
* Fix two panics:Kip Macy2008-09-181-3/+4
| | | | | | | | | | | | | 1. panic: rtalloc1_fib: bad fibnum 2. panic: Lock tcpinp not exclusively locked @ /usr/src/sys/netinet/in_pcb.c:1284 Submitted by: Chelsio Inc. MFC after: 3 days Notes: svn path=/head/; revision=183163
* Remove the suser(9) interface from the kernel. It has been replaced fromAttilio Rao2008-09-171-2/+2
| | | | | | | | | | | | | | | | | | | | years by the priv_check(9) interface and just very few places are left. Note that compatibility stub with older FreeBSD version (all above the 8 limit though) are left in order to reduce diffs against old versions. It is responsibility of the maintainers for any module, if they think it is the case, to axe out such cases. This patch breaks KPI so __FreeBSD_version will be bumped into a later commit. This patch needs to be credited 50-50 with rwatson@ as he found time to explain me how the priv_check() works in detail and to review patches. Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com> Reviewed by: rwatson Notes: svn path=/head/; revision=183113
* Remove some dead code along with gratuitous differences between HEAD and 7Kip Macy2008-09-164-4/+0
| | | | Notes: svn path=/head/; revision=183059
* Commit step 1 of the vimage project, (network stack)Bjoern A. Zeeb2008-08-171-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | virtualization work done by Marko Zec (zec@). This is the first in a series of commits over the course of the next few weeks. Mark all uses of global variables to be virtualized with a V_ prefix. Use macros to map them back to their global names for now, so this is a NOP change only. We hope to have caught at least 85-90% of what is needed so we do not invalidate a lot of outstanding patches again. Obtained from: //depot/projects/vimage-commit2/... Reviewed by: brooks, des, ed, mav, julian, jamie, kris, rwatson, zec, ... (various people I forgot, different versions) md5 (with a bit of help) Sponsored by: NLnet Foundation, The FreeBSD Foundation X-MFC after: never V_Commit_Message_Reviewed_By: more people than the patch Notes: svn path=/head/; revision=181803
* remove socketvar.h, add more selective includesKip Macy2008-07-314-6/+15
| | | | Notes: svn path=/head/; revision=181067
* Unbreak the build by including sys/socketvar.hPaul Saab2008-07-314-3/+7
| | | | Notes: svn path=/head/; revision=181039
* fix includes for post sockbuf re-factorKip Macy2008-07-305-142/+12
| | | | Notes: svn path=/head/; revision=181011
* remove call to unsafe tcp_twstart functionKip Macy2008-07-211-20/+1
| | | | Notes: svn path=/head/; revision=180675
* remove unneeded declarationsKip Macy2008-07-211-3/+0
| | | | Notes: svn path=/head/; revision=180651
* remove local version of tcp_offload_* functionsKip Macy2008-07-212-57/+0
| | | | Notes: svn path=/head/; revision=180650
* update syncache function namesKip Macy2008-07-211-2/+2
| | | | Notes: svn path=/head/; revision=180649
* remove cxgb local definition of locked syncache_expandKip Macy2008-07-212-15/+0
| | | | Notes: svn path=/head/; revision=180647
* remove cxgb local definitions of socket accessor functionsKip Macy2008-07-213-250/+18
| | | | Notes: svn path=/head/; revision=180644
* import vendor fixes to cxgbKip Macy2008-07-181-1/+9
| | | | Notes: svn path=/head/; revision=180583
* MFSVN:Kip Macy2008-05-055-63/+87
| | | | | | | | | | | | | | | | | - add / remove clients from cxgb_main.c now - change ifdef TOE_ENABLED to TCP_OFFLOAD_DISABLE - update copyrights - fix transmit data mismatch bug caused by not setting SB_NOCOALESCE on tx sockbuf on passive connections - fix receive sequence mismatch bug caused by not setting SB_NOCOALESCE on rx sockbuf on passive connections - don't sleep without checking SBS_CANTRCVMORE first - various ddp ordering fixes Supported by: Chelsio Inc. Notes: svn path=/head/; revision=178767
* move cxgb_lt2.[ch] from NIC to TOEKip Macy2008-04-1912-606/+3088
| | | | | | | | | move most offload functionality from NIC to TOE factor out all socket and inpcb direct access factor out access to locking in incpb, pcbinfo, and sockbuf Notes: svn path=/head/; revision=178302