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

network_monitor: Make test addrs static constants. #247

Merged
merged 2 commits into from
Jul 8, 2022

Conversation

ossama-othman
Copy link
Member

Make the mptcpd network monitor IPv4 and IPv6 "test net" addresses used for default route checks static constants to make sure they are initialized at compile-time instead of run-time.

The MPTCPD_CONSTANT_HTONL() macro was used to allow the test IPv4 address to be initialized at compile-time. This also change also removes the re-initialization of the IPv4 test net address each time mptcpd network monitor operations are registered.

Pre-change object file size (-O2 optimization):

text    data     bss     dec     hex filename
10045     232       4   10281    2829 libmptcpd_la-network_monitor.o

Post-change object file size (-O2 optimization):

text    data     bss     dec     hex filename
10060     216       0   10276    2824 libmptcpd_la-network_monitor.o

Ossama Othman added 2 commits July 6, 2022 22:38
Make the mptcpd network monitor IPv4 and IPv6 "test net" addresses
used for default route checks static constants to make sure they are
initialized at compile-time instead of run-time.

The MPTCPD_CONSTANT_HTONL() macro was used to allow the test IPv4
address to be initialized at compile-time.  This also change also
removes the re-initialization of the IPv4 test net address each time
mptcpd network monitor operations are registered.

Pre-change object file size (-O2 optimization):
   text    data     bss     dec     hex filename
  10045     232       4   10281    2829 libmptcpd_la-network_monitor.o

Post-change object file size (-O2 optimization):
   text    data     bss     dec     hex filename
  10060     216       0   10276    2824 libmptcpd_la-network_monitor.o
@ossama-othman ossama-othman self-assigned this Jul 7, 2022
@coveralls
Copy link

coveralls commented Jul 7, 2022

Pull Request Test Coverage Report for Build 2627479281

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 62.323%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/network_monitor.c 0 1 0.0%
Totals Coverage Status
Change from base Build 2626644661: -0.02%
Covered Lines: 1186
Relevant Lines: 1903

💛 - Coveralls

@ossama-othman ossama-othman merged commit f0a0ce5 into multipath-tcp:master Jul 8, 2022
@ossama-othman ossama-othman deleted the nm-test-addrs branch July 8, 2022 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants