From: Stephen Hemminger <stephen@networkplumber.org>
To: William Tu <u9012063@gmail.com>
Cc: netdev@vger.kernel.org, Meenakshi Vohra <mvohra@vmware.com>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Subject: Re: [PATCHv2 net-next iproute2] gre: add support for ERSPAN tunnel
Date: Thu, 10 Aug 2017 15:12:13 -0700 [thread overview]
Message-ID: <20170810151213.095a4505@xeon-e3> (raw)
In-Reply-To: <1502396067-21274-1-git-send-email-u9012063@gmail.com>
On Thu, 10 Aug 2017 13:14:27 -0700
William Tu <u9012063@gmail.com> wrote:
> +
> + if (greinfo[IFLA_GRE_ERSPAN_INDEX])
> + erspan_idx = rta_getattr_u32(greinfo[IFLA_GRE_ERSPAN_INDEX]);
> }
Are you missing a ntohl() here?
It is encoded as htonl() when sending to kernel.
addattr32(n, 1024, IFLA_GRE_FWMARK, fwmark);
+ addattr32(n, 1024, IFLA_GRE_ERSPAN_INDEX, htonl(erspan_idx));
Is erspan_idx == 0 a reserved value?
You should only send erspan_idx to kernel if it is given on command line.
next prev parent reply other threads:[~2017-08-10 22:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-10 20:14 [PATCHv2 net-next iproute2] gre: add support for ERSPAN tunnel William Tu
2017-08-10 22:12 ` Stephen Hemminger [this message]
2017-08-17 22:31 ` 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=20170810151213.095a4505@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=kuznet@ms2.inr.ac.ru \
--cc=mvohra@vmware.com \
--cc=netdev@vger.kernel.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).