1. 21 Aug, 2023 11 commits
  2. 18 Aug, 2023 25 commits
  3. 17 Aug, 2023 2 commits
    • Jakub Kicinski's avatar
      Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · f54a2a13
      Jakub Kicinski authored
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2023-08-16
      
      We've added 17 non-merge commits during the last 6 day(s) which contain
      a total of 20 files changed, 1179 insertions(+), 37 deletions(-).
      
      The main changes are:
      
      1) Add a BPF hook in sys_socket() to change the protocol ID
         from IPPROTO_TCP to IPPROTO_MPTCP to cover migration for legacy
         applications, from Geliang Tang.
      
      2) Follow-up/fallout fix from the SO_REUSEPORT + bpf_sk_assign work
         to fix a splat on non-fullsock sks in inet[6]_steal_sock,
         from Lorenz Bauer.
      
      3) Improvements to struct_ops links to avoid forcing presence of
         update/validate callbacks. Also add bpf_struct_ops fields documentation,
         from David Vernet.
      
      4) Ensure libbpf sets close-on-exec flag on gzopen, from Marco Vedovati.
      
      5) Several new tcx selftest additions and bpftool link show support for
         tcx and xdp links, from Daniel Borkmann.
      
      6) Fix a smatch warning on uninitialized symbol in
         bpf_perf_link_fill_kprobe, from Yafang Shao.
      
      7) BPF selftest fixes e.g. misplaced break in kfunc_call test,
         from Yipeng Zou.
      
      8) Small cleanup to remove unused declaration bpf_link_new_file,
         from Yue Haibing.
      
      9) Small typo fix to bpftool's perf help message, from Daniel T. Lee.
      
      * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next:
        selftests/bpf: Add mptcpify test
        selftests/bpf: Fix error checks of mptcp open_and_load
        selftests/bpf: Add two mptcp netns helpers
        bpf: Add update_socket_protocol hook
        bpftool: Implement link show support for xdp
        bpftool: Implement link show support for tcx
        selftests/bpf: Add selftest for fill_link_info
        bpf: Fix uninitialized symbol in bpf_perf_link_fill_kprobe()
        net: Fix slab-out-of-bounds in inet[6]_steal_sock
        bpf: Document struct bpf_struct_ops fields
        bpf: Support default .validate() and .update() behavior for struct_ops links
        selftests/bpf: Add various more tcx test cases
        selftests/bpf: Clean up fmod_ret in bench_rename test script
        selftests/bpf: Fix repeat option when kfunc_call verification fails
        libbpf: Set close-on-exec flag on gzopen
        bpftool: fix perf help message
        bpf: Remove unused declaration bpf_link_new_file()
      ====================
      
      Link: https://lore.kernel.org/r/20230816212840.1539-1-daniel@iogearbox.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f54a2a13
    • Jakub Kicinski's avatar
      Revert "net: ethernet: ti: am65-cpsw: add mqprio qdisc offload in channel mode" · 42b118c9
      Jakub Kicinski authored
      This reverts commit 90bc21aa.
      
      Patch was merged too hastily, Vladimir requested changes in:
      https://lore.kernel.org/all/20230816121305.5dio5tk3chge2ndh@skbuf/Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      42b118c9
  4. 16 Aug, 2023 2 commits
    • Martin KaFai Lau's avatar
      Merge branch 'bpf: Force to MPTCP' · de405373
      Martin KaFai Lau authored
      Geliang Tang says:
      
      ====================
      As is described in the "How to use MPTCP?" section in MPTCP wiki [1]:
      
      "Your app should create sockets with IPPROTO_MPTCP as the proto:
      ( socket(AF_INET, SOCK_STREAM, IPPROTO_MPTCP); ). Legacy apps can be
      forced to create and use MPTCP sockets instead of TCP ones via the
      mptcpize command bundled with the mptcpd daemon."
      
      But the mptcpize (LD_PRELOAD technique) command has some limitations
      [2]:
      
       - it doesn't work if the application is not using libc (e.g. GoLang
      apps)
       - in some envs, it might not be easy to set env vars / change the way
      apps are launched, e.g. on Android
       - mptcpize needs to be launched with all apps that want MPTCP: we could
      have more control from BPF to enable MPTCP only for some apps or all the
      ones of a netns or a cgroup, etc.
       - it is not in BPF, we cannot talk about it at netdev conf.
      
      So this patchset attempts to use BPF to implement functions similer to
      mptcpize.
      
      The main idea is to add a hook in sys_socket() to change the protocol id
      from IPPROTO_TCP (or 0) to IPPROTO_MPTCP.
      
      [1]
      https://github.com/multipath-tcp/mptcp_net-next/wiki
      [2]
      https://github.com/multipath-tcp/mptcp_net-next/issues/79
      
      v14:
       - Use getsockopt(MPTCP_INFO) to verify mptcp protocol intead of using
      nstat command.
      
      v13:
       - drop "Use random netns name for mptcp" patch.
      
      v12:
       - update diag_* log of update_socket_protocol.
       - add 'ip netns show' after 'ip netns del' to check if there is
      a test did not clean up its netns.
       - return libbpf_get_error() instead of -EIO for the error from
      open_and_load().
       - Use getsockopt(SOL_PROTOCOL) to verify mptcp protocol intead of
      using 'ss -tOni'.
      
      v11:
       - add comments about outputs of 'ss' and 'nstat'.
       - use "err = verify_mptcpify()" instead of using =+.
      
      v10:
       - drop "#ifdef CONFIG_BPF_JIT".
       - include vmlinux.h and bpf_tracing_net.h to avoid defining some
      macros.
       - drop unneeded checks for mptcp.
      
      v9:
       - update comment for 'update_socket_protocol'.
      
      v8:
       - drop the additional checks on the 'protocol' value after the
      'update_socket_protocol()' call.
      
      v7:
       - add __weak and __diag_* for update_socket_protocol.
      
      v6:
       - add update_socket_protocol.
      
      v5:
       - add bpf_mptcpify helper.
      
      v4:
       - use lsm_cgroup/socket_create
      
      v3:
       - patch 8: char cmd[128]; -> char cmd[256];
      
      v2:
       - Fix build selftests errors reported by CI
      
      Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/79
      ====================
      Signed-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
      de405373
    • Geliang Tang's avatar
      selftests/bpf: Add mptcpify test · ddba1224
      Geliang Tang authored
      Implement a new test program mptcpify: if the family is AF_INET or
      AF_INET6, the type is SOCK_STREAM, and the protocol ID is 0 or
      IPPROTO_TCP, set it to IPPROTO_MPTCP. It will be hooked in
      update_socket_protocol().
      
      Extend the MPTCP test base, add a selftest test_mptcpify() for the
      mptcpify case. Open and load the mptcpify test prog to mptcpify the
      TCP sockets dynamically, then use start_server() and connect_to_fd()
      to create a TCP socket, but actually what's created is an MPTCP
      socket, which can be verified through 'getsockopt(SOL_PROTOCOL)'
      and 'getsockopt(MPTCP_INFO)'.
      Acked-by: default avatarYonghong Song <yonghong.song@linux.dev>
      Reviewed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarGeliang Tang <geliang.tang@suse.com>
      Link: https://lore.kernel.org/r/364e72f307e7bb38382ec7442c182d76298a9c41.1692147782.git.geliang.tang@suse.comSigned-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
      ddba1224