Commit Graph

211 Commits

Author SHA1 Message Date
kmacy
ee0c9012ea - 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
kmacy
86403b20df Fix build warnings
Submitted by: mjacob@
2007-06-15 20:02:02 +00:00
kmacy
ca1df96c1a - 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
kmacy
206255ce0b remove pointless recursive acquisition of port lock in cxgb_init_locked 2007-06-02 03:02:36 +00:00
kmacy
052215bb59 Fix case of setting OACTIVE erroneously 2007-05-29 04:18:21 +00:00
kmacy
9cb5d0f6ce Fix interrupt setup for the non-MSI-X case 2007-05-29 03:13:53 +00:00
kmacy
679d42f237 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
kmacy
4fa4b7f8c6 Tuning for small packet handling
- Double the number of descriptors that a single call to send can use
- Quadruple the number of descriptors that can be reclaimed per pass
- only run reclaim twice per second
- increase coalesce timer from 3.5us to 5us

fix printf warning on 64-bit platforms
2007-05-27 22:07:47 +00:00
kmacy
3446e0aa75 Don't bind queue to cpus if only one queue is in use 2007-05-27 22:04:30 +00:00
kmacy
f48bd675d8 fix compile warning by removing redundant LOG_ERR define 2007-05-27 04:39:29 +00:00
kmacy
a25cd5af4b set IFF_OACTIVE to avoid hangs when the tx ring fills up 2007-05-27 04:39:07 +00:00
kmacy
bf51ee7f9c add missed header 2007-05-25 18:29:17 +00:00
kmacy
fc73d99652 update license headers 2007-05-25 16:42:25 +00:00
kmacy
e122b73bf6 add toe device header missed by previous commit 2007-05-25 16:17:59 +00:00
kmacy
ddbd7cde72 (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
kmacy
2f0b14e001 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
kmacy
15aa4e7aa9 Disable mbuf chain collapsing - it is currently causing an mbuf leak 2007-04-26 08:36:59 +00:00
kmacy
60e4196f37 Free cluster if we fail to create the dmamap.
Fixes CID 1829
Found by: Coverity
2007-04-20 05:16:42 +00:00
kmacy
17fde132b6 Eliminate CID 1842 by comparing against (type != EXT_MBUF) => refcnt != NULL 2007-04-20 05:12:54 +00:00
kmacy
f49e46301b Fix memory leak in m_collapse (CID 1843)
Found by: Coverity
Submitted by: jhb
2007-04-20 05:06:02 +00:00
kmacy
b13ef47a11 PHYS_TO_VM_PAGE requires explicit vm_page.h include on sparc64 2007-04-15 22:17:10 +00:00
mjacob
e08f3ecf3c Use %j and args cast to uintmax_t to print bus_addr_t && length args. 2007-04-15 19:03:45 +00:00
kmacy
252acbdc5f Add pmap includes needed by i386 2007-04-15 15:30:45 +00:00
kmacy
99993e1232 suck in more of busdma to enable more efficient mappings
kill redundant INVARIANTS check
2007-04-15 05:46:34 +00:00
kmacy
8d122756a5 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
kmacy
f6d283a04e Implement ZERO_COPY_SOCKETS check in a way that doesn't make LINT unhappy 2007-04-15 04:55:39 +00:00
kmacy
df7c6cd2a9 Add support for mbuf iovec in the TX path 2007-04-14 20:40:22 +00:00
kmacy
a8a962f8f6 add reference count pointer to mbuf iovec
implement robust version of m_collapse
add support for sf_buf
add fix for m_iovappend
add calls to m_sanity under INVARIANTS
fix m_freem_vec to correctly travese the mbuf iovec chain
2007-04-14 20:38:38 +00:00
kmacy
73a329aba9 restore sense to get_imm_packet
MFC after: 3 days
2007-04-12 04:48:54 +00:00
kmacy
70fb9b909b switch over to per-txq dma tag to facilitate parallelism on TX
MFC after: 3 days
2007-04-12 04:31:44 +00:00
kmacy
e5733cf7f2 explicitly check TSO flag
don't clear and then set M_PKTHDR, m_gethdr sets it correctly
improve error handling on m_gethdr failure

MFC after: 3 days
2007-04-12 03:33:30 +00:00
kmacy
560360bd84 Add ETHER_HDR_LEN to hardware accepted mtu
MFC after: 3 days
2007-04-12 03:07:24 +00:00
jhb
081fdb71d7 Fix m_freem_vec() to actually traverse the mbuf chain. This avoids
double free's and an infinite loop.

CID:		1834
Found by:	Coverity Prevent (tm)
2007-04-11 13:47:24 +00:00
kmacy
22667b1b7e throw sun4v into the check while we're at it 2007-04-09 17:05:54 +00:00
kmacy
4083aff7c8 busdma tags are opaque on all architectures except sparc64
for now simply don't compile/use on sparc64
2007-04-09 17:01:23 +00:00
kmacy
47ca069c43 Add missing paren 2007-04-08 22:56:18 +00:00
kmacy
04099f707e remove stale variable reference 2007-04-08 18:02:37 +00:00
kmacy
9d80aa5292 add busdma function for mapping mbuf iovecs
change m_collapse to return an error code
2007-04-08 15:59:07 +00:00
kmacy
89cfec3b05 Convert driver RX path over to using mbuf iovec 2007-04-08 15:04:19 +00:00
kmacy
c2173d9689 Add driver private mbuf iovec support routines 2007-04-08 14:56:16 +00:00
kmacy
7db0b7227a Make DMA tags per-queue to facilate parallel mappings
Defer mbuf allocation and initialization until after data has already been
received in a cluster

This reduces cpu utilization somewhat, but it only improves the rx path.
Recent changes to TCP appear to make us rate limited by the TX path.

This is the first step in reducing mbuf management overhead for manipulating
clusters.

MFC after: 3 days
2007-04-04 05:29:18 +00:00
kmacy
758c270b77 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
kmacy
eeef57ea74 - Increase coalesce_nsecs
- commit fixes for the following coverity warnings: 1765, 1760, 1758, 1756
2007-03-23 22:03:55 +00:00
kmacy
109b79fc3c commit missed change 2007-03-23 22:02:11 +00:00
kmacy
4bfdd681e7 Check PCI-e link width to avoid foot shooting with 4x links
MFC after: 3 days
2007-03-23 20:18:07 +00:00
kmacy
0fdeee32de 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
kmacy
8c807af8fa allocate 9 messages in all cases 2007-03-21 09:16:10 +00:00
kmacy
88ef185ca9 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
kmacy
febce07b18 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
kmacy
b3f52e360c 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
kmacy
9fd1f2e0cc move inline function above use so that -O works 2007-03-17 05:23:45 +00:00
kmacy
9670a35463 #define L1_CACHE_BYTES for non-x86 2007-03-14 16:18:51 +00:00
kmacy
08b5519b43 define prefetch as a no-op macro for non-x86 arches 2007-03-14 16:05:39 +00:00
kmacy
a331dd52f8 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
kmacy
8ee973ffa9 #define memory barrier macros for the non-i386 && non-amd64 case 2007-03-14 06:40:46 +00:00
kmacy
d1f948fe66 remove unused code for recycling descriptors
kick tx cleaner from credit update function
2007-03-14 06:36:58 +00:00
kmacy
98a2d252b3 add cxgb_config.h to define values that are defined in the Makefile when compiled as a
module

move prefetch out of cxgb_sge.c into header under arch conditional compilation
2007-03-14 06:35:38 +00:00
kmacy
d784e1ab37 move taskqueue_enqueue of tx clean operation out of the start path 2007-03-14 06:34:10 +00:00
kmacy
9273d036f8 make desc_reclaimable macro safe to arbitrary arguments 2007-03-14 06:33:28 +00:00
kmacy
110c717ac8 Add firmware for cxgb 2007-03-14 02:44:48 +00:00
kmacy
9e34f4996b 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