[ovs-dev] [PATCH V2 38/41] tunnel: add support for erspan and ip6erspan type.

William Tu u9012063 at gmail.com
Fri May 18 17:52:56 UTC 2018


On Fri, May 18, 2018 at 9:59 AM, William Tu <u9012063 at gmail.com> wrote:
> On Fri, May 18, 2018 at 8:41 AM, Gregory Rose <gvrose8192 at gmail.com> wrote:
>> On 5/17/2018 6:57 PM, Greg Rose wrote:
>>>
>>> From: William Tu <u9012063 at gmail.com>
>>>
>>> This patch adds support for erspan and ip6erspan.
>>>
>>> Signed-off-by: William Tu <u9012063 at gmail.com>
>>> ---
>>>   lib/odp-util.c | 3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/lib/odp-util.c b/lib/odp-util.c
>>> index 2109fac..d7b5bcd 100644
>>> --- a/lib/odp-util.c
>>> +++ b/lib/odp-util.c
>>> @@ -2882,7 +2882,8 @@ tun_key_to_attr(struct ofpbuf *a, const struct
>>> flow_tnl *tun_key,
>>>           nl_msg_end_nested(a, vxlan_opts_ofs);
>>>       }
>>>       tun_metadata_to_geneve_nlattr(tun_key, tun_flow_key, key_buf, a);
>>> -    if (tun_key->erspan_ver) {
>>> +    if (!tnl_type || !strcmp(tnl_type, "erspan") ||
>>> +        !strcmp(tnl_type, "ip6erspan")) {
>>>           struct erspan_metadata opts;
>>>             opts.version = tun_key->erspan_ver;
>>
>>
>> Ben has reported issues with 'make check' and then I found that 'make check
>> kmod' was failing on every test.
>>
>> Reverting this patch fixes things.  With 'make check' we reduce the error
>> count from 79 to 7.  Interestingly, five of those seven are tunnel related:
>>
>> 796: tunnel - Mix Geneve/GRE options                 FAILED (tunnel.at:875)
> Thanks, the above should be fixed by
>
> diff --git a/lib/odp-util.c b/lib/odp-util.c
> index acc158682840..c2b80c1b62c1 100644
> --- a/lib/odp-util.c
> +++ b/lib/odp-util.c
> @@ -2884,7 +2884,11 @@ tun_key_to_attr(struct ofpbuf *a, const struct
> flow_tnl *tun_key,
>                         (tun_key->gbp_flags << 16) | ntohs(tun_key->gbp_id));
>          nl_msg_end_nested(a, vxlan_opts_ofs);
>      }
> -    tun_metadata_to_geneve_nlattr(tun_key, tun_flow_key, key_buf, a);
> +
> +    if (!tnl_type || !strcmp(tnl_type, "geneve")) {
> +        tun_metadata_to_geneve_nlattr(tun_key, tun_flow_key, key_buf, a);
> +    }
> +
>      if (!tnl_type || !strcmp(tnl_type, "erspan") ||
>          !strcmp(tnl_type, "ip6erspan")) {
>          struct erspan_metadata opts;
>
> I guess this is due to conflict between the backport and master, about
> the commit
> commit db535b0d3e26aeac42a0a2e0e2f791215de3640c
> Author: William Tu <u9012063 at gmail.com>
> Date:   Thu May 10 23:35:51 2018 -0700
>
>     tunnel: make tun_key_to_attr aware of tunnel type.
>
> I'm looking into the below failed cases.
>
>
>> 797: tunnel_push_pop - erspan                        FAILED
>> (tunnel-push-pop.at:69)
>> 800: tunnel_push_pop - underlay bridge match         FAILED
>> (tunnel-push-pop.at:562)
>> 801: tunnel_push_pop_ipv6 - ip6erspan                FAILED
>> (tunnel-push-pop-ipv6.at:56)
>> 802: tunnel_push_pop_ipv6 - action                   FAILED
>> (tunnel-push-pop-ipv6.at:296)
>>

The reason the above erspan test fails is due to recent change to
tunnel neighbor snoop:

commit 83c2757bd16e86f6a2d5a69e94f890087e8df294
Author: Zoltan Balogh <zoltan.balogh.eth at gmail.com>
Date:   Wed Apr 4 23:57:54 2018 +0200

    xlate: Move tnl_neigh_snoop() to terminate_native_tunnel()

I'm working on the fix.

Thanks,
William


More information about the dev mailing list