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

Do not reverse bytes for NullVM. #282

Merged
merged 6 commits into from
Oct 2, 2022

Conversation

knm3000
Copy link
Contributor

@knm3000 knm3000 commented Apr 5, 2022

@knm3000
Copy link
Contributor Author

knm3000 commented Apr 20, 2022

@PiotrSikora @mathetake can you please review? This is a follow-up change for #198. Thanks.

knm3000 added a commit to knm3000/envoy-1 that referenced this pull request Jun 21, 2022
Fixes WASM on s390x https://issues.redhat.com/browse/MAISTRA-2648
The permanent fixes are:
proxy-wasm/proxy-wasm-cpp-host#198
proxy-wasm/proxy-wasm-cpp-host#282

Signed-off-by: Konstantin Maksimov konstantin.maksimov@ibm.com
knm3000 added a commit to knm3000/proxy-wasm-cpp-host-1 that referenced this pull request Jun 23, 2022
knm3000 added a commit to knm3000/proxy-wasm-cpp-host-1 that referenced this pull request Jun 24, 2022
knm3000 added a commit to knm3000/proxy-wasm-cpp-host-1 that referenced this pull request Jun 24, 2022
@knm3000
Copy link
Contributor Author

knm3000 commented Jul 18, 2022

@PiotrSikora @mathetake would you please review this? Initial big-endian changes have already been merged in #198, but now I'd like to fix null-vm use case. Thanks.

src/exports.cc Outdated Show resolved Hide resolved
@mathetake
Copy link
Contributor

could you elaborate on what's the error in the test, and how does this solve it?

@knm3000
Copy link
Contributor Author

knm3000 commented Jul 25, 2022

@mathetake thanks for the review. I've opened an issue and added the error details #294. Can you please take a look?

@PiotrSikora
Copy link
Member

@PiotrSikora @mathetake would you please review this? Initial big-endian changes have already been merged in #198, but now I'd like to fix null-vm use case. Thanks.

Could you add a test that fails without this change? We cannot rely on tests 3 repositories downstream.

include/proxy-wasm/exports.h Outdated Show resolved Hide resolved
include/proxy-wasm/exports.h Outdated Show resolved Hide resolved
oschaaf pushed a commit to oschaaf/proxy-wasm-cpp-host that referenced this pull request Aug 4, 2022
Fixes WASM on s390x https://issues.redhat.com/browse/MAISTRA-2648
Corresponding proxy-wasm/proxy-wasm-cpp-host PRs:
proxy-wasm#198
proxy-wasm#282
Fixes proxy-wasm#294

Signed-off-by: Konstantin Maksimov <konstantin.maksimov@ibm.com>
@knm3000
Copy link
Contributor Author

knm3000 commented Aug 17, 2022

@PiotrSikora thanks for the review, I've made the proposed changes, can you please take a look?

Copy link
Member

@PiotrSikora PiotrSikora left a comment

Choose a reason for hiding this comment

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

cc @mpwarres PTAL

include/proxy-wasm/pairs_util.h Outdated Show resolved Hide resolved
include/proxy-wasm/word.h Outdated Show resolved Hide resolved
include/proxy-wasm/word.h Outdated Show resolved Hide resolved
additional changes:
- moved the call to isWasmByteOrder() into htowasm/wasmtoh macros
- added surrounding brackets to htowasm/wasmtoh
- removed debug leftover

Fixes proxy-wasm#294

Signed-off-by: Konstantin Maksimov <konstantin.maksimov@ibm.com>
@knm3000
Copy link
Contributor Author

knm3000 commented Sep 12, 2022

@PiotrSikora I've made the requested changes:

  • Moved the calls to isWasmByteOrder() into htowasm/wasmtoh macros, now it should be removed by preprocessor for non-s390x.
  • Added surrounding brackets to htowasm/wasmtoh
  • Removed debug leftover
    can you please review? Thanks.

include/proxy-wasm/null_vm.h Outdated Show resolved Hide resolved
include/proxy-wasm/word.h Outdated Show resolved Hide resolved
include/proxy-wasm/wasm_vm.h Outdated Show resolved Hide resolved
more changes:
- renamed is_wasm_byte_order to vm_uses_wasm_byte_order
- renamed isWasmByteOrder() to usesWasmByteOrder()

