aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
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
* Backport just the sys/{dev,modules}/cxgb{,e}/ parts of r237263, and thenNavdeep Parhar2012-07-011-3755/+1158
| | | | | | | | | | | 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
* 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
* 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-121-3/+1
| | | | | | | | | | 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
* - Remove default NIC dependency on ulp headersKip Macy2008-09-241-0/+1
| | | | | | | | | | - 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-231-17/+16
| | | | | | | Submitted by: Chelsio Inc. Notes: svn path=/head/; revision=183292
* Allow cxgb to be unified across versions by making newer features conditionalKip Macy2008-09-231-0/+10
| | | | | | | | Submitted by: Chelsio Inc MFC after: 3 days Notes: svn path=/head/; revision=183289
* 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-161-1/+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
* Unbreak the build by including sys/socketvar.hPaul Saab2008-07-311-1/+2
| | | | Notes: svn path=/head/; revision=181039
* fix includes for post sockbuf re-factorKip Macy2008-07-301-0/+3
| | | | Notes: svn path=/head/; revision=181011
* remove call to unsafe tcp_twstart functionKip Macy2008-07-211-20/+1
| | | | Notes: svn path=/head/; revision=180675
* update syncache function namesKip Macy2008-07-211-2/+2
| | | | Notes: svn path=/head/; revision=180649
* remove cxgb local definitions of socket accessor functionsKip Macy2008-07-211-9/+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-051-15/+23
| | | | | | | | | | | | | | | | | - 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-191-402/+545
| | | | | | | | | 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
* change inp_wlock_assert to inp_lock_assertKip Macy2008-03-241-16/+16
| | | | Notes: svn path=/head/; revision=177575
* remove unneccessary tcbinfo lock acquisitions - set tp to null affter ↵Kip Macy2008-03-241-4/+2
| | | | | | | calling enter_timewait as we no longer own the inpcb Notes: svn path=/head/; revision=177540
* Insulate inpcb consumers outside the stack from the lock type and offset ↵Kip Macy2008-03-231-64/+64
| | | | | | | | | | within the pcb by adding accessor functions. Reviewed by: rwatson MFC after: 3 weeks Notes: svn path=/head/; revision=177530
* - Integrate 1.133 vendor driver changesKip Macy2008-03-181-29/+52
| | | | | | | | | - update some copyrights - add improved support for delayed ack - fix issue with fec Notes: svn path=/head/; revision=177340
* Fix namespace collision with sparc macroKip Macy2008-02-241-5/+5
| | | | Notes: svn path=/head/; revision=176507
* - update firmware to 5.0Kip Macy2008-02-231-328/+1237
| | | | | | | | | | | | | | | | | | | | - add support for T3C - add DDP support (zero-copy receive) - fix TOE transmit of large requests - fix shutdown so that sockets don't remain in CLOSING state indefinitely - register listeners when an interface is brought up after tom is loaded - fix setting of multicast filter - enable link at device attach - exit tick handler if shutdown is in progress - add helper for logging TCB - add sysctls for dumping transmit queues - note that TOE wxill not be MFC'd until after 7.0 has been finalized MFC after: 3 days Notes: svn path=/head/; revision=176472
* disable update in place on transmitKip Macy2007-12-171-4/+2
| | | | Notes: svn path=/head/; revision=174712
* Make TCP offload work on HEAD (modulo negative interaction between sbcompressKip Macy2007-12-171-7/+8
| | | | | | | | | | | | and t3_push_frames). - Import latest changes to cxgb_main.c and cxgb_sge.c from toestack p4 branch - make driver local copy of tcp_subr.c and tcp_usrreq.c and override tcp_usrreqs so TOE can also functions on versions with unmodified TCP - add cxgb back to the build Notes: svn path=/head/; revision=174708
* Add driver for TCP offloadKip Macy2007-12-161-0/+3378
Sponsored by: Chelsio Inc. Notes: svn path=/head/; revision=174641