Commit Graph

19 Commits

Author SHA1 Message Date
Kip Macy
a913be0917 - add drbr routines for accessing #qentries and conditionally dequeueing
- track bytes enqueued in buf_ring
2009-06-09 19:19:16 +00:00
Kip Macy
24df53962e fix bug introduced by last change
Submitted by:	Navdeep Parhar
2009-05-12 03:30:25 +00:00
Kip Macy
bf541f371e simplify by removing dead code 2009-04-27 22:54:30 +00:00
Robert Watson
a6c19108c5 Prefer ENETDOWN to ENXIO when returning queuing errors due to a link
down, interface down, etc, with if_cxgb's if_transmit routine.

MFC after:	3 days
Reviewed by:	kmacy
2009-03-10 22:35:45 +00:00
Kip Macy
f3c713fdaf - fix bug where dnsperf would stop transmitting after a few seconds
- break complex conditionals in to multiple lines to avoid wrapping
- remove copious unused debug statements
- be more aggressive about cleaning in the calling thread
- eliminate usage of ENOSPC
- increase number of iterations that cxgbsp can do
- eliminate "initerr" usage to simplify ENOBUFS handling
- when coalescing pass all packets to BPF
- always set overrun if hardware queue is full
2008-12-02 07:01:18 +00:00
Kip Macy
5d96be4eb8 work around periodic leak on queue overrun by enabling coalescing of packets in to
work requests by default
2008-11-23 00:22:52 +00:00
Kip Macy
a02573bc06 - enable multiple transmit queues
- 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
2008-11-22 08:05:05 +00:00
Kip Macy
db7f0b974f - bump __FreeBSD version to reflect added buf_ring, memory barriers,
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.
2008-11-22 05:55:56 +00:00
Kip Macy
79775f8f1b Update cxgb include paths to not require prefixing with dev/cxgb
Submitted by:	Chelsio Inc.
2008-09-23 03:16:54 +00:00
Kip Macy
e97121da99 Allow cxgb to be unified across versions by making newer features conditional
Submitted by:	Chelsio Inc
MFC after:	3 days
2008-09-23 02:22:24 +00:00
Kip Macy
9f58ea1678 - Fix flag check
- Fix adaptive thread sleep
- set oactive when queue is full
2008-09-23 01:55:36 +00:00
Kip Macy
c7e1ab2e4c - Track number of times that the transmit queue overflowed
- Trivial whitespace cleanup

MFC after:	3 days
2008-09-23 01:27:19 +00:00
Kip Macy
8e10660f12 - update firmware to 5.0
- 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
2008-02-23 01:06:17 +00:00
Kip Macy
139edb19d9 - Simplify mb_free_ext_fast
- increase asserts for mbuf accounting
- track outstanding mbufs (maps very closely to leaked)
- actually only create one thread per port if !multiq
    Oddly enough this fixes the use after free

- move txq_segs to stack in t3_encap
- add checks that pidx doesn't move pass cidx
- simplify mbuf free logic in collapse mbufs routine
2008-01-15 08:08:09 +00:00
Kip Macy
60f1e27625 - move WR_LEN in to cxgb_adapter.h add PIO_LEN to make intent clearer
- move cxgb_tx_common in to cxgb_multiq.c and rename to cxgb_tx
- move cxgb_tx_common dependencies
- further simplify cxgb_dequeue_packet for the non-multiqueue case
- only launch one service thread per port in the non-multiq case
- remove dead cleaning code from cxgb_sge.c
- simplify PIO case substantially in by returning directly from mbuf collapse
  and just using m_copydata
- remove gratuitous m_gethdr in the rx path
- clarify freeing of mbufs in collapse
2008-01-15 03:27:42 +00:00
Kip Macy
8b7399ad30 - Assert that immpkt is not set
- convert %lx to 32-bit safe %jx
2008-01-14 07:55:56 +00:00
Kip Macy
efe7dfb26c - Add more extensive sanity checks
- remove initial dequeue from cxgb_start as it was causing an mbuf to be referenced twice
2008-01-14 06:00:41 +00:00
Kip Macy
5ef02c0223 Convert over to using the multiqueue infrastructure although all calls going
through cxgb_start still end up using queue 0
2008-01-13 22:38:17 +00:00
Kip Macy
9b74c87f1f MFp4 multiple queue support 2008-01-12 20:34:56 +00:00