-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix map name #200
fix map name #200
Conversation
meh. name already in use. going to rename it to something else |
Hi, @tehnerd, other than lru_miss_stats_vip, there are a few more bpf maps with long names. I feel it is difficult to find a shorter name for them which are as meaningful as their current names so I am trying to check if there is a different option. |
longer map names breaks runtime reload of bpf balancer's code (e.g. change version from introspection disabled to introspeciton enabled and vice versa) https://github.com/facebookincubator/katran/blob/main/katran/lib/BpfLoader.cpp#L166C1-L166C32 because there is explicit check that map name should not be longer than 15 and right now runtime reload as-is does not work are you folks planning to continue support this or you are planning to remote this feature? |
andy eah. you are correct:
this is what needs to be changed if you would want to unbreak this feature |
so basically |
I am not planning to change any behavior. I am thinking to remove the existing check(error out when the name is longer than 15) from BpfLoader and replace it with a different check to make sure no duplicated names after truncation. With that, reload will still work. |
That would break the feature. So there is no point to remove this check since code won't work without it |
@frankfeir has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@frankfeir merged this pull request in be5be9e. |
to be able to restart katran's bpf code in runtime (e.g. to load bpf code w/ introspection enabled w/o restarting binary) all maps must have name w/ size less than 15 chars (because kernel truncates map name to 15 chars; https://github.com/facebookincubator/katran/blob/main/katran/lib/BpfLoader.cpp#L104 ) making lru_miss_stats smaller so it would not block this logic