[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200618105107.GB27897@netronome.com>
Date: Thu, 18 Jun 2020 12:51:08 +0200
From: Simon Horman <simon.horman@...ronome.com>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org, Davide Caratti <dcaratti@...hat.com>,
lucien.xin@...il.com,
Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH iproute2] tc: m_tunnel_key: fix geneve opt output
On Thu, Jun 18, 2020 at 06:44:20PM +0800, Hangbin Liu wrote:
> Commit f72c3ad00f3b changed the geneve option output from "geneve_opt"
> to "geneve_opts", which may break the program compatibility. Reset
> it back to geneve_opt.
>
> Fixes: f72c3ad00f3b ("tc: m_tunnel_key: add options support for vxlan")
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
Thanks Hangbin.
I agree that the patch in question did change the name of the option
as you describe, perhaps inadvertently. But I wonder if perhaps this fix
is too simple as the patch mentioned also:
1. Documents the option as geneve_opts
2. Adds vxlan_opts
So this patch invalidates the documentation and creates asymmetry between
the VXLAN and Geneve variants of this feature.
Another problem is that any user of geneve_opts will break.
Perhaps a way out of this mess is to:
1. make geneve_opt an alias for geneve_opts (i.e. two names for the same
thing)
2. Document geneve_opt, possibly marking it as deprecated.
> ---
> tc/m_tunnel_key.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tc/m_tunnel_key.c b/tc/m_tunnel_key.c
> index bfec9072..0074f744 100644
> --- a/tc/m_tunnel_key.c
> +++ b/tc/m_tunnel_key.c
> @@ -534,7 +534,7 @@ static void tunnel_key_print_geneve_options(struct rtattr *attr)
> struct rtattr *i = RTA_DATA(attr);
> int ii, data_len = 0, offset = 0;
> int rem = RTA_PAYLOAD(attr);
> - char *name = "geneve_opts";
> + char *name = "geneve_opt";
> char strbuf[rem * 2 + 1];
> char data[rem * 2 + 1];
> uint8_t data_r[rem];
> --
> 2.25.4
>
Powered by blists - more mailing lists