On Thu, Jun 18, 2020 at 10:53:51AM +0200, Davide Caratti wrote:
> On Thu, 2020-06-18 at 16:37 +0800, Hangbin Liu wrote:
> > tc action print "geneve_opts" instead of "geneve_opt".
> > Fix the typo, or we will unable to match correct action output.
> >
>
> hello Hangbin,
>
> > Fixes: cba54f9cf4ec ("tc-testing: add geneve options in tunnel_key unit
> > tests")
>
> this Fixes: tag is suspicious, when a tdc test is added I would expect to
> see it passing. If I well read the code, the problem has been introduced
> in iproute2, with commit
>
> commit f72c3ad00f3b7869e90840d0098a83cb88224892
> Author: Xin Long <[email protected]>
> Date: Mon Apr 27 18:27:48 2020 +0800
>
> tc: m_tunnel_key: add options support for vxlan
>
>
> that did:
>
> [...]
>
> static void tunnel_key_print_geneve_options(const char *name,
> - struct rtattr *attr)
> +static void tunnel_key_print_geneve_options(struct rtattr *attr)
> {
> struct rtattr *tb[TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX + 1];
> struct rtattr *i = RTA_DATA(attr);
> int ii, data_len = 0, offset = 0;
> int rem = RTA_PAYLOAD(attr);
> + char *name = "geneve_opts";
> char strbuf[rem * 2 + 1];
> char data[rem * 2 + 1];
> uint8_t data_r[rem];
> @@ -421,7 +464,7 @@ static void tunnel_key_print_geneve_options(const char
> *name,
>
> open_json_array(PRINT_JSON, name);
> print_nl();
> - print_string(PRINT_FP, name, "\t%s ", "geneve_opt");
> + print_string(PRINT_FP, name, "\t%s ", name);
Ah, yes, you are right.
>
>
> (just speculating, because I didn't try older versions of iproute2). But if my
> hypothesis is correct, then the fix should be done in iproute2, WDYT?
If you and Stephen are both agree. I'm OK to fix it on iproute2.
Thanks
Hangbin