[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADvbK_dbq8MFf7tS9gi7AZDYfd+77ZNSO2T55ZnorG0sjEioPA@mail.gmail.com>
Date: Fri, 14 Feb 2020 18:19:44 +0800
From: Xin Long <lucien.xin@...il.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: network dev <netdev@...r.kernel.org>,
Simon Horman <simon.horman@...ronome.com>
Subject: Re: [PATCHv2 iproute2-next 1/7] iproute_lwtunnel: add options support
for geneve metadata
On Fri, Feb 14, 2020 at 12:26 AM Stephen Hemminger
<stephen@...workplumber.org> wrote:
>
> On Thu, 13 Feb 2020 19:56:59 +0800
> Xin Long <lucien.xin@...il.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.
will post v3, thanks
Powered by blists - more mailing lists