Skip to content

Commit 0e37d1b

Browse files
tagrawal03meta-codesync[bot]
authored andcommitted
Revert D86576924 - TPR byte order fix
Summary: Based on discsussion with Andrii reverting these changes since __ORDER_BIG_ENDIAN__ is compile time flag and might not work during runtime. Reviewed By: avasylev Differential Revision: D86700358 fbshipit-source-id: e236ab12c2b2a1ca597cf582d6a77a90ad3fe10c
1 parent ec78821 commit 0e37d1b

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

katran/lib/bpf/pckt_parsing.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,7 @@ __attribute__((__always_inline__)) int parse_hdr_opt_raw(
201201
return -1;
202202
}
203203

204-
// TPR wire format is little-endian. Read the value and convert to host
205-
// byte order if needed for cross-architecture compatibility.
206204
state->server_id = *(__u32*)&tcp_opt[2];
207-
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
208-
// TODO (T244373617): Add stats for this case
209-
state->server_id = __builtin_bswap32(state->server_id);
210-
#endif
211205
return 1;
212206
}
213207

0 commit comments

Comments
 (0)