[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241216171201.274644-2-idosch@nvidia.com>
Date: Mon, 16 Dec 2024 19:11:53 +0200
From: Ido Schimmel <idosch@...dia.com>
To: <netdev@...r.kernel.org>
CC: <davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
<edumazet@...gle.com>, <dsahern@...nel.org>, <donald.hunter@...il.com>,
<horms@...nel.org>, <gnault@...hat.com>, <rostedt@...dmis.org>,
<mhiramat@...nel.org>, <mathieu.desnoyers@...icios.com>, <petrm@...dia.com>,
Ido Schimmel <idosch@...dia.com>
Subject: [PATCH net-next 1/9] net: fib_rules: Add flow label selector attributes
Add new FIB rule attributes which will allow user space to match on the
IPv6 flow label with a mask. Temporarily set the type of the attributes
to 'NLA_REJECT' while support is being added in the IPv6 code.
Reviewed-by: Petr Machata <petrm@...dia.com>
Signed-off-by: Ido Schimmel <idosch@...dia.com>
---
include/uapi/linux/fib_rules.h | 2 ++
net/core/fib_rules.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/include/uapi/linux/fib_rules.h b/include/uapi/linux/fib_rules.h
index a6924dd3aff1..00e9890ca3c0 100644
--- a/include/uapi/linux/fib_rules.h
+++ b/include/uapi/linux/fib_rules.h
@@ -68,6 +68,8 @@ enum {
FRA_SPORT_RANGE, /* sport */
FRA_DPORT_RANGE, /* dport */
FRA_DSCP, /* dscp */
+ FRA_FLOWLABEL, /* flowlabel */
+ FRA_FLOWLABEL_MASK, /* flowlabel mask */
__FRA_MAX
};
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 34185d138c95..153b14aade42 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -770,6 +770,8 @@ static const struct nla_policy fib_rule_policy[FRA_MAX + 1] = {
[FRA_SPORT_RANGE] = { .len = sizeof(struct fib_rule_port_range) },
[FRA_DPORT_RANGE] = { .len = sizeof(struct fib_rule_port_range) },
[FRA_DSCP] = NLA_POLICY_MAX(NLA_U8, INET_DSCP_MASK >> 2),
+ [FRA_FLOWLABEL] = { .type = NLA_REJECT },
+ [FRA_FLOWLABEL_MASK] = { .type = NLA_REJECT },
};
int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr *nlh,
--
2.47.1
Powered by blists - more mailing lists