Skip to content

Enable wolf single thread opt #191

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

Merged
merged 5 commits into from
Feb 25, 2025
Merged

Conversation

kp-mariappan-ramasamy
Copy link
Contributor

Description

Follow up of #188

When we enable parallel read/write support earlier, we disable single thread optimisations completely
This is not desired. Platforms which still use single thread should still be able to use with --disable-single-thread

Motivation and Context

To make platforms/apps decide whether to use single/multi thread support

How Has This Been Tested?

Verified unit tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • All active GitHub checks are passing
  • The correct base branch is being used, if not main

This reverts commit ec9cdb7.

When enabling multi thread previously, we enabled it unconditionally.
This is not desired, since we lose single thread optimizations for apps
which is running in single threaded mode.

This commit reverts and proper enabling will be done in further commits.
This reverts commit 6fae65b.
To enable RW_THREADED only in multithreaded environments.
- disable wolfssl single threaded optimizations when compiling for multithreaded.
- enable WOLFSSL_RW_THREADED
@kp-mariappan-ramasamy kp-mariappan-ramasamy requested a review from a team as a code owner February 25, 2025 04:10
@xv-raihaan-m
Copy link
Contributor

We need to also set singlethread for android

- ./configure $CROSS_OPTS C_EXTRA_FLAGS="$C_EXTRA_FLAGS" --prefix=$(pwd)/../builds/wolfssl_build $HE_WOLFSSL_CONF_FLAGS --disable-crypttests

@kp-mariappan-ramasamy
Copy link
Contributor Author

We need to also set singlethread for android

Single threaded is the default now
https://github.com/expressvpn/lightway-core/pull/191/files#diff-3610b406413734539469fd615525cb3dc89743e91687f42522c7093f98214abdR19

And only for multi-thread projects, we override it with --disable-singlethreaded. So Android should have enabled this flag.

Please let me know if I miss something.

Copy link
Contributor

@xv-raihaan-m xv-raihaan-m left a comment

Choose a reason for hiding this comment

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

Oh, you're right i misread this

@xv-raihaan-m xv-raihaan-m merged commit 603f217 into main Feb 25, 2025
21 checks passed
@xv-raihaan-m xv-raihaan-m deleted the enable-wolf-single-thread-opt branch February 25, 2025 06:38
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.

2 participants