From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v9 8/8] mptcp: pm: use NL_SET_ERR_MSG_ATTR when possible
Date: Fri, 10 Jan 2025 12:48:08 +0100 [thread overview]
Message-ID: <43701213-d274-43f7-9205-c530e7fc7d6f@kernel.org> (raw)
In-Reply-To: <0416e719bbf265607b2c8c9065bcf8fbd0bbb685.1736493803.git.tanggeliang@kylinos.cn>
Hi Geliang,
Thank you for the new version!
On 10/01/2025 08:30, Geliang Tang wrote:
> From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
>
> Instead of only returning a text message with GENL_SET_ERR_MSG(),
> NL_SET_ERR_MSG_ATTR() can help the userspace developers by also
> reporting which attribute is faulty.
>
> When the error is specific to an attribute, NL_SET_ERR_MSG_ATTR() is now
> used. The error messages have not been modified in this commit.
>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
> v2:
> - update the code related mptcp_userspace_pm_remove_id_zero_address()
> since a new patch to drop "info" parameter of this patch is added.
>
> v3:
> - 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".
It could still be set here, and removed in the other series (or we could
also use it in the other series, to uniform the errors, the helper has
access to 'info'), but OK, we had enough versions here.
Note that in mptcp_pm_nl_remove_doit(), there is one
GENL_SET_ERR_MSG_FMT() left: NL_SET_ERR_MSG_ATTR_FMT() can be used
instead. I can fix that when applying the patch if that's OK for you.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2025-01-10 11:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 7:30 [PATCH mptcp-next v9 0/8] use GENL_REQ_ATTR_CHECK in userspace pm Geliang Tang
2025-01-10 7:30 ` [PATCH mptcp-next v9 1/8] mptcp: drop info of userspace_pm_remove_id_zero_address Geliang Tang
2025-01-10 7:30 ` [PATCH mptcp-next v9 2/8] mptcp: pm: userspace: flags: clearer msg if no remote addr Geliang Tang
2025-01-10 7:30 ` [PATCH mptcp-next v9 3/8] mptcp: pm: more precise error messages Geliang Tang
2025-01-10 7:30 ` [PATCH mptcp-next v9 4/8] mptcp: pm: improve " Geliang Tang
2025-01-10 7:30 ` [PATCH mptcp-next v9 5/8] mptcp: pm: userspace: use GENL_REQ_ATTR_CHECK Geliang Tang
2025-01-10 7:30 ` [PATCH mptcp-next v9 6/8] mptcp: pm: remove duplicated error messages Geliang Tang
2025-01-10 7:30 ` [PATCH mptcp-next v9 7/8] mptcp: pm: mark missing address attributes Geliang Tang
2025-01-10 7:30 ` [PATCH mptcp-next v9 8/8] mptcp: pm: use NL_SET_ERR_MSG_ATTR when possible Geliang Tang
2025-01-10 11:48 ` Matthieu Baerts [this message]
2025-01-10 8:35 ` [PATCH mptcp-next v9 0/8] use GENL_REQ_ATTR_CHECK in userspace pm MPTCP CI
2025-01-10 11:21 ` Matthieu Baerts
2025-01-12 12:43 ` Matthieu Baerts
2025-01-12 12:57 ` 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=43701213-d274-43f7-9205-c530e7fc7d6f@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.