Fixes proxy-wasm#294

Signed-off-by: Konstantin Maksimov <konstantin.maksimov@ibm.com>
@knm3000
Copy link
Contributor Author

knm3000 commented Sep 14, 2022

@mpwarres thanks for the review, please see my comments.

@mpwarres
Copy link
Contributor

@PiotrSikora and/or @mathetake , I've finished my pass--this now awaits your approval.

knm3000 added a commit to knm3000/envoy-1 that referenced this pull request Sep 22, 2022
Fixes https://issues.redhat.com/browse/OSSM-1815 error in maistra-2.3
proxy-wasm fix: proxy-wasm/proxy-wasm-cpp-host#282
maistra-2.3 issue: https://issues.redhat.com/browse/OSSM-1956

Signed-off-by: Konstantin Maksimov <konstantin.maksimov@ibm.com>
src/v8/v8.cc Outdated Show resolved Hide resolved
src/pairs_util.cc Show resolved Hide resolved
src/pairs_util.cc Outdated Show resolved Hide resolved
src/exports.cc Outdated Show resolved Hide resolved
- use buf and buf_len variables for readability
- added back word.h include
- hardcoded usesWasmByteOrder() to true

Fixes proxy-wasm#294

Signed-off-by: Konstantin Maksimov <konstantin.maksimov@ibm.com>
@knm3000
Copy link
Contributor Author

knm3000 commented Sep 29, 2022

@PiotrSikora I've made the changes, can you please take a look?

src/pairs_util.cc Outdated Show resolved Hide resolved
test/null_vm_test.cc Outdated Show resolved Hide resolved
- moved pairs test into a new file test/pairs_util_test.cc
- run pairs test on all platforms
- made contextOrEffectiveContext() null check a bit more readable

Fixes proxy-wasm#294

Signed-off-by: Konstantin Maksimov <konstantin.maksimov@ibm.com>
maistra-bot pushed a commit to maistra/envoy that referenced this pull request Sep 30, 2022
Fixes https://issues.redhat.com/browse/OSSM-1815 error in maistra-2.3
proxy-wasm fix: proxy-wasm/proxy-wasm-cpp-host#282
maistra-2.3 issue: https://issues.redhat.com/browse/OSSM-1956

Signed-off-by: Konstantin Maksimov <konstantin.maksimov@ibm.com>

Signed-off-by: Konstantin Maksimov <konstantin.maksimov@ibm.com>
Copy link
Member

@PiotrSikora PiotrSikora left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Please remove that unnecessary #include and this should be good to go.

test/null_vm_test.cc Outdated Show resolved Hide resolved
more changes:
- removed unnecessary #include from test/null_vm_test.cc

Fixes proxy-wasm#294

Signed-off-by: Konstantin Maksimov <konstantin.maksimov@ibm.com>
@PiotrSikora PiotrSikora changed the title Do not reverse bytes for nullvm Do not reverse bytes for NullVM. Oct 2, 2022
@PiotrSikora PiotrSikora merged commit 537b944 into proxy-wasm:master Oct 2, 2022
@PiotrSikora
Copy link
Member

Thanks!

@knm3000 knm3000 deleted the nullvm-s390x branch October 4, 2022 09:12
knm3000 added a commit to knm3000/envoy-1 that referenced this pull request Feb 21, 2023
Upstream PR proxy-wasm/proxy-wasm-cpp-host#282 has been merged and maistra-2.4 branch includes these changes

Signed-off-by: Konstantin Maksimov <konstantin.maksimov@ibm.com>
twghu pushed a commit to twghu/maistra-envoy that referenced this pull request Feb 28, 2023
Upstream PR proxy-wasm/proxy-wasm-cpp-host#282 has been merged and maistra-2.4 branch includes these changes

Signed-off-by: Konstantin Maksimov <konstantin.maksimov@ibm.com>
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.

tcp_metadata_exchange proxy test fails on big-endian platforms
4 participants