From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v8 7/8] mptcp: pm: mark missing address attributes
Date: Thu, 9 Jan 2025 16:24:32 +0100 [thread overview]
Message-ID: <800dac0f-16d4-4e89-9d94-0fbef2e22e21@kernel.org> (raw)
In-Reply-To: <07fcafc9153f0386b0d7340e193bc73f806e7154.1736299989.git.tanggeliang@kylinos.cn>
Hi Geliang,
On 08/01/2025 02:44, Geliang Tang wrote:
> From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
>
> mptcp_pm_parse_entry() will check if the given attribute is defined. If
> not, it will return a generic error: "missing address info".
>
> It might then not be clear for the userspace developer which attribute
> is missing, especially when the command takes multiple addresses.
>
> By using GENL_REQ_ATTR_CHECK(), the userspace will get a hint about
> which attribute is missing, making thing clearer. Note that this is what
> was already done for most of the other MPTCP NL commands, this patch
> simply adds the missing ones.
>
> v2:
> - keep "pernet = pm_nl_get_pernet(net);" at the beginning of
> mptcp_pm_nl_set_flags().
Why did you move it there? The GENL_REQ_ATTR_CHECK() are usually done
first, no? There is no need to get 'pernet' if some attributes are missing.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2025-01-09 15:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-08 1:44 [PATCH mptcp-next v8 0/8] mptcp: use GENL_REQ_ATTR_CHECK in userspace pm Geliang Tang
2025-01-08 1:44 ` [PATCH mptcp-next v8 1/8] mptcp: drop info of userspace_pm_remove_id_zero_address Geliang Tang
2025-01-08 1:44 ` [PATCH mptcp-next v8 2/8] mptcp: pm: userspace: flags: clearer msg if no remote addr Geliang Tang
2025-01-08 1:44 ` [PATCH mptcp-next v8 3/8] mptcp: pm: more precise error messages Geliang Tang
2025-01-08 1:44 ` [PATCH mptcp-next v8 4/8] mptcp: pm: improve " Geliang Tang
2025-01-09 15:23 ` Matthieu Baerts
2025-01-08 1:44 ` [PATCH mptcp-next v8 5/8] mptcp: pm: userspace: use GENL_REQ_ATTR_CHECK Geliang Tang
2025-01-09 15:24 ` Matthieu Baerts
2025-01-08 1:44 ` [PATCH mptcp-next v8 6/8] mptcp: pm: remove duplicated error messages Geliang Tang
2025-01-08 1:44 ` [PATCH mptcp-next v8 7/8] mptcp: pm: mark missing address attributes Geliang Tang
2025-01-09 15:24 ` Matthieu Baerts [this message]
2025-01-08 1:44 ` [PATCH mptcp-next v8 8/8] mptcp: pm: use NL_SET_ERR_MSG_ATTR when possible Geliang Tang
2025-01-08 3:25 ` [PATCH mptcp-next v8 0/8] mptcp: use GENL_REQ_ATTR_CHECK in userspace pm MPTCP CI
2025-01-09 15:23 ` Matthieu Baerts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=800dac0f-16d4-4e89-9d94-0fbef2e22e21@kernel.org \
--to=matttbe@kernel.org \
--cc=geliang@kernel.org \
--cc=mptcp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox