summaryrefslogtreecommitdiffstats
path: root/sys/dev/cxgb/cxgb_sge.c
Commit message (Collapse)AuthorAgeFilesLines
* t3_free_sge_resources should be given the number of qsets it needs to free.np2011-03-241-6/+2
| | | | MFC after: 1 week
* Explicitly wire the user buffer rather than doing it implicitly inmdf2011-01-271-2/+9
| | | | | | | | sbuf_new_for_sysctl(9). This allows using an sbuf with a SYSCTL_OUT drain for extremely large amounts of data where the caller knows that appropriate references are held, and sleeping is not an issue. Inspired by: rwatson
* Introduce signed and unsigned version of CTLTYPE_QUAD, renamingmdf2011-01-191-2/+2
| | | | existing uses. Rename sysctl_handle_quad() to sysctl_handle_64().
* sysctl(8) should use the CTLTYPE to determine the type of data whenmdf2011-01-191-2/+2
| | | | | | | | | | | reading. (This was already done for writing to a sysctl). This requires all SYSCTL setups to specify a type. Most of them are now checked at compile-time. Remove SYSCTL_*X* sysctl additions as the print being in hex should be controlled by the -x flag to sysctl(8). Succested by: bde
* sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.mdf2011-01-121-13/+13
| | | | Commit the cxgb driver piece.
* Re-add r212370 now that the LOR in powerpc64 has been resolved:mdf2010-09-161-31/+17
| | | | | | | | | | | | Add a drain function for struct sysctl_req, and use it for a variety of handlers, some of which had to do awkward things to get a large enough SBUF_FIXEDLEN buffer. Note that some sysctl handlers were explicitly outputting a trailing NUL byte. This behaviour was preserved, though it should not be necessary. Reviewed by: phk (original patch)
* Revert r212370, as it causes a LOR on powerpc. powerpc does a fewmdf2010-09-131-17/+31
| | | | | | | unexpected things in copyout(9) and so wiring the user buffer is not sufficient to perform a copyout(9) while holding a random mutex. Requested by: nwhitehorn
* Add a drain function for struct sysctl_req, and use it for a variety ofmdf2010-09-091-31/+17
| | | | | | | | | | handlers, some of which had to do awkward things to get a large enough FIXEDLEN buffer. Note that some sysctl handlers were explicitly outputting a trailing NUL byte. This behaviour was preserved, though it should not be necessary. Reviewed by: phk
* Eliminate ext_intr_task. The "slow" interrupt handler is alreadynp2010-07-091-2/+10
| | | | | | | running on the adapter's task queue. Just do what the task does instead of enqueueing it. MFC after: 3 days
* cxgb(4): add knob to get packet timestamps from the hardware.np2010-06-121-16/+51
| | | | | | | | | | | | | | 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
* Don't ring the tx doorbell for every frame when we know more framesnp2010-05-051-18/+30
| | | | | | will follow. Adjust the freelist and response queue doorbells too. Discussed with: kmacy
* Increase response queue size to avoid starvation, add a counternp2010-04-021-0/+3
| | | | to track it when it does occur.
* Multiple fixes related to queue set sizing and resources:np2010-03-311-50/+51
| | | | | | | | | | | | | | | | - 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-311-4/+3
| | | | MFC after: 3 days
* Fix build with "nooptions INET"np2010-03-311-2/+13
| | | | | Requested by: bz MFC after: 3 days
* Support IFCAP_VLANHWTSO in cxgb(4). It works with or without vlanhwtag.np2010-02-261-28/+19
| | | | 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-241-30/+6
| | | | | | | | | | | 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 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
* Complain if freelist queue sizes are significantly less than desired.np2010-01-201-2/+6
| | | | MFC after: 1 day
* Remove extraneous semicolons, no functional changes.mbr2010-01-071-1/+1
| | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
* 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
* Fix cxgb(4) panic with jumbo frames.np2009-07-091-2/+1
| | | | | Reviewed by: kmacy Approved by: re (kib), gnn (mentor)
* mvec routines should have no knowledge of the SG engine.np2009-06-251-5/+7
| | | | | Reviewed by: kmacy Approved by: gnn (mentor)
* fix typo in conditionalkmacy2009-06-201-1/+1
|
* - fix dma map handling for !x86 casekmacy2009-06-201-3/+4
| | | | - fix allocation failure handing in refill_fl
* Greatly simplify cxgb by removing almost all of the custom mbuf management logickmacy2009-06-191-555/+662
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - remove mbuf iovec - useful, but adds too much complexity when isolated to the driver - remove driver private caching - insufficient benefit over UMA to justify the added complexity and maintenance overhead - remove separate logic for managing multiple transmit queues, with the new drbr routines the control flow can be made to much more closely resemble legacy drivers - remove dedicated service threads, with per-cpu callouts one can get the same benefit much more simply by registering a callout 1 tick in the future if there are still buffered packets - remove embedded mbuf usage - Jeffr's changes will (I hope) soon be integrated greatly reducing the overhead of using kernel APIs for reference counting clusters - add hysteresis to descriptor coalescing logic - add coalesce threshold sysctls to allow users to decide at run-time between optimizing for forwarding / UDP or optimizing for TCP - add once per second watchdog to effectively close the very rare races occurring from coalescing - incorporate Navdeep's changes to the initialization path required to convert port and adapter locks back to ordinary mutexes (silencing BPF LOR complaints) - enable prefetches in get_packet and tx cleaning Reviewed by: navdeep@ MFC after: 2 weeks
* r193336 moved ifq_detach to if_free which broke if_alloc followedsam2009-06-151-2/+2
| | | | | | | | by if_free (w/o doing if_attach); move ifq_attach to if_alloc and rename ifq_attach/detach to ifq_init/ifq_delete to better identify their purpose Reviewed by: jhb, kmacy
* Add a missing error statistic, the number of FCS errors on receive.gnn2009-06-101-0/+1
| | | | | Reviewed by: jhb MFC after: 1 day
* Integrate three changes from Chelsio.gnn2009-05-211-0/+5
| | | | | | | | | | 1) Add a sysctl that will say what type of PHYs exist on the card. 2) Fix a bug that occurs when an AEL 2005 PHY resets without a transciever in the card. 3) Unify the PHY link detection code. Obtained from: Navdeep Parhar MFC after: 10 days
* Import "flowid" support for serializing flows across transmit queueskmacy2009-04-101-0/+1
| | | | Reviewed by: rwatson and jeli
* Update the Chelsio driver to the latest bits from Chelsiognn2009-03-101-4/+14
| | | | | | | | | | | | Firmware upgraded to 7.1.0 (from 5.0.0). T3C EEPROM and SRAM added; Code to update eeprom/sram fixed. fl_empty and rx_fifo_ovfl counters can be observed via sysctl. Two new cxgbtool commands to get uP logic analyzer info and uP IOQs Synced up with Chelsio's "common code" (as of 03/03/09) Submitted by: Navdeep Parhar at Chelsio Reviewed by: gnn MFC after: 2 weeks
* don't manually track statisticskmacy2008-12-011-6/+0
|
* - enable multiple transmit queueskmacy2008-11-221-18/+35
| | | | | | | | | | | - invert sense of hw.cxgb.singleq tunable to hw.cxgb.multiq - don't wake up transmitting thread by default - add per tx queue ifaltq to handle ALTQ - remove several unused functions in cxgb_multiq.c - add several sysctls: multiq_tx_enable, coalesce_tx_enable, and wakeup_tx_thread - this obsoletes the hw.cxgb.snd_queue_len as ifq is replaced by a buf_ring
* - bump __FreeBSD version to reflect added buf_ring, memory barriers,kmacy2008-11-221-10/+7
| | | | | | | | | | | | | | | | | and ifnet functions - add memory barriers to <machine/atomic.h> - update drivers to only conditionally define their own - add lockless producer / consumer ring buffer - remove ring buffer implementation from cxgb and update its callers - add if_transmit(struct ifnet *ifp, struct mbuf *m) to ifnet to allow drivers to efficiently manage multiple hardware queues (i.e. not serialize all packets through one ifq) - expose if_qflush to allow drivers to flush any driver managed queues This work was supported by Bitgravity Inc. and Chelsio Inc.
* Track number of packets transmitted and number of packets receivedkmacy2008-10-171-1/+6
| | | | | PR: 125806 MFC after: 3 days
* Fix bug in LRO on T304 whereby a packet could be sent to the wrong ↵kmacy2008-10-031-1/+13
| | | | | | | interface's ifp. Submitted by: Chelsio Inc. MFC after: 1 day
* Update cxgb include paths to not require prefixing with dev/cxgbkmacy2008-09-231-5/+0
| | | | Submitted by: Chelsio Inc.
* Allow cxgb to be unified across versions by making newer features conditionalkmacy2008-09-231-5/+19
| | | | | Submitted by: Chelsio Inc MFC after: 3 days
* White space cleanups to bring closer to RELENG_7kmacy2008-09-161-1/+1
|
* Remove some dead code along with gratuitous differences between HEAD and 7kmacy2008-09-161-7/+7
|
* Fix issue with recovering from transient jumbo mbuf shortage.kmacy2008-09-091-6/+7
| | | | | Submitted by: Chelsio Inc. MFC after: 3 days
* Import ioctl updates for latest rev of cxgbtoolkmacy2008-09-021-1/+1
| | | | | Obtained from: Chelsio Inc. MFC after: 3 days
* Fix runt TSO packet issue.kmacy2008-08-131-20/+23
| | | | | Obtained from: Chelsio Inc. MFC after: 1 week
* Add LRO and MAC statistics to exported sysctls.kmacy2008-08-131-7/+114
| | | | | Obtained from: Chelsio Inc. MFC after: 1 week
* Remove cxgb private lro implementation and switch to using system ↵kmacy2008-08-121-47/+47
| | | | | | | implementation. Obtained from: Chelsio Inc. MFC after: 1 week
* import vendor fixes to cxgbkmacy2008-07-181-15/+47
|
* pay attention to default cluster limits when sizing receive queueskmacy2008-03-201-3/+28
|
* Spell 'overwriting' correctly in a KASSERT() message.keramida2008-02-251-3/+4
|
OpenPOWER on IntegriCloud