aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cxgb
Commit message (Collapse)AuthorAgeFilesLines
...
* wakeup is required if the adapter lock is released anywhere duringNavdeep Parhar2010-08-151-2/+5
| | | | | | | | | | init and not just for the may_sleep case. Pointed out by: Isilon MFC after: 3 days Notes: svn path=/head/; revision=211345
* - Change the warning about PCI-e links narrower than x8 to only apply toJohn Baldwin2010-07-261-13/+11
| | | | | | | | | | | | 10G cards. 1G cards are x4 only. - Use constants from pcireg.h for reading the current link width. - Use pci_set_max_read_req() rather than implementing it by hand. Reviewed by: np MFC after: 1 week Notes: svn path=/head/; revision=210505
* Improve cxgb(4)'s behaviour when faced with temporarily "bouncy" links:Navdeep Parhar2010-07-095-40/+55
| | | | | | | | | | | | | | | | | - Run the adapter's tick at 1Hz and remove link state checks from it. Instead, have each port check its link state. Delay the check so that it takes place slightly after the driver is notified of a change in link state. This is a cheap way to debounce these notifications if many are received in rapid succession. POLL_LINK_1ST_TIME flag can also be eliminated as a side effect of these changes. - Do not reset the PHY when link goes down. - Clear port's link_fault flag if the PHY indicates link is down. - get_link_status_r should leave speed and duplex alone when link is down. MFC after: 1 month Notes: svn path=/head/; revision=209841
* Eliminate ext_intr_task. The "slow" interrupt handler is alreadyNavdeep Parhar2010-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 Notes: svn path=/head/; revision=209840
* Fix bufsize calculation so that cxgbtool can display information for theNavdeep Parhar2010-07-091-1/+0
| | | | | | | | | last I/O queue too. MFC after: 3 days Notes: svn path=/head/; revision=209839
* Catch up with the page and page queues locking changes.Alan Cox2010-06-181-8/+8
| | | | Notes: svn path=/head/; revision=209321
* cxgb(4): add knob to get packet timestamps from the hardware.Navdeep Parhar2010-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 Notes: svn path=/head/; revision=209116
* make format string a string literal.Navdeep Parhar2010-06-121-1/+1
| | | | | | | Reported by: clang Notes: svn path=/head/; revision=209115
* cxgb(4): add an 'nfilters' tunable that lets the user place an upperNavdeep Parhar2010-06-071-4/+11
| | | | | | | | limit on the number of hardware filters (and thus the amount of TCAM reserved for filtering). Notes: svn path=/head/; revision=208887
* Remove invalid assertion.Navdeep Parhar2010-05-201-1/+0
| | | | | | | | | | Holding the adapter lock while changing the LRO settings is sufficient. PR: kern/146759 MFC after: 3 days Notes: svn path=/head/; revision=208356
* Don't ring the tx doorbell for every frame when we know more framesNavdeep Parhar2010-05-052-18/+32
| | | | | | | | | will follow. Adjust the freelist and response queue doorbells too. Discussed with: kmacy Notes: svn path=/head/; revision=207688
* Do not hold the T3 firmware in memory all the time. firmware(9) canNavdeep Parhar2010-05-051-2/+0
| | | | | | | load/unload it as needed. Notes: svn path=/head/; revision=207687
* Switch to our preferred 2-clause BSD license.Joel Dahl2010-05-052-46/+40
| | | | | | | Approved by: kmacy Notes: svn path=/head/; revision=207673
* Add support for hardware filters to cxgb(4). The T3 chip can inspectNavdeep Parhar2010-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 Notes: svn path=/head/; revision=207643
* Add IFCAP_LINKSTATE to cxgb's capabilities.Navdeep Parhar2010-05-041-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=207639
* Add new tunable 'net.link.ifqmaxlen' to set default send interfaceMaxim Sobolev2010-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 Notes: svn path=/head/; revision=207554
* Increase response queue size to avoid starvation, add a counterNavdeep Parhar2010-04-023-15/+27
| | | | | | | to track it when it does occur. Notes: svn path=/head/; revision=206109
* Multiple fixes related to queue set sizing and resources:Navdeep Parhar2010-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 Notes: svn path=/head/; revision=205950
* Fix signed/unsigned mix-up that allowed txq->in_use to grow beyond txq->size.Navdeep Parhar2010-03-311-7/+6
| | | | Notes: svn path=/head/; revision=205949
* Fix tx drop statistics.Navdeep Parhar2010-03-313-28/+13
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=205948
* Fix build with "nooptions INET"Navdeep Parhar2010-03-311-2/+13
| | | | | | | | Requested by: bz MFC after: 3 days Notes: svn path=/head/; revision=205947
* Do not attempt to retrieve interrupt information before it is available.Navdeep Parhar2010-03-311-1/+3
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=205946
* Improved PHY EDC settings.Navdeep Parhar2010-03-311-371/+422
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=205945
* Refresh the firmware version immediately after it is upgraded (or downgraded).Navdeep Parhar2010-03-311-4/+12
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=205944
* Better TwinAx transceiver detection.Navdeep Parhar2010-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 Notes: svn path=/head/; revision=204921
* Support IFCAP_VLANHWTSO in cxgb(4). It works with or without vlanhwtag.Navdeep Parhar2010-02-262-48/+48
| | | | | | | While here, remove old DPRINTFs and tidy up the capability code a bit. Notes: svn path=/head/; revision=204348
* There is no need to test __FreeBSD_version for features that haveNavdeep Parhar2010-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 Notes: svn path=/head/; revision=204274
* Accessing an mbuf after it has been handed off to the hardware is a badNavdeep Parhar2010-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. Notes: svn path=/head/; revision=204271
* Fix common misspelling of hierarchyUlrich Spörlein2010-02-201-2/+2
| | | | | | | | Pointed out by: bf1783 at gmail Approved by: np (cxgb), kientzle (tar, etc.), philip (mentor) Notes: svn path=/head/; revision=204111
* Fix drbr and altq interaction:Max Laier2010-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 Notes: svn path=/head/; revision=203834
* Don't forget to release the adapter lock for a no-op.Navdeep Parhar2010-01-231-0/+2
| | | | Notes: svn path=/head/; revision=202863
* Complain if freelist queue sizes are significantly less than desired.Navdeep Parhar2010-01-201-2/+6
| | | | | | | MFC after: 1 day Notes: svn path=/head/; revision=202678
* Fix for a cxgb(4) panic. cxgb_ioctl can be called by the IP and IPv6Navdeep Parhar2010-01-202-139/+139
| | | | | | | | layers with non-sleepable locks held. Don't (potentially) sleep in those situations. Notes: svn path=/head/; revision=202671
* Extra parantheses to keep certain compilers happy.Navdeep Parhar2010-01-091-1/+1
| | | | | | | Submitted by: trasz@ Notes: svn path=/head/; revision=201907
* Remove extraneous semicolons, no functional changes.Martin Blapp2010-01-071-1/+1
| | | | | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week Notes: svn path=/head/; revision=201758
* - Rename the __tcpi_(snd|rcv)_mss fields of the tcp_info structure to removeJohn Baldwin2009-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 Notes: svn path=/head/; revision=200847
* T3 firmware 7.8.0 for cxgb(4)Navdeep Parhar2009-12-012-722/+739
| | | | | | | | Obtained from: Chelsio MFC after: 3 days Notes: svn path=/head/; revision=200003
* 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
* Don't disable the XGMAC's tx on ifconfig down. It is unnecessaryNavdeep Parhar2009-11-131-3/+3
| | | | | | | | and can cause false backpressure in the chip. Fix a us/ms mixup while here. Notes: svn path=/head/; revision=199240
* The 10GBASE-T card should use an IPG of 1. Also enable the checkNavdeep Parhar2009-11-132-3/+1
| | | | | | | for low power startup on this card. Notes: svn path=/head/; revision=199239
* Make sure *some* edc is setup even for an unknown transceiver (assumeNavdeep Parhar2009-11-131-2/+2
| | | | | | | it is optical). Notes: svn path=/head/; revision=199238
* sc->rev and is_offload(sc) will always be 0 during probe. Wait tillNavdeep Parhar2009-11-131-6/+3
| | | | | | | attach to get correct values. Notes: svn path=/head/; revision=199237
* Take a step towards removing if_watchdog/if_timer. Don't explicitly setJohn Baldwin2009-11-061-4/+0
| | | | | | | | if_watchdog/if_timer to NULL/0 when initializing an ifnet. if_alloc() sets those members to NULL/0 already. Notes: svn path=/head/; revision=198988
* cxgb(4) updates, including:Navdeep Parhar2009-10-0513-2592/+4404
| | | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=197791
* There is no need to log anything for a ctrlq stall or restart. These areNavdeep Parhar2009-09-091-10/+5
| | | | | | | | | | normal events. Approved by: gnn (mentor) MFC after: 1 month Notes: svn path=/head/; revision=197043
* Fill the reverse RSS map with 0xff's so that the subsequent loop toJohn Baldwin2009-09-041-0/+3
| | | | | | | | | | calculate the values will work properly. Reviewed by: np MFC after: 1 month Notes: svn path=/head/; revision=196840
* 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-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) Notes: svn path=/head/; revision=196019
* Build on Jeff Roberson's linker-set based dynamic per-CPU allocatorRobert Watson2009-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) 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