Skip to content
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

Cleanup IP parsing logic #23952

Open
fcrisciani opened this issue Nov 11, 2022 · 1 comment
Open

Cleanup IP parsing logic #23952

fcrisciani opened this issue Nov 11, 2022 · 1 comment

Comments

@fcrisciani
Copy link
Contributor

fcrisciani commented Nov 11, 2022

Title: Cleanup IP parsing logic

Description:
This bug is to track the cleanup of the IP parsing logic. Currently it is spread across s/c/n/utility.cc and s/c/n/address_impl.cc
Another thing to notice is that if we simply move the parsing logic from utility to address_impl we have the following circular dependency:

s/c/n/utility --> s/c/n/address_impl --> s/c/a/os_sys_calls_impl --
                                  ^                                |
                                   --------------------------------

It would also be nice to leverage a single parsing method like the getaddrinfo instead of the combination of that plus the inet_pton. The problem in doing that though is that apparently at the moment the windows version of the getaddrinfo has a different behavior than other platforms so we need to figure if this can be cleaned up for every platform or we need some special logic for windows.

@yanavlasov mentioned:
As an aside the makeFriendlyName needs to be optimized (it is worth a few percentage points of CPU for configs with large number of EDS endpoints) and not even call inet_ntop for endpoint addresses that are already IP address strings and can just simply be copied into the friendly name. This will take care of resolving the interface name as well for the most part.

@fcrisciani fcrisciani added the triage Issue requires triage label Nov 11, 2022
@zuercher zuercher added tech debt area/connection and removed triage Issue requires triage labels Nov 14, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Dec 15, 2022
@yanavlasov yanavlasov added help wanted Needs help! and removed stale stalebot believes this issue/PR has not been touched recently labels Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants