[PATCH mptcp-next v11 0/7] add skc_to_mptcp_sock

Geliang Tang posted 7 patches 2 years, 1 month ago
Failed in applying to current master (apply log)
There is a newer version of this series
include/linux/bpf.h                           |  31 +---
include/linux/btf_ids.h                       |   3 +-
include/uapi/linux/bpf.h                      |  14 +-
kernel/bpf/verifier.c                         |  20 ---
net/core/filter.c                             |  22 ++-
net/mptcp/bpf.c                               |  64 +------
scripts/bpf_doc.py                            |   4 +-
tools/include/uapi/linux/bpf.h                |  14 +-
tools/testing/selftests/bpf/bpf_tcp_helpers.h |  12 ++
.../testing/selftests/bpf/prog_tests/mptcp.c  | 159 ++++++++++++++++--
tools/testing/selftests/bpf/progs/mptcp.c     |  44 ++++-
tools/testing/selftests/bpf/verifier/sock.c   |  63 -------
12 files changed, 229 insertions(+), 221 deletions(-)
[PATCH mptcp-next v11 0/7] add skc_to_mptcp_sock
Posted by Geliang Tang 2 years, 1 month ago
v11:
 - merge "check more values from mptcp_sock" series into this series.
 - patch 2:
   - rebased.
 - patch 3:
   - rebased.
   - add 'Copyright' entry as Matt suggested in v9:
   https://patchwork.kernel.org/project/mptcp/patch/d6d33be9899118c5f542a6ce43f868d4e9e2766b.1646745228.git.geliang.tang@suse.com/
 - patch 4:
   - add test__start_subtest.
   - add some 'Copyright' entries.
 - patch 5:
   - change monitor_log_path to static
   - drop bpf_trace_printk()
 - patch 6:
   - use TCP_CA_NAME_MAX instead of strlen(val.ca_name) in strncmp().
   - use 'sysctl -b net.ipv4.tcp_congestion_control' to get ca_name.

v10:
 - merge the squash-to patch.
 - update patch 3 as Matt suggested.
 - add sync() in get_msk_token() before read().
 - add a comment for get_msk_token().
 - update subjects and commit logs.

v9:
 - update progs/mptcp.c in patch 4 and 5

v8:
 - update as Matt suggested.

v7:
 - parse msk token from the output of 'ip mptcp monitor'.
 - add Nicolas and Matt's SoB tags.

v6:
 - add skc_to_mptcp_sock helper and test

RESEND:
 - fix the CI Build Failure.
v5:
 - fix incorrect token value
 - verify the token in selftest

v4:
 - define bpf_mptcp_sock_proto as a static function, no longer export
   it in linux/bpf.h

v3:
 - use RET_PTR_TO_BTF_ID_OR_NULL instead of RET_PTR_TO_MPTCP_SOCK_OR_NULL
 - add a new bpf_id BTF_SOCK_TYPE_MPTCP

v2:
 - keep RET_PTR_TO_MPTCP_SOCK_OR_NULL. If we use RET_PTR_TO_BTF_ID_OR_NULL
instead of RET_PTR_TO_MPTCP_SOCK_OR_NULL as Alexei suggested, the
"userspace" tests developed by Nicolas will break.

Geliang Tang (7):
  Revert "selftests: bpf: add bpf_mptcp_sock() verifier tests"
  Revert "bpf: add 'bpf_mptcp_sock' structure and helper"
  bpf: add bpf_skc_to_mptcp_sock_proto
  Squash to "selftests: bpf: add MPTCP test base"
  selftests: bpf: test bpf_skc_to_mptcp_sock
  selftests: bpf: verify ca_name of struct mptcp_sock
  selftests: bpf: verify first subflow of mptcp_sock

 include/linux/bpf.h                           |  31 +---
 include/linux/btf_ids.h                       |   3 +-
 include/uapi/linux/bpf.h                      |  14 +-
 kernel/bpf/verifier.c                         |  20 ---
 net/core/filter.c                             |  22 ++-
 net/mptcp/bpf.c                               |  64 +------
 scripts/bpf_doc.py                            |   4 +-
 tools/include/uapi/linux/bpf.h                |  14 +-
 tools/testing/selftests/bpf/bpf_tcp_helpers.h |  12 ++
 .../testing/selftests/bpf/prog_tests/mptcp.c  | 159 ++++++++++++++++--
 tools/testing/selftests/bpf/progs/mptcp.c     |  44 ++++-
 tools/testing/selftests/bpf/verifier/sock.c   |  63 -------
 12 files changed, 229 insertions(+), 221 deletions(-)

-- 
2.34.1


Re: [PATCH mptcp-next v11 0/7] add skc_to_mptcp_sock
Posted by Matthieu Baerts 2 years, 1 month ago
Hi Geliang,

