Netdev List
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Simon Horman <simon.horman@netronome.com>
Cc: Xin Long <lucien.xin@gmail.com>,
	network dev <netdev@vger.kernel.org>,
	netfilter-devel@vger.kernel.org, davem <davem@davemloft.net>
Subject: Re: [PATCH nf-next 1/7] netfilter: nft_tunnel: parse ERSPAN_VERSION attr as u8
Date: Tue, 17 Dec 2019 22:39:04 +0100	[thread overview]
Message-ID: <20191217213904.sqvvg7ljiibdt3xi@salvia> (raw)
In-Reply-To: <20191213093026.GA27379@netronome.com>

Hi Simon,

On Fri, Dec 13, 2019 at 10:30:26AM +0100, Simon Horman wrote:
> On Tue, Dec 10, 2019 at 12:05:15PM +0800, Xin Long wrote:
> > On Tue, Dec 10, 2019 at 4:03 AM Simon Horman <simon.horman@netronome.com> wrote:
> > >
> > > Hi Xin,
> > >
> > > On Sun, Dec 08, 2019 at 12:41:31PM +0800, Xin Long wrote:
> > > > To keep consistent with ipgre_policy, it's better to parse
> > > > ERSPAN_VERSION attr as u8, as it does in act_tunnel_key,
> > > > cls_flower and ip_tunnel_core.
> > > >
> > > > Signed-off-by: Xin Long <lucien.xin@gmail.com>
> > > > ---
> > > >  net/netfilter/nft_tunnel.c | 5 +++--
> > > >  1 file changed, 3 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/net/netfilter/nft_tunnel.c b/net/netfilter/nft_tunnel.c
> > > > index 3d4c2ae..f76cd7d 100644
> > > > --- a/net/netfilter/nft_tunnel.c
> > > > +++ b/net/netfilter/nft_tunnel.c
> > > > @@ -248,8 +248,9 @@ static int nft_tunnel_obj_vxlan_init(const struct nlattr *attr,
> > > >  }
> > > >
> > > >  static const struct nla_policy nft_tunnel_opts_erspan_policy[NFTA_TUNNEL_KEY_ERSPAN_MAX + 1] = {
> > > > +     [NFTA_TUNNEL_KEY_ERSPAN_VERSION]        = { .type = NLA_U8 },
> > > >       [NFTA_TUNNEL_KEY_ERSPAN_V1_INDEX]       = { .type = NLA_U32 },
> > > > -     [NFTA_TUNNEL_KEY_ERSPAN_V2_DIR] = { .type = NLA_U8 },
> > > > +     [NFTA_TUNNEL_KEY_ERSPAN_V2_DIR]         = { .type = NLA_U8 },
> > > >       [NFTA_TUNNEL_KEY_ERSPAN_V2_HWID]        = { .type = NLA_U8 },
> > > >  };
> > > >
> > > > @@ -266,7 +267,7 @@ static int nft_tunnel_obj_erspan_init(const struct nlattr *attr,
> > > >       if (err < 0)
> > > >               return err;
> > > >
> > > > -     version = ntohl(nla_get_be32(tb[NFTA_TUNNEL_KEY_ERSPAN_VERSION]));
> > > > +     version = nla_get_u8(tb[NFTA_TUNNEL_KEY_ERSPAN_VERSION]);
> > >
> > > I have concerns about this change and backwards-compatibility with existing
> > > users of this UAPI. Likewise, with other changes to the encoding of existing
> > > attributes elsewhere in this series.
> >
> > userspace(nftables/libnftnl) is not ready for nft_tunnel, I don't
> > think there will be any backwards-compatibility issue.
> > 
> > Pablo?
> 
> Thanks, I'm happy to defer to Pablo on this question.

I agree with Xin. This uapi is not in good shape and there is no
upstream userspace code for this, no nftables support for this yet.
In this particular case I'm inclined to fix uapi, better sooner than
never.

Thanks.

  reply	other threads:[~2019-12-17 21:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-08  4:41 [PATCH nf-next 0/7] netfilter: nft_tunnel: reinforce key opts support Xin Long
2019-12-08  4:41 ` [PATCH nf-next 1/7] netfilter: nft_tunnel: parse ERSPAN_VERSION attr as u8 Xin Long
2019-12-09 20:03   ` Simon Horman
2019-12-10  4:05     ` Xin Long
2019-12-13  9:30       ` Simon Horman
2019-12-17 21:39         ` Pablo Neira Ayuso [this message]
2019-12-11 21:51   ` Pablo Neira Ayuso
2019-12-12  3:20     ` Xin Long
2019-12-12 12:33       ` Pablo Neira Ayuso
2019-12-08  4:41 ` [PATCH nf-next 2/7] netfilter: nft_tunnel: parse VXLAN_GBP attr as u32 in nft_tunnel Xin Long
2019-12-11 21:52   ` Pablo Neira Ayuso
2019-12-08  4:41 ` [PATCH nf-next 3/7] netfilter: nft_tunnel: no need to call htons() when dumping ports Xin Long
2019-12-11 21:53   ` Pablo Neira Ayuso
2019-12-11 22:06     ` Pablo Neira Ayuso
2019-12-11 22:06       ` Pablo Neira Ayuso
2019-12-11 21:57   ` Pablo Neira Ayuso
2019-12-08  4:41 ` [PATCH nf-next 4/7] netfilter: nft_tunnel: also dump ERSPAN_VERSION Xin Long
2019-12-11 21:53   ` Pablo Neira Ayuso
2019-12-08  4:41 ` [PATCH nf-next 5/7] netfilter: nft_tunnel: also dump OPTS_ERSPAN/VXLAN Xin Long
2019-12-11 21:55   ` Pablo Neira Ayuso
2019-12-08  4:41 ` [PATCH nf-next 6/7] netfilter: nft_tunnel: add the missing nla_nest_cancel() Xin Long
2019-12-11 21:55   ` Pablo Neira Ayuso
2019-12-08  4:41 ` [PATCH nf-next 7/7] netfilter: nft_tunnel: add support for geneve opts Xin Long
2019-12-08  4:51 ` [PATCH nf-next 0/7] netfilter: nft_tunnel: reinforce key opts support Xin Long
2019-12-12  3:02 ` Xin Long
2019-12-12 12:39   ` Pablo Neira Ayuso

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=20191217213904.sqvvg7ljiibdt3xi@salvia \
    --to=pablo@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=lucien.xin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=simon.horman@netronome.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox