Commit 0212e5d
net/mlx5: Fix flowhash key set/get for custom RSS
mlx5 flow hash field retrieval and set only worked on the default
RSS context as of commit f01cc58 ("net/mlx5e: Support multiple RSS
contexts"), not custom RSS contexts.
For example, before this patch attempting to retrieve the flow hash fields
for RSS context 1 fails:
$ sudo ethtool -u eth1 rx-flow-hash tcp4 context 1
Cannot get RX network flow hashing options: Invalid argument
This patch fixes getting and setting the flow hash fields for contexts
other than the default context.
Getting the flow hash fields for RSS context 1:
$ sudo ethtool -u eth1 rx-flow-hash tcp4 context 1
For RSS context 1:
TCP over IPV4 flows use these fields for computing Hash flow key:
IP DA
Now, setting the flash hash fields to a custom value:
$ sudo ethtool -U eth1 rx-flow-hash tcp4 sdfn context 1
And retrieving them again:
$ sudo ethtool -u eth1 rx-flow-hash tcp4 context 1
For RSS context 1:
TCP over IPV4 flows use these fields for computing Hash flow key:
IP SA
IP DA
L4 bytes 0 & 1 [TCP/UDP src port]
L4 bytes 2 & 3 [TCP/UDP dst port]
Signed-off-by: Joe Damato <jdamato@fastly.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 801b27e commit 0212e5d
File tree
3 files changed
+48
-17
lines changed- drivers/net/ethernet/mellanox/mlx5/core
- en
3 files changed
+48
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
| 222 | + | |
222 | 223 | | |
223 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
224 | 232 | | |
225 | 233 | | |
226 | 234 | | |
227 | 235 | | |
228 | | - | |
229 | | - | |
| 236 | + | |
| 237 | + | |
230 | 238 | | |
231 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
232 | 247 | | |
233 | 248 | | |
234 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
900 | 900 | | |
901 | 901 | | |
902 | 902 | | |
| 903 | + | |
| 904 | + | |
903 | 905 | | |
904 | 906 | | |
905 | 907 | | |
906 | | - | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
907 | 913 | | |
908 | 914 | | |
909 | 915 | | |
910 | 916 | | |
911 | 917 | | |
912 | 918 | | |
913 | 919 | | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
918 | 924 | | |
919 | 925 | | |
920 | 926 | | |
| |||
931 | 937 | | |
932 | 938 | | |
933 | 939 | | |
934 | | - | |
| 940 | + | |
935 | 941 | | |
936 | 942 | | |
937 | 943 | | |
| |||
940 | 946 | | |
941 | 947 | | |
942 | 948 | | |
943 | | - | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
944 | 952 | | |
945 | 953 | | |
946 | | - | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
947 | 959 | | |
948 | 960 | | |
949 | 961 | | |
950 | | - | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
951 | 966 | | |
952 | 967 | | |
953 | 968 | | |
| |||
0 commit comments