On 23/03/2022 10:09, Geliang Tang wrote:
> v11:
>  - merge "check more values from mptcp_sock" series into this series.
>  - patch 2:
>    - rebased.
>  - patch 3:
>    - rebased.
>    - add 'Copyright' entry as Matt suggested in v9:
>    https://patchwork.kernel.org/project/mptcp/patch/d6d33be9899118c5f542a6ce43f868d4e9e2766b.1646745228.git.geliang.tang@suse.com/
>  - patch 4:
>    - add test__start_subtest.
>    - add some 'Copyright' entries.
>  - patch 5:
>    - change monitor_log_path to static
>    - drop bpf_trace_printk()
>  - patch 6:
>    - use TCP_CA_NAME_MAX instead of strlen(val.ca_name) in strncmp().
>    - use 'sysctl -b net.ipv4.tcp_congestion_control' to get ca_name.

Thank you for the v11 and your patience!

I already applied the two first patches because they have already been
reviewed before and they were causing conflicts with latest BPF changes:

- 83c2e9333801: "squashed" patch 1/7 in "selftests: bpf: add
bpf_mptcp_sock() verifier tests"
- 3e1cf22ec63a: "squashed" patch 2/7 in "bpf: add 'bpf_mptcp_sock'
structure and helper"
- Results: 170b2a907bd7..b3fcb6331ff3 (export)

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

Re: [PATCH mptcp-next v11 0/7] add skc_to_mptcp_sock
Posted by Matthieu Baerts 2 years, 1 month ago
Hi Geliang,

On 23/03/2022 13:48, Matthieu Baerts wrote:
> Hi Geliang,
> 
> On 23/03/2022 10:09, Geliang Tang wrote:
>> v11:
>>  - merge "check more values from mptcp_sock" series into this series.
>>  - patch 2:
>>    - rebased.
>>  - patch 3:
>>    - rebased.
>>    - add 'Copyright' entry as Matt suggested in v9:
>>    https://patchwork.kernel.org/project/mptcp/patch/d6d33be9899118c5f542a6ce43f868d4e9e2766b.1646745228.git.geliang.tang@suse.com/
>>  - patch 4:
>>    - add test__start_subtest.
>>    - add some 'Copyright' entries.
>>  - patch 5:
>>    - change monitor_log_path to static
>>    - drop bpf_trace_printk()
>>  - patch 6:
>>    - use TCP_CA_NAME_MAX instead of strlen(val.ca_name) in strncmp().
>>    - use 'sysctl -b net.ipv4.tcp_congestion_control' to get ca_name.
> 
> Thank you for the v11 and your patience!
> 
> I already applied the two first patches because they have already been
> reviewed before and they were causing conflicts with latest BPF changes:

The new patches, the modifications compared to v10 and the Squash-to
patch look good to me!

Acked-by: Matthieu Baerts <matthieu.baerts@tessares.net>

@Mat: also OK for you as you also reviewed the previous versions? :)

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

Re: [PATCH mptcp-next v11 0/7] add skc_to_mptcp_sock
Posted by Mat Martineau 2 years, 1 month ago
On Wed, 23 Mar 2022, Matthieu Baerts wrote:

> Hi Geliang,
>
> On 23/03/2022 13:48, Matthieu Baerts wrote:
>> Hi Geliang,
>>
>> On 23/03/2022 10:09, Geliang Tang wrote:
>>> v11:
>>>  - merge "check more values from mptcp_sock" series into this series.
>>>  - patch 2:
>>>    - rebased.
>>>  - patch 3:
>>>    - rebased.
>>>    - add 'Copyright' entry as Matt suggested in v9:
>>>    https://patchwork.kernel.org/project/mptcp/patch/d6d33be9899118c5f542a6ce43f868d4e9e2766b.1646745228.git.geliang.tang@suse.com/
>>>  - patch 4:
>>>    - add test__start_subtest.
>>>    - add some 'Copyright' entries.
>>>  - patch 5:
>>>    - change monitor_log_path to static
>>>    - drop bpf_trace_printk()
>>>  - patch 6:
>>>    - use TCP_CA_NAME_MAX instead of strlen(val.ca_name) in strncmp().
>>>    - use 'sysctl -b net.ipv4.tcp_congestion_control' to get ca_name.
>>
>> Thank you for the v11 and your patience!
>>
>> I already applied the two first patches because they have already been
>> reviewed before and they were causing conflicts with latest BPF changes:
>
> The new patches, the modifications compared to v10 and the Squash-to
> patch look good to me!
>
> Acked-by: Matthieu Baerts <matthieu.baerts@tessares.net>
>
> @Mat: also OK for you as you also reviewed the previous versions? :)

Yes, fine to add these to the export branch. If other changes are needed 
those could be squashed.

--
Mat Martineau
Intel