Skip to content
  1. Feb 02, 2023
    • Maciej Fijalkowski's avatar
      ice: Add support for XDP multi-buffer on Rx side · 2fba7dc5
      Maciej Fijalkowski authored
      
      
      Ice driver needs to be a bit reworked on Rx data path in order to
      support multi-buffer XDP. For skb path, it currently works in a way that
      Rx ring carries pointer to skb so if driver didn't manage to combine
      fragmented frame at current NAPI instance, it can restore the state on
      next instance and keep looking for last fragment (so descriptor with EOP
      bit set). What needs to be achieved is that xdp_buff needs to be
      combined in such way (linear + frags part) in the first place. Then skb
      will be ready to go in case of XDP_PASS or BPF program being not present
      on interface. If BPF program is there, it would work on multi-buffer
      XDP. At this point xdp_buff resides directly on Rx ring, so given the
      fact that skb will be built straight from xdp_buff, there will be no
      further need to carry skb on Rx ring.
      
      Besides removing skb pointer from Rx ring, lots of members have been
      moved around within ice_rx_ring. First and foremost reason was to place
      rx_buf with xdp_buff on the same cacheline. This means that once we
      touch rx_buf (which is a preceding step before touching xdp_buff),
      xdp_buff will already be hot in cache. Second thing was that xdp_rxq is
      used rather rarely and it occupies a separate cacheline, so maybe it is
      better to have it at the end of ice_rx_ring.
      
      Other change that affects ice_rx_ring is the introduction of
      ice_rx_ring::first_desc. Its purpose is twofold - first is to propagate
      rx_buf->act to all the parts of current xdp_buff after running XDP
      program, so that ice_put_rx_buf() that got moved out of the main Rx
      processing loop will be able to tak an appriopriate action on each
      buffer. Second is for ice_construct_skb().
      
      ice_construct_skb() has a copybreak mechanism which had an explicit
      impact on xdp_buff->skb conversion in the new approach when legacy Rx
      flag is toggled. It works in a way that linear part is 256 bytes long,
      if frame is bigger than that, remaining bytes are going as a frag to
      skb_shared_info.
      
      This means while memcpying frags from xdp_buff to newly allocated skb,
      care needs to be taken when picking the destination frag array entry.
      Upon the time ice_construct_skb() is called, when dealing with
      fragmented frame, current rx_buf points to the *last* fragment, but
      copybreak needs to be done against the first one.  That's where
      ice_rx_ring::first_desc helps.
      
      When frame building spans across NAPI polls (DD bit is not set on
      current descriptor and xdp->data is not NULL) with current Rx buffer
      handling state there might be some problems.
      Since calls to ice_put_rx_buf() were pulled out of the main Rx
      processing loop and were scoped from cached_ntc to current ntc, remember
      that now mentioned function relies on rx_buf->act, which is set within
      ice_run_xdp(). ice_run_xdp() is called when EOP bit was found, so
      currently we could put Rx buffer with rx_buf->act being *uninitialized*.
      To address this, change scoping to rely on first_desc on both boundaries
      instead.
      
      This also implies that cleaned_count which is used as an input to
      ice_alloc_rx_buffers() and tells how many new buffers should be refilled
      has to be adjusted. If it stayed as is, what could happen is a case
      where ntc would go over ntu.
      
      Therefore, remove cleaned_count altogether and use against allocing
      routine newly introduced ICE_RX_DESC_UNUSED() macro which is an
      equivalent of ICE_DESC_UNUSED() dedicated for Rx side and based on
      struct ice_rx_ring::first_desc instead of next_to_clean.
      
      Signed-off-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Reviewed-by: default avatarAlexander Lobakin <alexandr.lobakin@intel.com>
      Link: https://lore.kernel.org/bpf/20230131204506.219292-11-maciej.fijalkowski@intel.com
      2fba7dc5
    • Maciej Fijalkowski's avatar
      ice: Use xdp->frame_sz instead of recalculating truesize · 8a11b334
      Maciej Fijalkowski authored
      
      
      SKB path calculates truesize on three different functions, which could
      be avoided as xdp_buff carries the already calculated truesize under
      xdp_buff::frame_sz. If ice_add_rx_frag() is adjusted to take the
      xdp_buff as an input just like functions responsible for creating
      sk_buff initially, codebase could be simplified by removing these
      redundant recalculations and rely on xdp_buff::frame_sz instead.
      
      Signed-off-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Reviewed-by: default avatarAlexander Lobakin <alexandr.lobakin@intel.com>
      Link: https://lore.kernel.org/bpf/20230131204506.219292-10-maciej.fijalkowski@intel.com
      8a11b334
    • Maciej Fijalkowski's avatar
      ice: Do not call ice_finalize_xdp_rx() unnecessarily · 9070fe3d
      Maciej Fijalkowski authored
      
      
      Currently ice_finalize_xdp_rx() is called only when xdp_prog is present
      on VSI, which is a good thing. However, this optimization can be
      enhanced and check only if any of the XDP_TX/XDP_REDIRECT took place in
      current Rx processing. Non-zero value of @xdp_xmit indicates that
      xdp_prog is present on VSI. This way XDP_DROP-based workloads will not
      suffer from unnecessary calls to external function.
      
      Signed-off-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Reviewed-by: default avatarAlexander Lobakin <alexandr.lobakin@intel.com>
      Link: https://lore.kernel.org/bpf/20230131204506.219292-9-maciej.fijalkowski@intel.com
      9070fe3d
    • Maciej Fijalkowski's avatar
      ice: Use ice_max_xdp_frame_size() in ice_xdp_setup_prog() · 60bc72b3
      Maciej Fijalkowski authored
      
      
      This should have been used in there from day 1, let us address that
      before introducing XDP multi-buffer support for Rx side.
      
      Signed-off-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Reviewed-by: default avatarAlexander Lobakin <alexandr.lobakin@intel.com>
      Link: https://lore.kernel.org/bpf/20230131204506.219292-8-maciej.fijalkowski@intel.com
      60bc72b3
    • Maciej Fijalkowski's avatar
      ice: Centrallize Rx buffer recycling · 1dc1a7e7
      Maciej Fijalkowski authored
      
      
      Currently calls to ice_put_rx_buf() are sprinkled through
      ice_clean_rx_irq() - first place is for explicit flow director's
      descriptor handling, second is after running XDP prog and the last one
      is after taking care of skb.
      
      1st callsite was actually only for ntc bump purpose, as Rx buffer to be
      recycled is not even passed to a function.
      
      It is possible to walk through Rx buffers processed in particular NAPI
      cycle by caching ntc from beginning of the ice_clean_rx_irq().
      
      To do so, let us store XDP verdict inside ice_rx_buf, so action we need
      to take on will be known. For XDP prog absence, just store ICE_XDP_PASS
      as a verdict.
      
      Signed-off-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Reviewed-by: default avatarAlexander Lobakin <alexandr.lobakin@intel.com>
      Link: https://lore.kernel.org/bpf/20230131204506.219292-7-maciej.fijalkowski@intel.com
      1dc1a7e7
    • Maciej Fijalkowski's avatar
      ice: Inline eop check · e44f4790
      Maciej Fijalkowski authored
      
      
      This might be in future used by ZC driver and might potentially yield a
      minor performance boost. While at it, constify arguments that
      ice_is_non_eop() takes, since they are pointers and this will help compiler
      while generating asm.
      
      Signed-off-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Reviewed-by: default avatarAlexander Lobakin <alexandr.lobakin@intel.com>
      Link: https://lore.kernel.org/bpf/20230131204506.219292-6-maciej.fijalkowski@intel.com
      e44f4790
    • Maciej Fijalkowski's avatar
      ice: Pull out next_to_clean bump out of ice_put_rx_buf() · d7956d81
      Maciej Fijalkowski authored
      
      
      Plan is to move ice_put_rx_buf() to the end of ice_clean_rx_irq() so
      in order to keep the ability of walking through HW Rx descriptors, pull
      out next_to_clean handling out of ice_put_rx_buf().
      
      Signed-off-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Reviewed-by: default avatarAlexander Lobakin <alexandr.lobakin@intel.com>
      Link: https://lore.kernel.org/bpf/20230131204506.219292-5-maciej.fijalkowski@intel.com
      d7956d81
    • Maciej Fijalkowski's avatar
      ice: Store page count inside ice_rx_buf · ac075339
      Maciej Fijalkowski authored
      
      
      This will allow us to avoid carrying additional auxiliary array of page
      counts when dealing with XDP multi buffer support. Previously combining
      fragmented frame to skb was not affected in the same way as XDP would be
      as whole frame is needed to be in place before executing XDP prog.
      Therefore, when going through HW Rx descriptors one-by-one, calls to
      ice_put_rx_buf() need to be taken *after* running XDP prog on a
      potentially multi buffered frame, so some additional storage of
      page count is needed.
      
      By adding page count to rx buf, it will make it easier to walk through
      processed entries at the end of rx cleaning routine and decide whether
      or not buffers should be recycled.
      
      While at it, bump ice_rx_buf::pagecnt_bias from u16 up to u32. It was
      proven many times that calculations on variables smaller than standard
      register size are harmful. This was also the case during experiments
      with embedding page count to ice_rx_buf - when this was added as u16 it
      had a performance impact.
      
      Signed-off-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Reviewed-by: default avatarAlexander Lobakin <alexandr.lobakin@intel.com>
      Link: https://lore.kernel.org/bpf/20230131204506.219292-4-maciej.fijalkowski@intel.com
      ac075339
    • Maciej Fijalkowski's avatar
      ice: Add xdp_buff to ice_rx_ring struct · cb0473e0
      Maciej Fijalkowski authored
      
      
      In preparation for XDP multi-buffer support, let's store xdp_buff on
      Rx ring struct. This will allow us to combine fragmented frames across
      separate NAPI cycles in the same way as currently skb fragments are
      handled. This means that skb pointer on Rx ring will become redundant
      and will be removed. For now it is kept and layout of Rx ring struct was
      not inspected, some member movement will be needed later on so that will
      be the time to take care of it.
      
      Signed-off-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Reviewed-by: default avatarAlexander Lobakin <alexandr.lobakin@intel.com>
      Link: https://lore.kernel.org/bpf/20230131204506.219292-3-maciej.fijalkowski@intel.com
      cb0473e0
    • Maciej Fijalkowski's avatar
      ice: Prepare legacy-rx for upcoming XDP multi-buffer support · c61bcebd
      Maciej Fijalkowski authored
      
      
      Rx path is going to be modified in a way that fragmented frame will be
      gathered within xdp_buff in the first place. This approach implies that
      underlying buffer has to provide tailroom for skb_shared_info. This is
      currently the case when ring uses build_skb but not when legacy-rx knob
      is turned on. This case configures 2k Rx buffers and has no way to
      provide either headroom or tailroom - FWIW it currently has
      XDP_PACKET_HEADROOM which is broken and in here it is removed. 2k Rx
      buffers were used so driver in this setting was able to support 9k MTU
      as it can chain up to 5 Rx buffers. With offset configuring HW writing
      2k of a data was passing the half of the page which broke the assumption
      of our internal page recycling tricks.
      
      Now if above got fixed and legacy-rx path would be left as is, when
      referring to skb_shared_info via xdp_get_shared_info_from_buff(),
      packet's content would be corrupted again. Hence size of Rx buffer needs
      to be lowered and therefore supported MTU. This operation will allow us
      to keep the unified data path and with 8k MTU users (if any of
      legacy-rx) would still be good to go. However, tendency is to drop the
      support for this code path at some point.
      
      Add ICE_RXBUF_1664 as vsi::rx_buf_len and ICE_MAX_FRAME_LEGACY_RX (8320)
      as vsi::max_frame for legacy-rx. For bigger page sizes configure 3k Rx
      buffers, not 2k.
      
      Since headroom support is removed, disable data_meta support on legacy-rx.
      When preparing XDP buff, rely on ice_rx_ring::rx_offset setting when
      deciding whether to support data_meta or not.
      
      Signed-off-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Reviewed-by: default avatarAlexander Lobakin <alexandr.lobakin@intel.com>
      Link: https://lore.kernel.org/bpf/20230131204506.219292-2-maciej.fijalkowski@intel.com
      c61bcebd
  2. Jan 30, 2023
    • Alexei Starovoitov's avatar
      Merge branch 'Support bpf trampoline for s390x' · c1a3daf7
      Alexei Starovoitov authored
      
      
      Ilya Leoshkevich says:
      
      ====================
      
      v2: https://lore.kernel.org/bpf/20230128000650.1516334-1-iii@linux.ibm.com/#t
      v2 -> v3:
      - Make __arch_prepare_bpf_trampoline static.
      (Reported-by: default avatarkernel test robot <lkp@intel.com&gt;)>
      - Support both old- and new- style map definitions in sk_assign. (Alexei)
      - Trim DENYLIST.s390x. (Alexei)
      - Adjust s390x vmlinux path in vmtest.sh.
      - Drop merged fixes.
      
      v1: https://lore.kernel.org/bpf/20230125213817.1424447-1-iii@linux.ibm.com/#t
      v1 -> v2:
      - Fix core_read_macros, sk_assign, test_profiler, test_bpffs (24/31;
        I'm not quite happy with the fix, but don't have better ideas),
        and xdp_synproxy. (Andrii)
      - Prettify liburandom_read and verify_pkcs7_sig fixes. (Andrii)
      - Fix bpf_usdt_arg using barrier_var(); prettify barrier_var(). (Andrii)
      - Change BPF_MAX_TRAMP_LINKS to enum and query it using BTF. (Andrii)
      - Improve bpf_jit_supports_kfunc_call() description. (Alexei)
      - Always check sign_extend() return value.
      - Cc: Alexander Gordeev.
      
      Hi,
      
      This series implements poke, trampoline, kfunc, and mixing subprogs
      and tailcalls on s390x.
      
      The following failures still remain:
      
      #82      get_stack_raw_tp:FAIL
      get_stack_print_output:FAIL:user_stack corrupted user stack
      Known issue:
      We cannot reliably unwind userspace on s390x without DWARF.
      
      #101     ksyms_module:FAIL
      address of kernel function bpf_testmod_test_mod_kfunc is out of range
      Known issue:
      Kernel and modules are too far away from each other on s390x.
      
      #190     stacktrace_build_id:FAIL
      Known issue:
      We cannot reliably unwind userspace on s390x without DWARF.
      
      #281     xdp_metadata:FAIL
      See patch 6.
      
      None of these seem to be due to the new changes.
      
      Best regards,
      Ilya
      ====================
      
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      c1a3daf7
    • Ilya Leoshkevich's avatar
      selftests/bpf: Trim DENYLIST.s390x · ee105d5a
      Ilya Leoshkevich authored
      Now that trampoline is implemented, enable a number of tests on s390x.
      18 of the remaining failures have to do with either lack of rethook
      (fixed by [1]) or syscall symbols missing from BTF (fixed by [2]).
      
      Do not re-classify the remaining failures for now; wait until the
      s390/for-next fixes are merged and re-classify only the remaining few.
      
      [1] https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?h=for-next&id=1a280f48
      [2] https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?h=for-next&id=2213d44e
      
      
      
      Signed-off-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Link: https://lore.kernel.org/r/20230129190501.1624747-9-iii@linux.ibm.com
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      ee105d5a
    • Ilya Leoshkevich's avatar
      selftests/bpf: Fix s390x vmlinux path · af320fb7
      Ilya Leoshkevich authored
      After commit edd4a866
      
       ("s390/boot: get rid of startup archive")
      there is no more compressed/ subdirectory.
      
      Signed-off-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Link: https://lore.kernel.org/r/20230129190501.1624747-8-iii@linux.ibm.com
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      af320fb7
    • Ilya Leoshkevich's avatar
      s390/bpf: Implement bpf_jit_supports_kfunc_call() · 63d7b53a
      Ilya Leoshkevich authored
      
      
      Implement calling kernel functions from eBPF. In general, the eBPF ABI
      is fairly close to that of s390x, with one important difference: on
      s390x callers should sign-extend signed arguments. Handle that by using
      information returned by bpf_jit_find_kfunc_model().
      
      Here is an example of how sign extensions works. Suppose we need to
      call the following function from BPF:
      
          ; long noinline bpf_kfunc_call_test4(signed char a, short b, int c,
      long d)
          0000000000936a78 <bpf_kfunc_call_test4>:
          936a78:       c0 04 00 00 00 00       jgnop bpf_kfunc_call_test4
          ;     return (long)a + (long)b + (long)c + d;
          936a7e:       b9 08 00 45             agr     %r4,%r5
          936a82:       b9 08 00 43             agr     %r4,%r3
          936a86:       b9 08 00 24             agr     %r2,%r4
          936a8a:       c0 f4 00 1e 3b 27       jg      <__s390_indirect_jump_r14>
      
      As per the s390x ABI, bpf_kfunc_call_test4() has the right to assume
      that a, b and c are sign-extended by the caller, which results in using
      64-bit additions (agr) without any additional conversions. Without sign
      extension we would have the following on the JITed code side:
      
          ; tmp = bpf_kfunc_call_test4(-3, -30, -200, -1000);
          ;        5:       b4 10 00 00 ff ff ff fd w1 = -3
          0x3ff7fdcdad4:       llilf   %r2,0xfffffffd
          ;        6:       b4 20 00 00 ff ff ff e2 w2 = -30
          0x3ff7fdcdada:       llilf   %r3,0xffffffe2
          ;        7:       b4 30 00 00 ff ff ff 38 w3 = -200
          0x3ff7fdcdae0:       llilf   %r4,0xffffff38
          ;       8:       b7 40 00 00 ff ff fc 18 r4 = -1000
          0x3ff7fdcdae6:       lgfi    %r5,-1000
          0x3ff7fdcdaec:       mvc     64(4,%r15),160(%r15)
          0x3ff7fdcdaf2:       lgrl    %r1,bpf_kfunc_call_test4@GOT
          0x3ff7fdcdaf8:       brasl   %r14,__s390_indirect_jump_r1
      
      This first 3 llilfs are 32-bit loads, that need to be sign-extended
      to 64 bits.
      
      Note: at the moment bpf_jit_find_kfunc_model() does not seem to play
      nicely with XDP metadata functions: add_kfunc_call() adds an "abstract"
      bpf_*() version to kfunc_btf_tab, but then fixup_kfunc_call() puts the
      concrete version into insn->imm, which bpf_jit_find_kfunc_model() cannot
      find. But this seems to be a common code problem.
      
      Signed-off-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Link: https://lore.kernel.org/r/20230129190501.1624747-7-iii@linux.ibm.com
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      63d7b53a
    • Ilya Leoshkevich's avatar
      s390/bpf: Implement bpf_jit_supports_subprog_tailcalls() · dd691e84
      Ilya Leoshkevich authored
      
      
      Allow mixing subprogs and tail calls by passing the current tail
      call count to subprogs.
      
      Signed-off-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Link: https://lore.kernel.org/r/20230129190501.1624747-6-iii@linux.ibm.com
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      dd691e84
    • Ilya Leoshkevich's avatar
      s390/bpf: Implement arch_prepare_bpf_trampoline() · 528eb2cb
      Ilya Leoshkevich authored
      
      
      arch_prepare_bpf_trampoline() is used for direct attachment of eBPF
      programs to various places, bypassing kprobes. It's responsible for
      calling a number of eBPF programs before, instead and/or after
      whatever they are attached to.
      
      Add a s390x implementation, paying attention to the following:
      
      - Reuse the existing JIT infrastructure, where possible.
      - Like the existing JIT, prefer making multiple passes instead of
        backpatching. Currently 2 passes is enough. If literal pool is
        introduced, this needs to be raised to 3. However, at the moment
        adding literal pool only makes the code larger. If branch
        shortening is introduced, the number of passes needs to be
        increased even further.
      - Support both regular and ftrace calling conventions, depending on
        the trampoline flags.
      - Use expolines for indirect calls.
      - Handle the mismatch between the eBPF and the s390x ABIs.
      - Sign-extend fmod_ret return values.
      
      invoke_bpf_prog() produces about 120 bytes; it might be possible to
      slightly optimize this, but reaching 50 bytes, like on x86_64, looks
      unrealistic: just loading cookie, __bpf_prog_enter, bpf_func, insnsi
      and __bpf_prog_exit as literals already takes at least 5 * 12 = 60
      bytes, and we can't use relative addressing for most of them.
      Therefore, lower BPF_MAX_TRAMP_LINKS on s390x.
      
      Signed-off-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Link: https://lore.kernel.org/r/20230129190501.1624747-5-iii@linux.ibm.com
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      528eb2cb
    • Ilya Leoshkevich's avatar
      s390/bpf: Implement bpf_arch_text_poke() · f1d5df84
      Ilya Leoshkevich authored
      bpf_arch_text_poke() is used to hotpatch eBPF programs and trampolines.
      s390x has a very strict hotpatching restriction: the only thing that is
      allowed to be hotpatched is conditional branch mask.
      
      Take the same approach as commit de5012b4
      
       ("s390/ftrace: implement
      hotpatching"): create a conditional jump to a "plt", which loads the
      target address from memory and jumps to it; then first patch this
      address, and then the mask.
      
      Trampolines (introduced in the next patch) respect the ftrace calling
      convention: the return address is in %r0, and %r1 is clobbered. With
      that in mind, bpf_arch_text_poke() does not differentiate between jumps
      and calls.
      
      However, there is a simple optimization for jumps (for the epilogue_ip
      case): if a jump already points to the destination, then there is no
      "plt" and we can just flip the mask.
      
      For simplicity, the "plt" template is defined in assembly, and its size
      is used to define C arrays. There doesn't seem to be a way to convey
      this size to C as a constant, so it's hardcoded and double-checked
      during runtime.
      
      Signed-off-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Link: https://lore.kernel.org/r/20230129190501.1624747-4-iii@linux.ibm.com
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      f1d5df84
    • Ilya Leoshkevich's avatar
      s390/bpf: Add expoline to tail calls · bb4ef8fc
      Ilya Leoshkevich authored
      All the indirect jumps in the eBPF JIT already use expolines, except
      for the tail call one.
      
      Fixes: de5cb6eb
      
       ("s390: use expoline thunks in the BPF JIT")
      Signed-off-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Link: https://lore.kernel.org/r/20230129190501.1624747-3-iii@linux.ibm.com
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      bb4ef8fc
    • Ilya Leoshkevich's avatar
      selftests/bpf: Fix sk_assign on s390x · 7ce878ca
      Ilya Leoshkevich authored
      
      
      sk_assign is failing on an s390x machine running Debian "bookworm" for
      2 reasons: legacy server_map definition and uninitialized addrlen in
      recvfrom() call.
      
      Fix by adding a new-style server_map definition and dropping addrlen
      (recvfrom() allows NULL values for src_addr and addrlen).
      
      Since the test should support tc built without libbpf, build the prog
      twice: with the old-style definition and with the new-style definition,
      then select the right one at runtime. This could be done at compile
      time too, but this would not be cross-compilation friendly.
      
      Signed-off-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Link: https://lore.kernel.org/r/20230129190501.1624747-2-iii@linux.ibm.com
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      7ce878ca
  3. Jan 29, 2023