Andrei Borzenkov wrote:
11.07.2019 15:53, Per Jessen пишет:
Andrei, you wouldn't happen to know how to look at the hash value used? Afaict, it doesn't change - if I do e.g. 10 or 20 new sessions one after one, they all pick the same route.
Displaying hash itself which is return value of kernel function is relatively easy - function return is well defined trace point. Displaying its arguments or internal variables seems to be more complicated and requires real programming in whatever trace language is used.
But it does look like computed hash is the same every time.
tw:/usr/share/bcc/tools # cat /proc/sys/net/ipv4/fib_multipath_hash_policy 0 tw:/usr/share/bcc/tools # ./trace 'r::fib_multipath_hash "ret = %d", retval' PID TID COMM FUNC - 5971 5971 telnet fib_multipath_hash ret = 1229346044 5971 5971 telnet fib_multipath_hash ret = 107210842 5971 5971 telnet fib_multipath_hash ret = 107210842 5972 5972 telnet fib_multipath_hash ret = 1229346044 5972 5972 telnet fib_multipath_hash ret = 107210842 5972 5972 telnet fib_multipath_hash ret = 107210842 ^C tw:/usr/share/bcc/tools # tw:/usr/share/bcc/tools # echo 1 > /proc/sys/net/ipv4/fib_multipath_hash_policy tw:/usr/share/bcc/tools # cat /proc/sys/net/ipv4/fib_multipath_hash_policy 1 tw:/usr/share/bcc/tools # ./trace 'r::fib_multipath_hash "ret = %d", retval' PID TID COMM FUNC - 5998 5998 telnet fib_multipath_hash ret = 1123988857 5998 5998 telnet fib_multipath_hash ret = 840030644 5998 5998 telnet fib_multipath_hash ret = 178211998 1014 1014 ntpd fib_multipath_hash ret = 159405026 5999 5999 telnet fib_multipath_hash ret = 1123988857 5999 5999 telnet fib_multipath_hash ret = 840030644 5999 5999 telnet fib_multipath_hash ret = 1223581618 ^C tw:/usr/share/bcc/tools #
Here "telnet" is called twice in different terminals with the same destination address. I am not sure where two other calls to hash come from, may be some internal library resolver or similar.
Anyway, resulting hashes seem to be always the same. I am afraid I'm not as deep into kernel routing code to make any useful comment here.
Thanks anyway - I really appreciate it. I'll have to learn how to use that trace functionality. I hate to leave this topic for now, but tomorrow I'm off on vacation, back again beginning of August. This multipath issue is a real show-stopper, I hope there will be a setting I can tweak. (or that I'm just doing something wrong). -- Per Jessen, Zürich (18.1°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org