diff options
author | Sreenivasa Honnur <Sreenivasa.Honnur@neterion.com> | 2008-02-20 17:07:51 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-03-17 07:49:26 -0400 |
commit | 6cfc482b4b1c512d81712eba41fa324b24e5e7b2 (patch) | |
tree | d288e4f8a08b22507a86e67826c87a0070e98789 /drivers/net/s2io.h | |
parent | 3a3d5756ac552ee2d2cca6ba0912f0ff328e8357 (diff) |
S2io: Multiqueue network device support - FIFO selection based on L4 ports
- Resubmit #2
- Transmit fifo selection based on TCP/UDP ports.
- Added tx_steering_type loadable parameter for transmit fifo selection.
0x0 NO_STEERING: Default FIFO is selected.
0x1 TX_PRIORITY_STEERING: FIFO is selected based on skb->priority.
0x2 TX_DEFAULT_STEERING: FIFO is selected based on L4 Ports.
Signed-off-by: Surjit Reang <surjit.reang@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/s2io.h')
-rw-r--r-- | drivers/net/s2io.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h index fdc0a94d0a89..5e351c0879fa 100644 --- a/drivers/net/s2io.h +++ b/drivers/net/s2io.h | |||
@@ -360,7 +360,10 @@ struct stat_block { | |||
360 | #define MAX_TX_FIFOS 8 | 360 | #define MAX_TX_FIFOS 8 |
361 | #define MAX_RX_RINGS 8 | 361 | #define MAX_RX_RINGS 8 |
362 | 362 | ||
363 | #define FIFO_DEFAULT_NUM 1 | 363 | #define FIFO_DEFAULT_NUM 5 |
364 | #define FIFO_UDP_MAX_NUM 2 /* 0 - even, 1 -odd ports */ | ||
365 | #define FIFO_OTHER_MAX_NUM 1 | ||
366 | |||
364 | 367 | ||
365 | #define MAX_RX_DESC_1 (MAX_RX_RINGS * MAX_RX_BLOCKS_PER_RING * 127 ) | 368 | #define MAX_RX_DESC_1 (MAX_RX_RINGS * MAX_RX_BLOCKS_PER_RING * 127 ) |
366 | #define MAX_RX_DESC_2 (MAX_RX_RINGS * MAX_RX_BLOCKS_PER_RING * 85 ) | 369 | #define MAX_RX_DESC_2 (MAX_RX_RINGS * MAX_RX_BLOCKS_PER_RING * 85 ) |
@@ -379,6 +382,8 @@ static int fifo_map[][MAX_TX_FIFOS] = { | |||
379 | {0, 1, 2, 3, 4, 5, 6, 7}, | 382 | {0, 1, 2, 3, 4, 5, 6, 7}, |
380 | }; | 383 | }; |
381 | 384 | ||
385 | static u16 fifo_selector[MAX_TX_FIFOS] = {0, 1, 3, 3, 7, 7, 7, 7}; | ||
386 | |||
382 | /* Maintains Per FIFO related information. */ | 387 | /* Maintains Per FIFO related information. */ |
383 | struct tx_fifo_config { | 388 | struct tx_fifo_config { |
384 | #define MAX_AVAILABLE_TXDS 8192 | 389 | #define MAX_AVAILABLE_TXDS 8192 |
@@ -431,6 +436,12 @@ struct config_param { | |||
431 | /* Tx Side */ | 436 | /* Tx Side */ |
432 | u32 tx_fifo_num; /*Number of Tx FIFOs */ | 437 | u32 tx_fifo_num; /*Number of Tx FIFOs */ |
433 | 438 | ||
439 | /* 0-No steering, 1-Priority steering, 2-Default fifo map */ | ||
440 | #define NO_STEERING 0 | ||
441 | #define TX_PRIORITY_STEERING 0x1 | ||
442 | #define TX_DEFAULT_STEERING 0x2 | ||
443 | u8 tx_steering_type; | ||
444 | |||
434 | u8 fifo_mapping[MAX_TX_FIFOS]; | 445 | u8 fifo_mapping[MAX_TX_FIFOS]; |
435 | struct tx_fifo_config tx_cfg[MAX_TX_FIFOS]; /*Per-Tx FIFO config */ | 446 | struct tx_fifo_config tx_cfg[MAX_TX_FIFOS]; /*Per-Tx FIFO config */ |
436 | u32 max_txds; /*Max no. of Tx buffer descriptor per TxDL */ | 447 | u32 max_txds; /*Max no. of Tx buffer descriptor per TxDL */ |
@@ -895,6 +906,27 @@ struct s2io_nic { | |||
895 | */ | 906 | */ |
896 | int rx_csum; | 907 | int rx_csum; |
897 | 908 | ||
909 | /* Below variables are used for fifo selection to transmit a packet */ | ||
910 | u16 fifo_selector[MAX_TX_FIFOS]; | ||
911 | |||
912 | /* Total fifos for tcp packets */ | ||
913 | u8 total_tcp_fifos; | ||
914 | |||
915 | /* | ||
916 | * Beginning index of udp for udp packets | ||
917 | * Value will be equal to | ||
918 | * (tx_fifo_num - FIFO_UDP_MAX_NUM - FIFO_OTHER_MAX_NUM) | ||
919 | */ | ||
920 | u8 udp_fifo_idx; | ||
921 | |||
922 | u8 total_udp_fifos; | ||
923 | |||
924 | /* | ||
925 | * Beginning index of fifo for all other packets | ||
926 | * Value will be equal to (tx_fifo_num - FIFO_OTHER_MAX_NUM) | ||
927 | */ | ||
928 | u8 other_fifo_idx; | ||
929 | |||
898 | /* after blink, the adapter must be restored with original | 930 | /* after blink, the adapter must be restored with original |
899 | * values. | 931 | * values. |
900 | */ | 932 | */ |