-
Notifications
You must be signed in to change notification settings - Fork 763
Port redpanda to s390x (big-endian) #30982
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
Open
binhnguyenduc
wants to merge
21
commits into
redpanda-data:dev
Choose a base branch
from
dnse-tech:s390x-crc32c-big-endian
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+334
−84
Open
Changes from 10 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
a05012c
bazel/crc32c: derive BYTE_ORDER_BIG_ENDIAN from compiler macros
binhnguyenduc d720852
bazel/thirdparty: fix s390x boost.context asm and hwloc libxml2 leak
binhnguyenduc 241e0f1
reflection/adl: read container sizes little-endian on big-endian hosts
binhnguyenduc 87f1f9c
serde/parquet: encode FLOAT/DOUBLE as little-endian on big-endian hosts
binhnguyenduc 64009a4
bytes/ioarray: don't double-byteswap read_fixed32 slow path
binhnguyenduc e351d00
bazel/test: skip hermetic llvm-symbolizer on s390x
binhnguyenduc 748cc3d
storage/index_state: don't double-byteswap deprecated index size
binhnguyenduc 45ae886
storage/tests: read compaction index entry size little-endian
binhnguyenduc 798146a
kafka/tests: corrupt batch magic byte as int8 in fail_magic tests
binhnguyenduc 494c005
serde/protobuf: decode fixed32/fixed64/float/double little-endian
binhnguyenduc 23d290b
lsm/block/filter: write offsets_start footer pointer little-endian
binhnguyenduc 991e5d9
lsm/sst/builder: write block CRC little-endian
binhnguyenduc 7b83c16
lsm/block/filter: write filter offsets in native byte order
binhnguyenduc 1a6182b
hashing/murmur: read blocks little-endian for big-endian correctness
binhnguyenduc 8112bd6
iceberg: build decimal bucket-hash bytes big-endian on any host
binhnguyenduc 3b9f451
cloud_topics/l1: decode footer size fields little-endian
binhnguyenduc 12d0623
test_utils/gtest: run gtest on a larger seastar thread stack
binhnguyenduc ca6eaf0
bazel/seastar: enlarge reactor and thread-test stacks for s390x
binhnguyenduc 5052ac3
bazel/test: support target_compatible_with in redpanda_cc_bench
binhnguyenduc e563d30
wasm: port host ABI FFI to little-endian for big-endian hosts
binhnguyenduc c5c30d8
tests: mark cluster_recovery incompatible on s390x
binhnguyenduc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| Set BYTE_ORDER_BIG_ENDIAN from the compiler's byte-order macros instead of | ||
| hardcoding it to 0. The crc32c portable implementation reads input words via | ||
| ReadUint32LE, whose big-endian branch is only compiled when | ||
| BYTE_ORDER_BIG_ENDIAN is non-zero. Hardcoding 0 makes the LE memcpy path run on | ||
| big-endian hosts (e.g. s390x), producing incorrect CRC32C values and breaking | ||
| Kafka record-batch validation. Deriving the value from __BYTE_ORDER__ keeps the | ||
| config correct on every target arch. | ||
|
|
||
| --- a/BUILD.bazel | ||
| +++ b/BUILD.bazel | ||
| @@ -76,7 +76,7 @@ | ||
| outs = ["crc32c/crc32c_config.h"], | ||
| cmd = """ | ||
| sed -e 's/#cmakedefine01/#define/' \ | ||
| - -e 's/ BYTE_ORDER_BIG_ENDIAN/ BYTE_ORDER_BIG_ENDIAN 0/' \ | ||
| + -e 's/ BYTE_ORDER_BIG_ENDIAN/ BYTE_ORDER_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)/' \ | ||
| -e 's/ HAVE_BUILTIN_PREFETCH/ HAVE_BUILTIN_PREFETCH 0/' \ | ||
| -e 's/ HAVE_MM_PREFETCH/ HAVE_MM_PREFETCH 0/' \ | ||
| -e 's/ HAVE_SSE42/ HAVE_SSE42 1/' \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --- a/boost.BUILD | ||
| +++ b/boost.BUILD | ||
| @@ -24,6 +24,14 @@ | ||
| ) | ||
|
|
||
| config_setting( | ||
| + name = "linux_s390x", | ||
| + constraint_values = [ | ||
| + "@platforms//os:linux", | ||
| + "@platforms//cpu:s390x", | ||
| + ], | ||
| +) | ||
| + | ||
| +config_setting( | ||
| name = "linux_aarch64", | ||
| constraint_values = [ | ||
| "@platforms//os:linux", | ||
| @@ -106,6 +114,11 @@ | ||
| "libs/context/src/asm/make_ppc64_sysv_elf_gas.S", | ||
| "libs/context/src/asm/ontop_ppc64_sysv_elf_gas.S", | ||
| ], | ||
| + ":linux_s390x": [ | ||
| + "libs/context/src/asm/jump_s390x_sysv_elf_gas.S", | ||
| + "libs/context/src/asm/make_s390x_sysv_elf_gas.S", | ||
| + "libs/context/src/asm/ontop_s390x_sysv_elf_gas.S", | ||
| + ], | ||
| ":linux_x86_64": [ | ||
| "libs/context/src/asm/jump_x86_64_sysv_elf_gas.S", | ||
| "libs/context/src/asm/make_x86_64_sysv_elf_gas.S", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps better as: