summaryrefslogtreecommitdiffstats
path: root/sys/dev/cxgb
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate ext_intr_task. The "slow" interrupt handler is alreadynp2010-07-095-58/+14
| | | | | | | running on the adapter's task queue. Just do what the task does instead of enqueueing it. MFC after: 3 days
* Fix bufsize calculation so that cxgbtool can display information for thenp2010-07-091-1/+0
| | | | | | last I/O queue too. MFC after: 3 days
* Catch up with the page and page queues locking changes.alc2010-06-181-8/+8
|
* cxgb(4): add knob to get packet timestamps from the hardware.np2010-06-122-16/+53
| | | | | | | | | | | | | | The T3 ASIC can provide an incoming packet's timestamp instead of its RSS hash. The timestamp is just a counter running off the card's clock. With a 175MHz clock an increment represents ~5.7ns and the 32 bit value wraps around in ~25s. # sysctl -d dev.cxgbc.0.pkt_timestamp dev.cxgbc.0.pkt_timestamp: provide packet timestamp instead of connection hash # sysctl -d dev.cxgbc.0.core_clock dev.cxgbc.0.core_clock: core clock frequency (in KHz) # sysctl dev.cxgbc.0.core_clock dev.cxgbc.0.core_clock: 175000
* make format string a string literal.np2010-06-121-1/+1
| | | | Reported by: clang
* cxgb(4): add an 'nfilters' tunable that lets the user place an uppernp2010-06-071-4/+11
| | | | | limit on the number of hardware filters (and thus the amount of TCAM reserved for filtering).
* Remove invalid assertion.np2010-05-201-1/+0
| | | | | | | Holding the adapter lock while changing the LRO settings is sufficient. PR: kern/146759 MFC after: 3 days
* Don't ring the tx doorbell for every frame when we know more framesnp2010-05-052-18/+32
| | | | | | will follow. Adjust the freelist and response queue doorbells too. Discussed with: kmacy
* Do not hold the T3 firmware in memory all the time. firmware(9) cannp2010-05-051-2/+0
| | | | load/unload it as needed.
* Switch to our preferred 2-clause BSD license.joel2010-05-052-46/+40
| | | | Approved by: kmacy
* Add support for hardware filters to cxgb(4). The T3 chip can inspectnp2010-05-052-0/+302
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | L2/3/4 headers and can drop or steer packets as instructed. Filtering based on src ip, dst ip, src port, dst port, 802.1q, udp/tcp, and mac addr is possible. Add support in cxgbtool to program these filters. Some simple examples: Drop all tcp/80 traffic coming from the subnet specified. # cxgbtool cxgb2 filter 0 sip 192.168.1.0/24 dport 80 type tcp action drop Steer all incoming UDP traffic to qset 0. # cxgbtool cxgb2 filter 1 type udp queue 0 action pass Steer all tcp traffic from 192.168.1.1 to qset 1. # cxgbtool cxgb2 filter 2 sip 192.168.1.1 type tcp queue 1 action pass Drop fragments. # cxgbtool cxgb2 filter 3 type frag action drop List all filters. # cxgbtool cxgb2 filter list index SIP DIP sport dport VLAN PRI P/MAC type Q 0 192.168.1.0/24 0.0.0.0 * 80 0 0/1 */* tcp - 1 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* udp 0 2 192.168.1.1/32 0.0.0.0 * * 0 0/1 */* tcp 1 3 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* frag - 16367 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* * * MFC after: 2 weeks
* Add IFCAP_LINKSTATE to cxgb's capabilities.np2010-05-041-1/+1
| | | | MFC after: 3 days
* Add new tunable 'net.link.ifqmaxlen' to set default send interfacesobomax2010-05-031-1/+1
| | | | | | | | | | queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value. MFC after: 1 month
* Increase response queue size to avoid starvation, add a counternp2010-04-023-16/+28
| | | | to track it when it does occur.
* Multiple fixes related to queue set sizing and resources:np2010-03-315-54/+58
| | | | | | | | | | | | | | | | - Only the tunnelq (TXQ_ETH) requires a buf_ring, an ifq, and the watchdog/timer callouts. Do not allocate these for the other tx queues. - Use 16k jumbo clusters only on offload capable cards by default. - Do not allocate a full tx ring for the offload queue if the card is not offload capable. - Slightly better freelist size calculation. - Fix nmbjumbo4 typo, remove unneeded global variables. MFC after: 3 days
* Fix signed/unsigned mix-up that allowed txq->in_use to grow beyond txq->size.np2010-03-311-7/+6
|
* Fix tx drop statistics.np2010-03-313-28/+13
| | | | MFC after: 3 days
* Fix build with "nooptions INET"np2010-03-311-2/+13
| | | | | Requested by: bz MFC after: 3 days
* Do not attempt to retrieve interrupt information before it is available.np2010-03-311-1/+3
| | | | MFC after: 3 days
* Improved PHY EDC settings.np2010-03-311-371/+422
| | | | MFC after: 3 days
* Refresh the firmware version immediately after it is upgraded (or downgraded).np2010-03-311-4/+12
| | | | MFC after: 3 days
* Better TwinAx transceiver detection.np2010-03-092-2/+14
| | | | | | | Originally submitted by: <Bruno dot Bittner at isilon dot com> (This is a rewritten, corrected version of that patch) MFC after: 1 week
* Support IFCAP_VLANHWTSO in cxgb(4). It works with or without vlanhwtag.np2010-02-262-48/+48
| | | | While here, remove old DPRINTFs and tidy up the capability code a bit.
* There is no need to test __FreeBSD_version for features that havenp2010-02-2411-248/+29
| | | | | | | | | | | 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
* Accessing an mbuf after it has been handed off to the hardware is a badnp2010-02-241-22/+8
| | | | | | | race as it could already have been tx'd and freed by that time. Place the bpf tap just _before_ writing the gen bit. This fixes a panic when running tcpdump on a cxgb interface.
* Fix common misspelling of hierarchyuqs2010-02-201-2/+2
| | | | | Pointed out by: bf1783 at gmail Approved by: np (cxgb), kientzle (tar, etc.), philip (mentor)
* Fix drbr and altq interaction:mlaier2010-02-131-1/+3
| | | | | | | | | | | | | | | - introduce drbr_needs_enqueue that returns whether the interface/br needs an enqueue operation: returns true if altq is enabled or there are already packets in the ring (as we need to maintain packet order) - update all drbr consumers - fix drbr_flush - avoid using the driver queue (IFQ_DRV_*) in the altq case as the multiqueue consumer does not provide enough protection, serialize altq interaction with the main queue lock - make drbr_dequeue_cond work with altq Discussed with: kmacy, yongari, jfv MFC after: 4 weeks
* Don't forget to release the adapter lock for a no-op.np2010-01-231-0/+2
|
* Complain if freelist queue sizes are significantly less than desired.np2010-01-201-2/+6
| | | | MFC after: 1 day
* Fix for a cxgb(4) panic. cxgb_ioctl can be called by the IP and IPv6np2010-01-202-139/+139
| | | | | layers with non-sleepable locks held. Don't (potentially) sleep in those situations.
* Extra parantheses to keep certain compilers happy.np2010-01-091-1/+1
| | | | Submitted by: trasz@
* Remove extraneous semicolons, no functional changes.mbr2010-01-071-1/+1
| | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
* - Rename the __tcpi_(snd|rcv)_mss fields of the tcp_info structure to removejhb2009-12-221-1/+1
| | | | | | | | | the leading underscores since they are now implemented. - Implement the tcpi_rto and tcpi_last_data_recv fields in the tcp_info structure. Reviewed by: rwatson MFC after: 2 weeks
* T3 firmware 7.8.0 for cxgb(4)np2009-12-012-722/+739
| | | | | Obtained from: Chelsio MFC after: 3 days
* Simplify the invocation of vm_fault(). Specifically, eliminate the flagalc2009-11-271-2/+1
| | | | | | | VM_FAULT_DIRTY. The information provided by this flag can be trivially inferred by vm_fault(). Discussed with: kib
* Don't disable the XGMAC's tx on ifconfig down. It is unnecessarynp2009-11-131-3/+3
| | | | | and can cause false backpressure in the chip. Fix a us/ms mixup while here.
* The 10GBASE-T card should use an IPG of 1. Also enable the checknp2009-11-132-3/+1
| | | | for low power startup on this card.
* Make sure *some* edc is setup even for an unknown transceiver (assumenp2009-11-131-2/+2
| | | | it is optical).
* sc->rev and is_offload(sc) will always be 0 during probe. Wait tillnp2009-11-131-6/+3
| | | | attach to get correct values.
* Take a step towards removing if_watchdog/if_timer. Don't explicitly setjhb2009-11-061-4/+0
| | | | | if_watchdog/if_timer to NULL/0 when initializing an ifnet. if_alloc() sets those members to NULL/0 already.
* cxgb(4) updates, including:np2009-10-0513-2593/+4405
| | | | | | | | | | - support for the new Gen-2, BT, and LP-CR cards. - T3 firmware 7.7.0 - shared "common code" updates. Approved by: gnn (mentor) Obtained from: Chelsio MFC after: 1 month
* There is no need to log anything for a ctrlq stall or restart. These arenp2009-09-091-10/+5
| | | | | | | normal events. Approved by: gnn (mentor) MFC after: 1 month
* Fill the reverse RSS map with 0xff's so that the subsequent loop tojhb2009-09-041-0/+3
| | | | | | | calculate the values will work properly. Reviewed by: np MFC after: 1 month
* Many network stack subsystems use a single global data structure to holdrwatson2009-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)
* Merge the remainder of kern_vimage.c and vimage.h into vnet.c andrwatson2009-08-012-6/+2
| | | | | | | | | | 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)
* Build on Jeff Roberson's linker-set based dynamic per-CPU allocatorrwatson2009-07-142-8/+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)
* Fix a buglet that slipped into r195654. My buildworld/buildkernel sanitylstewart2009-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)
* Replace struct tcpopt with a proxy toeopt struct in the TOE driver interface tolstewart2009-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)
* Fix cxgb(4) panic with jumbo frames.np2009-07-091-2/+1
| | | | | Reviewed by: kmacy Approved by: re (kib), gnn (mentor)
* Use if_maddr_rlock() instead of IF_ADDR_LOCK() to protect access torwatson2009-06-261-3/+2
| | | | | | | if_multiaddrs in if_cxgb. Approved by: re (kib) MFC after: 6 weeks
OpenPOWER on IntegriCloud