Commit Graph

126 Commits

Author SHA1 Message Date
Kip Macy
b8fe6051bf MFp4 122896
- reduce cpu usage by as much as 25% (40% -> 30) by doing txq reclaim more efficiently
   - use mtx_trylock when trying to grab the lock to avoid spinning during long encap loop
   - add per-txq reclaim task
   - if mbufs were successfully re-claimed try another pass
- track txq overruns with sysctl

Approved by: re (blanket)
2007-07-10 06:01:45 +00:00
Kip Macy
bb38cd2fbc - switch adapter and port lock over to using sx so that resources
can be allocated atomically
- add debug macros for printing lock initialization / teardown
- add buffers to port_info and adapter to allow each lock to have a
  unique name
- destroy mutexes initialized by cxgb_offload_init
- remove recursive calls to ADAPTER_LOCK
- move callout_drain calls so that they don't occur with the lock held
- ensure that only as many qsets as are needed are initialized and
  destroyed

MFC after: 3 days
Sponsored by: Chelsio Inc.
2007-06-17 04:33:38 +00:00
Kip Macy
c0fdfb956d Fix build warnings
Submitted by: mjacob@
2007-06-15 20:02:02 +00:00
Kip Macy
ef72318f0e - import new common code for the T304
- update to firmware version 4.1.0

- switch over to standard method for initializing cdevs (contributed by scottl@)
- break out timer_reclaim_task to be per-port
- move msix teardown into separate function
- fix bus_setup_intr for msi-x for the multi-port case so that msi-x resources
  are not corrupted on unload
- handle 10/100/1000 base-T media and auto negotiation
- bind qset to cpu even for singleq case
- white space cleanups
- remove recursive PORT_LOCK
- move mtu setting to separate function
- stop and re-init port when changing mtu
- replace all direct references to m_data with calls to mtod
- handle attach failure better by not trying to de-initialize
  taskqueues when they have not been allocated
- no longer default to jumbo frames

Sponsored by: Chelsio
MFC after: 3 days
2007-06-13 05:36:00 +00:00
Kip Macy
f3ec953c8d remove pointless recursive acquisition of port lock in cxgb_init_locked 2007-06-02 03:02:36 +00:00
Kip Macy
cebf6b9f64 Fix case of setting OACTIVE erroneously 2007-05-29 04:18:21 +00:00
Kip Macy
f0a542f819 Fix interrupt setup for the non-MSI-X case 2007-05-29 03:13:53 +00:00
Kip Macy
10faa56870 When building cxgb as a module make include paths relative to the driver's root.
This will make it possible to build the module out of tree against an older src tree.

MFC after: 3 days
2007-05-28 22:57:27 +00:00
Kip Macy
5dfb4c0b24 Don't bind queue to cpus if only one queue is in use 2007-05-27 22:04:30 +00:00
Kip Macy
b2dda71e61 set IFF_OACTIVE to avoid hangs when the tx ring fills up 2007-05-27 04:39:07 +00:00
Kip Macy
d722cab49a (MFp4)
- upgrade to reflect state of 1.0.0.86
        - move from firmware rev 3.2 to 4.0.0
        - import driver bits for offload functionality
	- remove binary distribution clause from top level files as it
	  runs counter to the intent of purely supporting the hardware

MFC after: 3 days
2007-05-25 09:48:20 +00:00
Kip Macy
64c43db51c Default to using a single queue as this is currently the only way to achieve
line rate
2007-04-26 08:38:00 +00:00
Kip Macy
d43f50b93a Add sysctl for disabling/enabling mbuf chain collapsing
remove map creation before calling bus_dmamap_load_mvec_sg
2007-04-15 05:45:10 +00:00
Kip Macy
51580731ae Add support for mbuf iovec in the TX path 2007-04-14 20:40:22 +00:00
Kip Macy
23ed7b513f Add ETHER_HDR_LEN to hardware accepted mtu
MFC after: 3 days
2007-04-12 03:07:24 +00:00
Kip Macy
ac6b4cf110 bus_size_t is a bad cross-architectural type with respect to printf, use uint32_t instead 2007-03-24 04:28:33 +00:00
Kip Macy
20fe52b816 - Increase coalesce_nsecs
- commit fixes for the following coverity warnings: 1765, 1760, 1758, 1756
2007-03-23 22:03:55 +00:00
Kip Macy
fc01c613c5 Check PCI-e link width to avoid foot shooting with 4x links
MFC after: 3 days
2007-03-23 20:18:07 +00:00
Kip Macy
24cdd0676c move call to t3_prep_adapter earlier in attach before msi-x setup occurs
this works around the fact that pci_config_{save,restore} doesn't adequately
restore state for msi-x

MFC after: 3 days
2007-03-21 16:40:37 +00:00
Kip Macy
94f7a09823 allocate 9 messages in all cases 2007-03-21 09:16:10 +00:00
Kip Macy
693d746cc1 make MSI-X the default and allocate up to mp_ncpus queues per port
MFC after: 3 days
2007-03-21 07:25:40 +00:00
Kip Macy
577e9bbe3e Synchronize with version 1.0.071 of Chelsio's common code
(with the notable exception of improvements for using multiple TX queues)

This adds support for the T3B2 ASIC rev

Obtained from: Chelsio
MFC after: 3 days
2007-03-20 21:43:32 +00:00
Kip Macy
77f07749f3 cxgb_stop is only called from cxgb_ioctl so:
- don't acquire port lock, already held in ioctl
- rename to cxgb_stop_locked
- switch callout_drain to callout_stop to avoid a hang from having the port lock held
2007-03-20 06:21:47 +00:00
Kip Macy
f467efb7b5 play it safe for now and go back to kicking off tx cleaning from the tx path 2007-03-14 07:57:59 +00:00
Kip Macy
1940bc694e move taskqueue_enqueue of tx clean operation out of the start path 2007-03-14 06:34:10 +00:00
Kip Macy
b6d90eb779 First of several commits for driver support for the Chelsio T3B 10 Gigabit
Ethernet adapter.

Reviewed by: scottl, sam

For those interested in the preliminary performance work see below.

Plots of mxge vs. cxgb running netpipe:

blocksize vs. bandwidth:
http://www.fsmware.com/chelsio.random/bsvsbw.gif

blocksize vs. RTT:
First of several commits for driver support for the Chelsio T3B 10 Gigabit
Ethernet adapter.

Reviewed by: scottl, sam

For those interested in the preliminary performance work see below.

Plots of mxge vs. cxgb running netpipe:

blocksize vs. bandwidth:
http://www.fsmware.com/chelsio.random/bsvsbw.gif

blocksize vs. RTT:
http://www.fsmware.com/chelsio.random/bsvstime.gif

blocksize vs. RTT for block sizes <= 10kb:
http://www.fsmware.com/chelsio.random/bsvstime_10kb.gif
http://www.fsmware.com/chelsio.random/bsvstime_10kb3.gif
2007-03-14 02:37:44 +00:00