proxy-wasm-cpp-host icon indicating copy to clipboard operation
proxy-wasm-cpp-host copied to clipboard

Do not reverse bytes for nullvm

Open knm3000 opened this issue 3 years ago • 6 comments

This fixes the following istio proxy test on s390x: https://github.com/istio/proxy/blob/master/test/envoye2e/tcp_metadata_exchange/tcp_metadata_exchange_test.go Resolves https://github.com/proxy-wasm/proxy-wasm-cpp-host/issues/294

knm3000 avatar Apr 05 '22 16:04 knm3000

@PiotrSikora @mathetake can you please review? This is a follow-up change for https://github.com/proxy-wasm/proxy-wasm-cpp-host/pull/198. Thanks.

knm3000 avatar Apr 20 '22 15:04 knm3000

@PiotrSikora @mathetake would you please review this? Initial big-endian changes have already been merged in https://github.com/proxy-wasm/proxy-wasm-cpp-host/pull/198, but now I'd like to fix null-vm use case. Thanks.

knm3000 avatar Jul 18 '22 08:07 knm3000

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

mathetake avatar Jul 25 '22 02:07 mathetake

@mathetake thanks for the review. I've opened an issue and added the error details https://github.com/proxy-wasm/proxy-wasm-cpp-host/issues/294. Can you please take a look?

knm3000 avatar Jul 25 '22 14:07 knm3000

@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.

PiotrSikora avatar Jul 29 '22 21:07 PiotrSikora

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

knm3000 avatar Aug 17 '22 10:08 knm3000

@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.

knm3000 avatar Sep 12 '22 11:09 knm3000

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

knm3000 avatar Sep 14 '22 17:09 knm3000

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

mpwarres avatar Sep 16 '22 20:09 mpwarres

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

knm3000 avatar Sep 29 '22 16:09 knm3000

Thanks!

PiotrSikora avatar Oct 02 '22 02:10 PiotrSikora