[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1cd96ed3-b2ec-6cc7-8737-0cc2ecd38f72@gmail.com>
Date: Wed, 29 Apr 2020 10:58:36 -0600
From: David Ahern <dsahern@...il.com>
To: Xin Long <lucien.xin@...il.com>,
network dev <netdev@...r.kernel.org>,
stephen@...workplumber.org
Cc: David Ahern <dsahern@...il.com>, Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCHv4 iproute2-next 2/7] iproute_lwtunnel: add options support
for vxlan metadata
On 4/27/20 4:27 AM, Xin Long wrote:
> diff --git a/ip/iproute_lwtunnel.c b/ip/iproute_lwtunnel.c
> index 8599853..9945c86 100644
> --- a/ip/iproute_lwtunnel.c
> +++ b/ip/iproute_lwtunnel.c
> @@ -333,6 +333,26 @@ static void lwtunnel_print_geneve_opts(struct rtattr *attr)
> close_json_array(PRINT_JSON, name);
> }
>
> +static void lwtunnel_print_vxlan_opts(struct rtattr *attr)
> +{
> + struct rtattr *tb[LWTUNNEL_IP_OPT_VXLAN_MAX + 1];
> + struct rtattr *i = RTA_DATA(attr);
> + int rem = RTA_PAYLOAD(attr);
> + char *name = "vxlan_opts";
> + __u32 gbp;
> +
> + parse_rtattr(tb, LWTUNNEL_IP_OPT_VXLAN_MAX, i, rem);
> + gbp = rta_getattr_u32(tb[LWTUNNEL_IP_OPT_VXLAN_GBP]);
> +
> + print_nl();
> + print_string(PRINT_FP, name, "\t%s ", name);
> + open_json_array(PRINT_JSON, name);
> + open_json_object(NULL);
> + print_uint(PRINT_ANY, "gdp", "%u ", gbp);
gdp? should that be 'gbp'?
Powered by blists - more mailing lists