diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2010-08-23 23:46:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-24 17:57:09 -0400 |
commit | 0533943c5c45cce2e26432bf0a6b8e114757c897 (patch) | |
tree | 8405db10a70b0a2a9f4c04528e4bcffdbb7189c6 /drivers/net/mlx4/en_main.c | |
parent | d7e1a487d31933deba742c1bd3ffe0f73220b729 (diff) |
mlx4_en: UDP RSS support
Adding capability for RSS for UDP traffic, hashing is done based on
IP addresses and UDP port number.
The support depends on HW/FW capabilities.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mlx4/en_main.c')
-rw-r--r-- | drivers/net/mlx4/en_main.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c index cacac4e966ee..143906417048 100644 --- a/drivers/net/mlx4/en_main.c +++ b/drivers/net/mlx4/en_main.c | |||
@@ -63,11 +63,12 @@ static const char mlx4_en_version[] = | |||
63 | */ | 63 | */ |
64 | 64 | ||
65 | 65 | ||
66 | /* Use a XOR rathern than Toeplitz hash function for RSS */ | 66 | /* Enable RSS TCP traffic */ |
67 | MLX4_EN_PARM_INT(rss_xor, 0, "Use XOR hash function for RSS"); | 67 | MLX4_EN_PARM_INT(tcp_rss, 1, |
68 | 68 | "Enable RSS for incomming TCP traffic or disabled (0)"); | |
69 | /* RSS hash type mask - default to <saddr, daddr, sport, dport> */ | 69 | /* Enable RSS UDP traffic */ |
70 | MLX4_EN_PARM_INT(rss_mask, 0xf, "RSS hash type bitmask"); | 70 | MLX4_EN_PARM_INT(udp_rss, 1, |
71 | "Enable RSS for incomming UDP traffic or disabled (0)"); | ||
71 | 72 | ||
72 | /* Priority pausing */ | 73 | /* Priority pausing */ |
73 | MLX4_EN_PARM_INT(pfctx, 0, "Priority based Flow Control policy on TX[7:0]." | 74 | MLX4_EN_PARM_INT(pfctx, 0, "Priority based Flow Control policy on TX[7:0]." |
@@ -103,8 +104,12 @@ static int mlx4_en_get_profile(struct mlx4_en_dev *mdev) | |||
103 | struct mlx4_en_profile *params = &mdev->profile; | 104 | struct mlx4_en_profile *params = &mdev->profile; |
104 | int i; | 105 | int i; |
105 | 106 | ||
106 | params->rss_xor = (rss_xor != 0); | 107 | params->tcp_rss = tcp_rss; |
107 | params->rss_mask = rss_mask & 0x1f; | 108 | params->udp_rss = udp_rss; |
109 | if (params->udp_rss && !mdev->dev->caps.udp_rss) { | ||
110 | mlx4_warn(mdev, "UDP RSS is not supported on this device.\n"); | ||
111 | params->udp_rss = 0; | ||
112 | } | ||
108 | for (i = 1; i <= MLX4_MAX_PORTS; i++) { | 113 | for (i = 1; i <= MLX4_MAX_PORTS; i++) { |
109 | params->prof[i].rx_pause = 1; | 114 | params->prof[i].rx_pause = 1; |
110 | params->prof[i].rx_ppp = pfcrx; | 115 | params->prof[i].rx_ppp = pfcrx; |