netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Benc <jbenc@redhat.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: shemming@brocade.com, netdev@vger.kernel.org,
	Roopa Prabhu <roopa@cumulusnetworks.com>
Subject: Re: [PATCH iproute2 1/3] vxlan: add support for collect metadata flag
Date: Wed, 16 Dec 2015 11:56:26 +0100	[thread overview]
Message-ID: <20151216115626.7a35b4ff@griffin> (raw)
In-Reply-To: <20151216115054.47dca715@griffin>

On Wed, 16 Dec 2015 11:50:53 +0100, Jiri Benc wrote:
> Also, as a related remark, please note that IFLA_VXLAN_COLLECT_METADATA
> is mutually exclusive with many other flags. It's currently not
> enforced correctly at the kernel level (instead, you get weird
> behavior). I'll fix this on the kernel side but we may want to enforce
> this on the iproute2 side, too, to get a better error message. This is
> not to be addressed by this patch, though.

Actually, there's one thing this patch must do. Currently, vxlan
enforces vni to be specified. This is not required for metadata based
tunneling. It's actually not permitted.

You'll need to add a hunk similar to this:

--- a/ip/iplink_vxlan.c
+++ b/ip/iplink_vxlan.c
@@ -215,7 +215,12 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv,
 		argc--, argv++;
 	}
 
-	if (!vni_set) {
+	if (metadata && vni_set) {
+		fprintf(stderr, "vxlan: both metadata and vni cannot be specified\n");
+		return -1;
+	}
+
+	if (!metadata && !vni_set) {
 		fprintf(stderr, "vxlan: missing virtual network identifier\n");
 		return -1;
 	}

-- 
Jiri Benc

  reply	other threads:[~2015-12-16 10:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 15:48 [PATCH iproute2 0/3] improve lwtunnel route support Paolo Abeni
2015-12-15 15:48 ` [PATCH iproute2 1/3] vxlan: add support for collect metadata flag Paolo Abeni
2015-12-16 10:50   ` Jiri Benc
2015-12-16 10:56     ` Jiri Benc [this message]
2015-12-16 12:11       ` Paolo Abeni
2015-12-15 15:48 ` [PATCH iproute2 2/3] gre: " Paolo Abeni
2015-12-15 15:48 ` [PATCH iproute2 3/3] lwtunnel: implement support for ip6 encap Paolo Abeni

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=20151216115626.7a35b4ff@griffin \
    --to=jbenc@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=roopa@cumulusnetworks.com \
    --cc=shemming@brocade.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).