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

dgud/ssl/add ets tab to socket #9019

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dgud
Copy link
Contributor

@dgud dgud commented Nov 5, 2024

Will be needed in future optimizations.

Also a base to move stuff to an ets table instead of keeping them in process state.

@dgud dgud added team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI labels Nov 5, 2024
@dgud dgud requested review from IngelaAndin and u3s November 5, 2024 12:29
@dgud dgud self-assigned this Nov 5, 2024
Copy link
Contributor

github-actions bot commented Nov 5, 2024

CT Test Results

    2 files     66 suites   46m 49s ⏱️
  800 tests   755 ✅  45 💤 0 ❌
3 778 runs  2 983 ✅ 795 💤 0 ❌

Results for commit 6fe0de9.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@bjorng bjorng removed the testing currently being tested, tag is used by OTP internal CI label Nov 5, 2024
@dgud dgud force-pushed the dgud/ssl/add-ets-tab-to-socket branch from a1ac0c0 to 89299c5 Compare November 5, 2024 14:07
@dgud dgud added the testing currently being tested, tag is used by OTP internal CI label Nov 5, 2024
Copy link
Contributor

@IngelaAndin IngelaAndin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the individual changes looks good. As we discussed yesterday I feel that it would be beneficial to make two PRs. One for optimizing away reconstruction of TLS socket and making it part of the static state information. And one for using ets-table and moving packet option handling. So the first is something that is clearly beneficial and something we are sure that we want to do. And the other approach is more under evolution and we like to try and build on it, and it would be easier to revert if it is separate and we decide to go some other way.

lib/ssl/src/tls_gen_connection.erl Outdated Show resolved Hide resolved
lib/ssl/src/ssl_connection.hrl Show resolved Hide resolved
lib/ssl/src/dtls_socket.erl Outdated Show resolved Hide resolved
lib/ssl/src/ssl.erl Show resolved Hide resolved
lib/ssl/src/ssl_gen_statem.erl Show resolved Hide resolved
lib/ssl/src/ssl_gen_statem.erl Show resolved Hide resolved
@dgud dgud force-pushed the dgud/ssl/add-ets-tab-to-socket branch from 89299c5 to dc177b9 Compare November 11, 2024 16:30
@dgud
Copy link
Contributor Author

dgud commented Nov 11, 2024

Split into 2 commits and added some log improvements from another branch.

@dgud dgud removed the testing currently being tested, tag is used by OTP internal CI label Nov 11, 2024
@dgud dgud force-pushed the dgud/ssl/add-ets-tab-to-socket branch from dc177b9 to b643f35 Compare November 12, 2024 08:03
@dgud
Copy link
Contributor Author

dgud commented Nov 12, 2024

Added a test fixup commit as well, which have bothered me for a long time.

u3s
u3s previously approved these changes Nov 13, 2024
@IngelaAndin
Copy link
Contributor

We could clarify the commit message for the ets table commit, as the ets table is not common between tls client and tls server processes but rather by the user process and the tls process.

So we don't need to recreate it every time in the hot path,
also simplifies the code, reduces the number of arguments to many functions.
And move packet encoding to user process.

Socket options like packet-mode must be accessable from both user and
ssl-processes.

But we could move more stuff to that table to minimize the process state.
Reduce the output of (almost) every testcase output, by putting
some settings in fun().

This is just done to reduce the printing of
`=== Config value: ....`
That is printed in each testcase and could be up to 2000 lines.
@dgud dgud force-pushed the dgud/ssl/add-ets-tab-to-socket branch from 6fe0de9 to e2ae5b5 Compare November 14, 2024 14:39
@dgud dgud added the testing currently being tested, tag is used by OTP internal CI label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants