netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Benc <jbenc@redhat.com>
To: William Tu <u9012063@gmail.com>
Cc: netdev@vger.kernel.org, Pravin B Shelar <pshelar@ovn.org>
Subject: Re: [PATCHv2 net-next 2/2] openvswitch: add erspan version II support
Date: Wed, 10 Jan 2018 22:35:14 +0100	[thread overview]
Message-ID: <20180110223514.1e5030cd@redhat.com> (raw)
In-Reply-To: <1515549082-4141-3-git-send-email-u9012063@gmail.com>

On Tue,  9 Jan 2018 17:51:22 -0800, William Tu wrote:
> -	[OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS]   = { .len = sizeof(u32) },
> +	[OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTSV1] = { .len = sizeof(u32) },
> +	[OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS]   = { .len = OVS_ATTR_NESTED,
> +						.next = ovs_erspan_opt_lens },

Ouch. It's actually much worse than that, you're redefining the meaning of
the field. That's complete no-go.

> +		case OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTSV1:
> +			OVS_NLERR(log, "ERSPAN attribute %d is deprecated.",
> +				  type);
> +			return -EINVAL;

As is this.

> @@ -906,8 +1017,8 @@ static int __ip_tun_to_nlattr(struct sk_buff *skb,
>  			 vxlan_opt_to_nlattr(skb, tun_opts, swkey_tun_opts_len))
>  			return -EMSGSIZE;
>  		else if (output->tun_flags & TUNNEL_ERSPAN_OPT &&
> -			 nla_put_be32(skb, OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS,
> -				      ((struct erspan_metadata *)tun_opts)->u.index))
> +			 erspan_opt_to_nlattr(skb, tun_opts,
> +					      swkey_tun_opts_len))

And this.

The existing field must continue to work in the same way as before. It must
be accepted and *returned* by the kernel. You may add an additional field
but the existing behavior must be 100% preserved, both uABI and uAPI wise.

 Jiri

  parent reply	other threads:[~2018-01-10 21:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10  1:51 [PATCHv2 net-next 0/2] net: erspan: add support for openvswitch William Tu
2018-01-10  1:51 ` [PATCHv2 net-next 1/2] net: erspan: use bitfield instead of mask and offset William Tu
2018-01-10  1:51 ` [PATCHv2 net-next 2/2] openvswitch: add erspan version II support William Tu
2018-01-10 21:29   ` Jiri Benc
2018-01-10 21:35   ` Jiri Benc [this message]
2018-01-10 22:02     ` Jiri Benc
2018-01-11 16:34       ` William Tu
2018-01-12  8:27         ` Jiri Benc
2018-01-12 18:39           ` Pravin Shelar
2018-01-12 19:22             ` William Tu

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=20180110223514.1e5030cd@redhat.com \
    --to=jbenc@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@ovn.org \
    --cc=u9012063@gmail.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;
as well as URLs for NNTP newsgroup(s).