]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'Make 2-byte access to bpf_sk_lookup->remote_port endian-agnostic'
authorAlexei Starovoitov <ast@kernel.org>
Mon, 21 Mar 2022 01:59:00 +0000 (18:59 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 21 Mar 2022 01:59:00 +0000 (18:59 -0700)
commitd32306beea072bc2e1efbe01eb09ddd5c4f8372e
treea68caed04866465d23d56a0ce32220741231745a
parent1fe4edf08ee3ec8cea64adb62ccc25f6d45edd90
parent00a24ad91841b57d64f860b454f78b2d80a07258
Merge branch 'Make 2-byte access to bpf_sk_lookup->remote_port endian-agnostic'

Jakub Sitnicki says:

====================

This patch set is a result of a discussion we had around the RFC patchset from
Ilya [1]. The fix for the narrow loads from the RFC series is still relevant,
but this series does not depend on it. Nor is it required to unbreak sk_lookup
tests on BE, if this series gets applied.

To summarize the takeaways from [1]:

 1) we want to make 2-byte load from ctx->remote_port portable across LE and BE,
 2) we keep the 4-byte load from ctx->remote_port as it is today - result varies
    on endianess of the platform.

[1] https://lore.kernel.org/bpf/20220222182559.2865596-2-iii@linux.ibm.com/

v1 -> v2:
- Remove needless check that 4-byte load is from &ctx->remote_port offset
  (Martin)

[v1]: https://lore.kernel.org/bpf/20220317165826.1099418-1-jakub@cloudflare.com/
====================

Signed-off-by: Alexei Starovoitov <ast@kernel.org>