[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191120091704.2d10ab90@cakuba.netronome.com>
Date: Wed, 20 Nov 2019 09:17:04 -0800
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: Xin Long <lucien.xin@...il.com>
Cc: network dev <netdev@...r.kernel.org>, davem <davem@...emloft.net>,
Simon Horman <simon.horman@...ronome.com>,
"dsahern@...il.com" <dsahern@...il.com>
Subject: Re: [PATCH net-next 1/4] net: sched: add vxlan option support to
act_tunnel_key
On Wed, 20 Nov 2019 13:08:39 +0800, Xin Long wrote:
> > > static const struct nla_policy
> > > @@ -64,6 +66,11 @@ geneve_opt_policy[TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX + 1] = {
> > > .len = 128 },
> > > };
> > >
> > > +static const struct nla_policy
> > > +vxlan_opt_policy[TCA_TUNNEL_KEY_ENC_OPT_VXLAN_MAX + 1] = {
> >
> > [TCA_TUNNEL_KEY_ENC_OPT_VXLAN_UNSPEC] =
> > { .strict_type_start = TCA_TUNNEL_KEY_ENC_OPT_VXLAN_UNSPEC + 1, }
> >
> > > + [TCA_TUNNEL_KEY_ENC_OPT_VXLAN_GBP] = { .type = NLA_U32 },
> > > +};
> > > +
> But vxlan_opt_policy is a new policy, and it will be parsed by
> nla_parse_nested()
> where NL_VALIDATE_STRICT has been used.
>
> .strict_type_start is used for setting NL_VALIDATE_STRICT for some new
> option appending on an old policy.
>
> So I think .strict_type_start is not needed here.
Hm, that's what I thought but then we were asked to add it in
act_mpls.c. I should've checked the code.
Anyway, we should probably clean up act_mpls.c and act_ct.c so people
don't copy it unnecessarily.
Powered by blists - more mailing lists