From: Jakub Kicinski <kuba@kernel.org>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: martin.lau@linux.dev, razor@blackwall.org, jrife@google.com,
tangchen.1@bytedance.com, bpf@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH bpf-next 1/4] netkit: Add option for scrubbing skb meta data
Date: Thu, 3 Oct 2024 15:16:01 -0700 [thread overview]
Message-ID: <20241003151601.2404a28c@kernel.org> (raw)
In-Reply-To: <20241003180320.113002-1-daniel@iogearbox.net>
On Thu, 3 Oct 2024 20:03:17 +0200 Daniel Borkmann wrote:
> +static int netkit_check_scrub(int scrub, struct nlattr *tb,
> + struct netlink_ext_ack *extack)
> +{
> + switch (scrub) {
> + case NETKIT_SCRUB_DEFAULT:
> + case NETKIT_SCRUB_NONE:
> + return 0;
> + default:
> + NL_SET_ERR_MSG_ATTR(extack, tb,
> + "Provided device scrub setting can only be default/none");
> + return -EINVAL;
> + }
> +}
Set the parsing policy to NLA_POLICY_MAX(NLA_U32, NETKIT_SCRUB_NONE)
and delete this open coded checking, please.
next prev parent reply other threads:[~2024-10-03 22:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 18:03 [PATCH bpf-next 1/4] netkit: Add option for scrubbing skb meta data Daniel Borkmann
2024-10-03 18:03 ` [PATCH bpf-next 2/4] netkit: Add add netkit scrub support to rt_link.yaml Daniel Borkmann
2024-10-03 22:18 ` Jakub Kicinski
2024-10-04 9:27 ` Daniel Borkmann
2024-10-03 18:03 ` [PATCH bpf-next 3/4] tools: Sync if_link.h uapi tooling header Daniel Borkmann
2024-10-03 19:14 ` Alexei Starovoitov
2024-10-03 22:46 ` Daniel Borkmann
2024-10-03 18:03 ` [PATCH bpf-next 4/4] selftests/bpf: Extend netkit tests to validate skb meta data Daniel Borkmann
2024-10-03 22:16 ` Jakub Kicinski [this message]
2024-10-04 9:24 ` [PATCH bpf-next 1/4] netkit: Add option for scrubbing " Daniel Borkmann
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=20241003151601.2404a28c@kernel.org \
--to=kuba@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jrife@google.com \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=razor@blackwall.org \
--cc=tangchen.1@bytedance.com \
/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.