netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Xin Long <lucien.xin@gmail.com>
Cc: network dev <netdev@vger.kernel.org>,
	Simon Horman <simon.horman@netronome.com>
Subject: Re: [PATCHv2 iproute2-next 1/7] iproute_lwtunnel: add options support for geneve metadata
Date: Thu, 13 Feb 2020 08:26:35 -0800	[thread overview]
Message-ID: <20200213082635.0fde6ab8@hermes.lan> (raw)
In-Reply-To: <0fd1ae76c7689ab4fbd7c9f9fb85adf063154bdb.1581594682.git.lucien.xin@gmail.com>

On Thu, 13 Feb 2020 19:56:59 +0800
Xin Long <lucien.xin@gmail.com> wrote:

> +	while (rem) {
> +		parse_rtattr(tb, LWTUNNEL_IP_OPT_GENEVE_MAX, i, rem);
> +		class = rta_getattr_be16(tb[LWTUNNEL_IP_OPT_GENEVE_CLASS]);
> +		type = rta_getattr_u8(tb[LWTUNNEL_IP_OPT_GENEVE_TYPE]);
> +		data_len = RTA_PAYLOAD(tb[LWTUNNEL_IP_OPT_GENEVE_DATA]);
> +		hexstring_n2a(RTA_DATA(tb[LWTUNNEL_IP_OPT_GENEVE_DATA]),
> +			      data_len, data, sizeof(data));
> +		offset += data_len + 20;
> +		rem -= data_len + 20;
> +		i = RTA_DATA(attr) + offset;
> +		slen += sprintf(opt + slen, "%04x:%02x:%s", class, type, data);
> +		if (rem)
> +		

Please implement proper JSON array for these. Not just bunch of strings.

  reply	other threads:[~2020-02-13 16:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 11:56 [PATCHv2 iproute2-next 0/7] iproute2: fully support for geneve/vxlan/erspan options Xin Long
2020-02-13 11:56 ` [PATCHv2 iproute2-next 1/7] iproute_lwtunnel: add options support for geneve metadata Xin Long
2020-02-13 16:26   ` Stephen Hemminger [this message]
2020-02-14 10:19     ` Xin Long
2020-02-13 11:57 ` [PATCHv2 iproute2-next 2/7] iproute_lwtunnel: add options support for vxlan metadata Xin Long
2020-02-13 11:57 ` [PATCHv2 iproute2-next 3/7] iproute_lwtunnel: add options support for erspan metadata Xin Long
2020-02-13 11:57 ` [PATCHv2 iproute2-next 4/7] tc: m_tunnel_key: add options support for vxlan Xin Long
2020-02-13 11:57 ` [PATCHv2 iproute2-next 5/7] tc: m_tunnel_key: add options support for erpsan Xin Long
2020-02-13 11:57 ` [PATCHv2 iproute2-next 6/7] tc: f_flower: add options support for vxlan Xin Long
2020-02-13 11:57 ` [PATCHv2 iproute2-next 7/7] tc: f_flower: add options support for erspan Xin Long

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=20200213082635.0fde6ab8@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=lucien.xin@gmail.com \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).