mbox series

[mptcp-next,v9,0/8] use GENL_REQ_ATTR_CHECK in userspace pm

Message ID cover.1736493803.git.tanggeliang@kylinos.cn (mailing list archive)
Headers show
Series use GENL_REQ_ATTR_CHECK in userspace pm | expand

Message

Geliang Tang Jan. 10, 2025, 7:30 a.m. UTC
From: Geliang Tang <tanggeliang@kylinos.cn>

v9:
 patch 3, move the code using NL_SET_ERR_MSG_ATTR into patch 8.
 patch 7, adjust the location of "pernet = pm_nl_get_pernet(net);".

v8:
 - move the set_flags() patches out of this set.
 - differences from v6:
  - adjust the order of the patches.
  - keep "pernet = pm_nl_get_pernet(net);" at the beginning of
    mptcp_pm_nl_set_flags().
  - not use NL_SET_ERR_MSG_ATTR in mptcp_pm_nl_set_flags(), since 'attr'
    will be removed in the commit "mptcp: add local & remote parameters for
    set_flags".
  - update the code related mptcp_userspace_pm_remove_id_zero_address()
    since a new patch to drop "info" parameter of this patch is added.
  - add a comment "mptcp_pm_nl_mp_prio_send_ack() only fails in one case"
    in mptcp_userspace_pm_set_flags().

v7:
 - update set_flags() interface.
 - drop 'info' parameter of userspace_pm_remove_id_zero_address().
 - rebase v6 on top of these changes.

This is a newer version of the series started by Geliang, now making
them more uniform on how the NL errors are set, and giving more hints to
the userspace about what's wrong.

Geliang Tang (2):
  mptcp: drop info of userspace_pm_remove_id_zero_address
  mptcp: pm: userspace: use GENL_REQ_ATTR_CHECK

Matthieu Baerts (NGI0) (6):
  mptcp: pm: userspace: flags: clearer msg if no remote addr
  mptcp: pm: more precise error messages
  mptcp: pm: improve error messages
  mptcp: pm: remove duplicated error messages
  mptcp: pm: mark missing address attributes
  mptcp: pm: use NL_SET_ERR_MSG_ATTR when possible

 net/mptcp/pm_netlink.c   |  43 +++++++++---
 net/mptcp/pm_userspace.c | 148 +++++++++++++++++++++++----------------
 2 files changed, 118 insertions(+), 73 deletions(-)

Comments

MPTCP CI Jan. 10, 2025, 8:35 a.m. UTC | #1
Hi Matthieu,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Unstable: 1 failed test(s): bpftest_test_progs-no_alu32_mptcp 
Matthieu Baerts Jan. 10, 2025, 11:21 a.m. UTC | #2
Hi Geliang,

On 10/01/2025 08:30, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> v9:
>  patch 3, move the code using NL_SET_ERR_MSG_ATTR into patch 8.
>  patch 7, adjust the location of "pernet = pm_nl_get_pernet(net);".

Thank you for the new version.

I have one small request in patch 8/8, but I can fix that when applying
the patches if that's OK with you.

I can also do the modifications in set_flags(), and fix the conflicts
when applying "BPF path manager, part 2" (if it is ready)

Cheers,
Matt
Matthieu Baerts Jan. 12, 2025, 12:43 p.m. UTC | #3
Hi Geliang,

On 10/01/2025 12:21, Matthieu Baerts wrote:
> Hi Geliang,
> 
> On 10/01/2025 08:30, Geliang Tang wrote:
>> From: Geliang Tang <tanggeliang@kylinos.cn>
>>
>> v9:
>>  patch 3, move the code using NL_SET_ERR_MSG_ATTR into patch 8.
>>  patch 7, adjust the location of "pernet = pm_nl_get_pernet(net);".
> 
> Thank you for the new version.
> 
> I have one small request in patch 8/8, but I can fix that when applying
> the patches if that's OK with you.
> 
> I can also do the modifications in set_flags(), and fix the conflicts
> when applying "BPF path manager, part 2" (if it is ready)

As discussed on the "BPF path manager, part 2" thread, I will apply
patches from these 2 series with the suggested modifications.

Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

Cheers,
Matt
Matthieu Baerts Jan. 12, 2025, 12:57 p.m. UTC | #4
Hi Geliang,

On 12/01/2025 13:43, Matthieu Baerts wrote:
> Hi Geliang,
> 
> On 10/01/2025 12:21, Matthieu Baerts wrote:
>> Hi Geliang,
>>
>> On 10/01/2025 08:30, Geliang Tang wrote:
>>> From: Geliang Tang <tanggeliang@kylinos.cn>
>>>
>>> v9:
>>>  patch 3, move the code using NL_SET_ERR_MSG_ATTR into patch 8.
>>>  patch 7, adjust the location of "pernet = pm_nl_get_pernet(net);".
>>
>> Thank you for the new version.
>>
>> I have one small request in patch 8/8, but I can fix that when applying
>> the patches if that's OK with you.
>>
>> I can also do the modifications in set_flags(), and fix the conflicts
>> when applying "BPF path manager, part 2" (if it is ready)
> 
> As discussed on the "BPF path manager, part 2" thread, I will apply
> patches from these 2 series with the suggested modifications.
> 
> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

Now in our tree (feat. for net-next) with my/your RvB tag:

New patches for t/upstream:
- 5e429e15a686: mptcp: drop info of userspace_pm_remove_id_zero_address
- 81e5a669e7d9: mptcp: pm: userspace: flags: clearer msg if no remote addr
- 677a8abf8d6c: mptcp: pm: more precise error messages
- b4609c1a21bc: mptcp: pm: improve error messages
- b8f41c31bdfc: mptcp: pm: userspace: use GENL_REQ_ATTR_CHECK
- 59b41cafd64c: mptcp: pm: remove duplicated error messages
- 94f4c18c1bd8: mptcp: pm: mark missing address attributes
- 04606ffe7837: mptcp: pm: use NL_SET_ERR_MSG_ATTR when possible
- Results: 632bb7330ffe..472c88326ee3 (export)

Tests are now in progress:

- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/2ee1204b47d42c73b7fb3bce9534d89666d24a98/checks

Cheers,
Matt