diff options
author | Steve Hodgson <shodgson@solarflare.com> | 2010-09-10 02:42:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-10 15:27:33 -0400 |
commit | ecc910f520ba8f22848982ee816ad75c449b805d (patch) | |
tree | e934380209532b831b7e7e334ddc33d75db7eef5 /drivers/net/sfc/efx.h | |
parent | 8313aca38b3937947fffebca6e34bac8e24300c8 (diff) |
sfc: Make the dmaq size a run-time setting (rather than compile-time)
- Allow the ring size to be specified in non
power-of-two sizes (for instance to limit
the amount of receive buffers).
- Automatically size the event queue.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/efx.h')
-rw-r--r-- | drivers/net/sfc/efx.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/sfc/efx.h b/drivers/net/sfc/efx.h index d6b172b1a8ef..c15a2d3c2c23 100644 --- a/drivers/net/sfc/efx.h +++ b/drivers/net/sfc/efx.h | |||
@@ -37,8 +37,6 @@ efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb); | |||
37 | extern void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index); | 37 | extern void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index); |
38 | extern void efx_stop_queue(struct efx_channel *channel); | 38 | extern void efx_stop_queue(struct efx_channel *channel); |
39 | extern void efx_wake_queue(struct efx_channel *channel); | 39 | extern void efx_wake_queue(struct efx_channel *channel); |
40 | #define EFX_TXQ_SIZE 1024 | ||
41 | #define EFX_TXQ_MASK (EFX_TXQ_SIZE - 1) | ||
42 | 40 | ||
43 | /* RX */ | 41 | /* RX */ |
44 | extern int efx_probe_rx_queue(struct efx_rx_queue *rx_queue); | 42 | extern int efx_probe_rx_queue(struct efx_rx_queue *rx_queue); |
@@ -53,13 +51,16 @@ extern void __efx_rx_packet(struct efx_channel *channel, | |||
53 | extern void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index, | 51 | extern void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index, |
54 | unsigned int len, bool checksummed, bool discard); | 52 | unsigned int len, bool checksummed, bool discard); |
55 | extern void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue); | 53 | extern void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue); |
56 | #define EFX_RXQ_SIZE 1024 | 54 | |
57 | #define EFX_RXQ_MASK (EFX_RXQ_SIZE - 1) | 55 | #define EFX_MAX_DMAQ_SIZE 4096UL |
56 | #define EFX_DEFAULT_DMAQ_SIZE 1024UL | ||
57 | #define EFX_MIN_DMAQ_SIZE 512UL | ||
58 | |||
59 | #define EFX_MAX_EVQ_SIZE 16384UL | ||
60 | #define EFX_MIN_EVQ_SIZE 512UL | ||
58 | 61 | ||
59 | /* Channels */ | 62 | /* Channels */ |
60 | extern void efx_process_channel_now(struct efx_channel *channel); | 63 | extern void efx_process_channel_now(struct efx_channel *channel); |
61 | #define EFX_EVQ_SIZE 4096 | ||
62 | #define EFX_EVQ_MASK (EFX_EVQ_SIZE - 1) | ||
63 | 64 | ||
64 | /* Ports */ | 65 | /* Ports */ |
65 | extern int efx_reconfigure_port(struct efx_nic *efx); | 66 | extern int efx_reconfigure_port(struct efx_nic *efx); |